poolmgr

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: 49 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.

Index

Constants

View Source
const (
	GET_POOL requestType = iota
	CLEANUP_POOL
)

Variables

This section is empty.

Functions

func FunctionEventHandlers added in v1.15.0

func FunctionEventHandlers(ctx context.Context, logger *zap.Logger, kubernetesClient kubernetes.Interface, fissionfnNamespace string, istioEnabled bool) k8sCache.ResourceEventHandlerFuncs

FunctionEventHandlers provides handlers for function resource events. Based on function create/update/delete event, we create role binding for the secret/configmap access which is used by fetcher component. If istio is enabled, we create a service for the function.

func IsIPv6

func IsIPv6(podIP string) bool

IsIPv6 validates if the podIP follows to IPv6 protocol

func IsPodActive added in v1.15.0

func IsPodActive(p *v1.Pod) bool

func MakeGenericPoolManager

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

Types

type GenericPool

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

GenericPool represents a generic environment pool

func MakeGenericPool

func MakeGenericPool(
	logger *zap.Logger,
	fissionClient versioned.Interface,
	kubernetesClient kubernetes.Interface,
	metricsClient metricsclient.Interface,
	env *fv1.Environment,
	fnNamespace string,
	fsCache *fscache.FunctionServiceCache,
	fetcherConfig *fetcherConfig.Config,
	instanceID string,
	enableIstio bool,
	podSpecPatch *apiv1.PodSpec) *GenericPool

MakeGenericPool returns an instance of GenericPool

type GenericPoolManager

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

func (*GenericPoolManager) AdoptExistingResources

func (gpm *GenericPoolManager) AdoptExistingResources(ctx context.Context)

func (*GenericPoolManager) CleanupOldExecutorObjects

func (gpm *GenericPoolManager) CleanupOldExecutorObjects(ctx context.Context)

func (*GenericPoolManager) DeleteFuncSvcFromCache

func (gpm *GenericPoolManager) DeleteFuncSvcFromCache(ctx context.Context, fsvc *fscache.FuncSvc)

func (*GenericPoolManager) DumpDebugInfo added in v1.19.0

func (gpm *GenericPoolManager) DumpDebugInfo(ctx context.Context) error

func (*GenericPoolManager) GetFuncSvc

func (gpm *GenericPoolManager) GetFuncSvc(ctx context.Context, fn *fv1.Function) (fnSvc *fscache.FuncSvc, fErr error)

func (*GenericPoolManager) GetFuncSvcFromCache

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

func (*GenericPoolManager) GetTypeName

func (gpm *GenericPoolManager) GetTypeName(ctx context.Context) fv1.ExecutorType

func (*GenericPoolManager) IsValid

func (gpm *GenericPoolManager) IsValid(ctx context.Context, fsvc *fscache.FuncSvc) bool

IsValid checks if pod is not deleted and that it has the address passed as the argument. Also checks that all the containers in it are reporting a ready status for the healthCheck.

func (*GenericPoolManager) MarkSpecializationFailure added in v1.19.0

func (gpm *GenericPoolManager) MarkSpecializationFailure(ctx context.Context, fnMeta *metav1.ObjectMeta)

func (*GenericPoolManager) NoActiveConnectionEventChecker added in v1.13.0

func (gpm *GenericPoolManager) NoActiveConnectionEventChecker(ctx context.Context, kubeClient kubernetes.Interface) error

NoActiveConnectionEventChecker checks if the pod has emitted an inactive event

func (*GenericPoolManager) RefreshFuncPods

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

func (*GenericPoolManager) Run

func (gpm *GenericPoolManager) Run(ctx context.Context, mgr manager.Interface)

func (*GenericPoolManager) TapService

func (gpm *GenericPoolManager) TapService(ctx context.Context, svcHost string) error

func (*GenericPoolManager) UnTapService added in v1.11.0

func (gpm *GenericPoolManager) UnTapService(ctx context.Context, fnMeta *metav1.ObjectMeta, svcHost string)

func (*GenericPoolManager) WebsocketStartEventChecker added in v1.13.0

func (gpm *GenericPoolManager) WebsocketStartEventChecker(ctx context.Context, kubeClient kubernetes.Interface) error

WebsocketStartEventChecker checks if the pod has emitted a websocket connection start event

type PoolPodController added in v1.15.0

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

func NewPoolPodController added in v1.15.0

func NewPoolPodController(ctx context.Context, logger *zap.Logger,
	kubernetesClient kubernetes.Interface,
	enableIstio bool,
	finformerFactory map[string]genInformer.SharedInformerFactory,
	gpmInformerFactory map[string]k8sInformers.SharedInformerFactory) (*PoolPodController, error)

func (*PoolPodController) InjectGpm added in v1.15.0

func (p *PoolPodController) InjectGpm(gpm *GenericPoolManager)

func (*PoolPodController) Run added in v1.15.0

func (p *PoolPodController) Run(ctx context.Context, stopCh <-chan struct{}, mgr manager.Interface)

Jump to

Keyboard shortcuts

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