context

package
v0.3.72-rc-e3b2d58 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterContext

type ClusterContext interface {
	ClusterIdentity

	AddPodEventHandler(handler cache.ResourceEventHandlerFuncs)
	AddClusterEventEventHandler(handler cache.ResourceEventHandlerFuncs)
	GetBatchPods() ([]*v1.Pod, error)
	GetAllPods() ([]*v1.Pod, error)
	GetActiveBatchPods() ([]*v1.Pod, error)
	GetNodes() ([]*v1.Node, error)
	GetNode(nodeName string) (*v1.Node, error)
	GetNodeStatsSummary(context.Context, *v1.Node) (*v1alpha1.Summary, error)
	GetPodEvents(pod *v1.Pod) ([]*v1.Event, error)
	GetServices(pod *v1.Pod) ([]*v1.Service, error)
	GetIngresses(pod *v1.Pod) ([]*networking.Ingress, error)
	GetEndpointSlices(namespace string, labelName string, labelValue string) ([]*discovery.EndpointSlice, error)

	SubmitPod(pod *v1.Pod, owner string, ownerGroups []string) (*v1.Pod, error)
	SubmitService(service *v1.Service) (*v1.Service, error)
	SubmitIngress(ingress *networking.Ingress) (*networking.Ingress, error)
	DeletePodWithCondition(pod *v1.Pod, condition func(pod *v1.Pod) bool, pessimistic bool) error
	DeletePods(pods []*v1.Pod)
	DeleteService(service *v1.Service) error
	DeleteIngress(ingress *networking.Ingress) error

	AddAnnotation(pod *v1.Pod, annotations map[string]string) error
	AddClusterEventAnnotation(event *v1.Event, annotations map[string]string) error

	Stop()
}

type ClusterIdentity

type ClusterIdentity interface {
	GetClusterId() string
	GetClusterPool() string
}

type KubernetesClusterContext

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

func NewClusterContext

func NewClusterContext(
	configuration configuration.ApplicationConfiguration,
	minTimeBetweenRepeatDeletionCalls time.Duration,
	kubernetesClientProvider cluster.KubernetesClientProvider,
	etcdHealthMonitor healthmonitor.EtcdLimitHealthMonitor,
	killTimeout time.Duration,
) *KubernetesClusterContext

func (*KubernetesClusterContext) AddAnnotation

func (c *KubernetesClusterContext) AddAnnotation(pod *v1.Pod, annotations map[string]string) error

func (*KubernetesClusterContext) AddClusterEventAnnotation

func (c *KubernetesClusterContext) AddClusterEventAnnotation(event *v1.Event, annotations map[string]string) error

func (*KubernetesClusterContext) AddClusterEventEventHandler

func (c *KubernetesClusterContext) AddClusterEventEventHandler(handler cache.ResourceEventHandlerFuncs)

func (*KubernetesClusterContext) AddPodEventHandler

func (c *KubernetesClusterContext) AddPodEventHandler(handler cache.ResourceEventHandlerFuncs)

func (*KubernetesClusterContext) DeleteIngress

func (c *KubernetesClusterContext) DeleteIngress(ingress *networking.Ingress) error

func (*KubernetesClusterContext) DeletePodWithCondition added in v0.3.47

func (c *KubernetesClusterContext) DeletePodWithCondition(pod *v1.Pod, condition func(pod *v1.Pod) bool, pessimistic bool) error

func (*KubernetesClusterContext) DeletePods

func (c *KubernetesClusterContext) DeletePods(pods []*v1.Pod)

func (*KubernetesClusterContext) DeleteService

func (c *KubernetesClusterContext) DeleteService(service *v1.Service) error

func (*KubernetesClusterContext) GetActiveBatchPods

func (c *KubernetesClusterContext) GetActiveBatchPods() ([]*v1.Pod, error)

func (*KubernetesClusterContext) GetAllPods

func (c *KubernetesClusterContext) GetAllPods() ([]*v1.Pod, error)

func (*KubernetesClusterContext) GetBatchPods

func (c *KubernetesClusterContext) GetBatchPods() ([]*v1.Pod, error)

func (*KubernetesClusterContext) GetClusterId

func (c *KubernetesClusterContext) GetClusterId() string

func (*KubernetesClusterContext) GetClusterPool

func (c *KubernetesClusterContext) GetClusterPool() string

func (*KubernetesClusterContext) GetEndpointSlices added in v0.3.47

func (c *KubernetesClusterContext) GetEndpointSlices(namespace string, labelName string, labelValue string) ([]*discovery.EndpointSlice, error)

func (*KubernetesClusterContext) GetIngresses

func (c *KubernetesClusterContext) GetIngresses(pod *v1.Pod) ([]*networking.Ingress, error)

func (*KubernetesClusterContext) GetNode

func (c *KubernetesClusterContext) GetNode(nodeName string) (*v1.Node, error)

func (*KubernetesClusterContext) GetNodeStatsSummary

func (c *KubernetesClusterContext) GetNodeStatsSummary(ctx context.Context, node *v1.Node) (*v1alpha1.Summary, error)

func (*KubernetesClusterContext) GetNodes

func (c *KubernetesClusterContext) GetNodes() ([]*v1.Node, error)

func (*KubernetesClusterContext) GetPodEvents

func (c *KubernetesClusterContext) GetPodEvents(pod *v1.Pod) ([]*v1.Event, error)

func (*KubernetesClusterContext) GetServices

func (c *KubernetesClusterContext) GetServices(pod *v1.Pod) ([]*v1.Service, error)

func (*KubernetesClusterContext) ProcessPodsToDelete

func (c *KubernetesClusterContext) ProcessPodsToDelete()

func (*KubernetesClusterContext) Stop

func (c *KubernetesClusterContext) Stop()

func (*KubernetesClusterContext) SubmitIngress

func (c *KubernetesClusterContext) SubmitIngress(ingress *networking.Ingress) (*networking.Ingress, error)

func (*KubernetesClusterContext) SubmitPod

func (c *KubernetesClusterContext) SubmitPod(pod *v1.Pod, owner string, ownerGroups []string) (*v1.Pod, error)

func (*KubernetesClusterContext) SubmitService

func (c *KubernetesClusterContext) SubmitService(service *v1.Service) (*v1.Service, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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