kubeutil

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PhaseList    = []v1.PodPhase{v1.PodPending, v1.PodRunning, v1.PodSucceeded, v1.PodFailed, v1.PodUnknown}
	NodeCondList = []v1.NodeCondition{
		{
			Message: "kubelet is posting ready status",
			Reason:  "KubeletReady",
			Status:  "True",
			Type:    "Ready",
		},
		{
			Message: "kubelet is posting not ready status",
			Reason:  "KubeletNotReady",
			Status:  "False",
			Type:    "NotReady",
		},
	}
)

Functions

func BuildFakeNode

func BuildFakeNode(name string, unsched bool, alloc v1.ResourceList, nodeCond v1.NodeCondition, labels map[string]string) *v1.Node

func BuildFakePod

func BuildFakePod(name, namespace, nodeName string, podPhase v1.PodPhase, req v1.ResourceList) *v1.Pod

func BuildResourceList

func BuildResourceList(cpu string, memory string) v1.ResourceList

func CreateNodes

func CreateNodes(fakeClient kubernetes.Interface, nodeCount int, allocList []v1.ResourceList,
	condList []v1.NodeCondition, labelList []map[string]string) error

func CreatePods

func CreatePods(fakeClient kubernetes.Interface, podCount int, nsList []string, nodeList []string,
	phaseList []v1.PodPhase, reqList []v1.ResourceList) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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