context

package
v0.3.79-rc-f8c44f2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultNodeSpec = []*NodeSpec{
	{
		Name:  "worker",
		Count: 500,
		Allocatable: map[v1.ResourceName]resource.Quantity{
			"cpu":               resource.MustParse("8"),
			"memory":            resource.MustParse("128Gi"),
			"ephemeral-storage": resource.MustParse("256Gi"),
		},
	},
}

Functions

func NewFakeClusterContext

func NewFakeClusterContext(appConfig configuration.ApplicationConfiguration, nodeIdLabel string, nodeSpecs []*NodeSpec) cluster_context.ClusterContext

Types

type FakeClusterContext

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

func (*FakeClusterContext) AddAnnotation

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

func (*FakeClusterContext) AddClusterEventAnnotation

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

func (*FakeClusterContext) AddClusterEventEventHandler

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

func (*FakeClusterContext) AddPodEventHandler

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

func (*FakeClusterContext) DeleteIngress

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

func (*FakeClusterContext) DeletePodWithCondition added in v0.3.47

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

func (*FakeClusterContext) DeletePods

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

func (*FakeClusterContext) DeleteService

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

func (*FakeClusterContext) GetActiveBatchPods

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

func (*FakeClusterContext) GetAllPods

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

func (*FakeClusterContext) GetBatchPods

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

func (*FakeClusterContext) GetClusterId

func (c *FakeClusterContext) GetClusterId() string

func (*FakeClusterContext) GetClusterPool

func (c *FakeClusterContext) GetClusterPool() string

func (*FakeClusterContext) GetEndpointSlices added in v0.3.47

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

func (*FakeClusterContext) GetIngresses

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

func (*FakeClusterContext) GetNode

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

func (*FakeClusterContext) GetNodeStatsSummary

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

func (*FakeClusterContext) GetNodes

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

func (*FakeClusterContext) GetPodEvents

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

func (*FakeClusterContext) GetServices

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

func (*FakeClusterContext) Stop

func (*FakeClusterContext) Stop()

func (*FakeClusterContext) SubmitIngress

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

func (*FakeClusterContext) SubmitPod

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

func (*FakeClusterContext) SubmitService

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

type NodeSpec

type NodeSpec struct {
	Name        string
	Count       int
	Taints      []v1.Taint
	Labels      map[string]string
	Allocatable map[v1.ResourceName]resource.Quantity
}

Jump to

Keyboard shortcuts

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