context

package
v0.3.45 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 21 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, 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 added in v0.3.33

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

func (*FakeClusterContext) AddClusterEventEventHandler added in v0.3.33

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

func (*FakeClusterContext) AddPodEventHandler

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

func (*FakeClusterContext) DeleteIngress added in v0.2.3

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

func (*FakeClusterContext) DeletePods

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

func (*FakeClusterContext) DeleteService added in v0.1.34

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 added in v0.1.24

func (c *FakeClusterContext) GetClusterPool() string

func (*FakeClusterContext) GetIngresses added in v0.2.3

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

func (*FakeClusterContext) GetNode added in v0.2.6

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

func (*FakeClusterContext) GetNodeStatsSummary added in v0.1.29

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 added in v0.1.2

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

func (*FakeClusterContext) GetServices added in v0.2.3

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

func (*FakeClusterContext) Stop

func (*FakeClusterContext) Stop()

func (*FakeClusterContext) SubmitIngress added in v0.2.3

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 added in v0.1.34

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

type NodeSpec added in v0.1.14

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