newdeploy

package
v1.20.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Overview

Copyright 2021 The Fission Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2021 The Fission Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeNewDeploy

func MakeNewDeploy(
	ctx context.Context,
	logger *zap.Logger,
	fissionClient versioned.Interface,
	kubernetesClient kubernetes.Interface,
	fetcherConfig *fetcherConfig.Config,
	instanceID string,
	finformerFactory map[string]genInformer.SharedInformerFactory,
	ndmInformerFactory map[string]k8sInformers.SharedInformerFactory,
	podSpecPatch *apiv1.PodSpec,
) (executortype.ExecutorType, error)

MakeNewDeploy initializes and returns an instance of NewDeploy.

Types

type NewDeploy

type NewDeploy struct {
	// contains filtered or unexported fields
}

NewDeploy represents an ExecutorType

func (*NewDeploy) AdoptExistingResources

func (deploy *NewDeploy) AdoptExistingResources(ctx context.Context)

AdoptExistingResources attempts to adopt resources for functions in all namespaces.

func (*NewDeploy) CleanupOldExecutorObjects

func (deploy *NewDeploy) CleanupOldExecutorObjects(ctx context.Context)

CleanupOldExecutorObjects cleans orphaned resources.

func (*NewDeploy) DeleteFuncSvcFromCache

func (deploy *NewDeploy) DeleteFuncSvcFromCache(ctx context.Context, fsvc *fscache.FuncSvc)

DeleteFuncSvcFromCache deletes a function service from cache.

func (*NewDeploy) DumpDebugInfo added in v1.19.0

func (deploy *NewDeploy) DumpDebugInfo(ctx context.Context) error

func (*NewDeploy) EnvEventHandlers added in v1.14.1

func (deploy *NewDeploy) EnvEventHandlers(ctx context.Context) k8sCache.ResourceEventHandlerFuncs

func (*NewDeploy) FunctionEventHandlers added in v1.14.1

func (deploy *NewDeploy) FunctionEventHandlers(ctx context.Context) k8sCache.ResourceEventHandlerFuncs

func (*NewDeploy) GetFuncSvc

func (deploy *NewDeploy) GetFuncSvc(ctx context.Context, fn *fv1.Function) (*fscache.FuncSvc, error)

GetFuncSvc returns a function service; error otherwise.

func (*NewDeploy) GetFuncSvcFromCache

func (deploy *NewDeploy) GetFuncSvcFromCache(ctx context.Context, fn *fv1.Function) (*fscache.FuncSvc, error)

GetFuncSvcFromCache returns a function service from cache; error otherwise.

func (*NewDeploy) GetTypeName

func (deploy *NewDeploy) GetTypeName(ctx context.Context) fv1.ExecutorType

GetTypeName returns the executor type name.

func (*NewDeploy) IsValid

func (deploy *NewDeploy) IsValid(ctx context.Context, fsvc *fscache.FuncSvc) bool

IsValid does a get on the service address to ensure it's a valid service, then scale deployment to 1 replica if there are no available replicas for function. Return true if no error occurs, return false otherwise.

func (*NewDeploy) MarkSpecializationFailure added in v1.19.0

func (deploy *NewDeploy) MarkSpecializationFailure(ctx context.Context, fnMeta *metav1.ObjectMeta)

MarkSpecializationFailure has not been implemented for NewDeployment.

func (*NewDeploy) RefreshFuncPods

func (deploy *NewDeploy) RefreshFuncPods(ctx context.Context, logger *zap.Logger, f fv1.Function) error

RefreshFuncPods deletes pods related to the function so that new pods are replenished

func (*NewDeploy) Run

func (deploy *NewDeploy) Run(ctx context.Context, mgr manager.Interface)

Run start the function and environment controller along with an object reaper.

func (*NewDeploy) TapService

func (deploy *NewDeploy) TapService(ctx context.Context, svcHost string) error

TapService makes a TouchByAddress request to the cache.

func (*NewDeploy) UnTapService added in v1.11.0

func (deploy *NewDeploy) UnTapService(ctx context.Context, fnMeta *metav1.ObjectMeta, svcHost string)

UnTapService has not been implemented for NewDeployment.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL