test

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGetPodsAssignedToNodeFunc

func BuildGetPodsAssignedToNodeFunc(podInformer v1.PodInformer) (framework.GetPodsAssignedToNodeFunc, error)

BuildGetPodsAssignedToNodeFunc establishes an indexer to map the pods and their assigned nodes. It returns a function to help us get all the pods that assigned to a node based on the indexer.

func BuildTestNode

func BuildTestNode(name string, millicpu int64, mem int64, pods int64, apply func(*corev1.Node)) *corev1.Node

BuildTestNode creates a node with specified capacity.

func BuildTestPod

func BuildTestPod(name string, cpu int64, memory int64, nodeName string, apply func(*corev1.Pod)) *corev1.Pod

BuildTestPod creates a test pod with given parameters.

func GetDaemonSetOwnerRefList

func GetDaemonSetOwnerRefList() []metav1.OwnerReference

GetDaemonSetOwnerRefList returns the ownerRef needed for daemonset pod.

func GetMirrorPodAnnotation

func GetMirrorPodAnnotation() map[string]string

GetMirrorPodAnnotation returns the annotation needed for mirror pod.

func GetNormalPodOwnerRefList

func GetNormalPodOwnerRefList() []metav1.OwnerReference

GetNormalPodOwnerRefList returns the ownerRef needed for a pod.

func GetReplicaSetOwnerRefList

func GetReplicaSetOwnerRefList() []metav1.OwnerReference

GetReplicaSetOwnerRefList returns the ownerRef needed for replicaset pod.

func GetStatefulSetOwnerRefList

func GetStatefulSetOwnerRefList() []metav1.OwnerReference

GetStatefulSetOwnerRefList returns the ownerRef needed for statefulset pod.

func MakeBestEffortPod

func MakeBestEffortPod(pod *corev1.Pod)

MakeBestEffortPod makes the given pod a BestEffort pod

func MakeBurstablePod

func MakeBurstablePod(pod *corev1.Pod)

MakeBurstablePod makes the given pod a Burstable pod

func MakeGuaranteedPod

func MakeGuaranteedPod(pod *corev1.Pod)

MakeGuaranteedPod makes the given pod an Guaranteed pod

func SetDSOwnerRef

func SetDSOwnerRef(pod *corev1.Pod)

SetDSOwnerRef sets the given pod's owner to DaemonSet

func SetNodeExtendedResource

func SetNodeExtendedResource(node *corev1.Node, resourceName corev1.ResourceName, requestQuantity int64)

SetNodeExtendedResouces sets the given node's extended resources

func SetNodeUnschedulable

func SetNodeUnschedulable(node *corev1.Node)

SetNodeUnschedulable sets the given node unschedulable

func SetNormalOwnerRef

func SetNormalOwnerRef(pod *corev1.Pod)

SetNormalOwnerRef sets the given pod's owner to Pod

func SetPodExtendedResourceRequest

func SetPodExtendedResourceRequest(pod *corev1.Pod, resourceName corev1.ResourceName, requestQuantity int64)

SetPodExtendedResourceRequest sets the given pod's extended resources

func SetPodPriority

func SetPodPriority(pod *corev1.Pod, priority int32)

SetPodPriority sets the given pod's priority

func SetRSOwnerRef

func SetRSOwnerRef(pod *corev1.Pod)

SetRSOwnerRef sets the given pod's owner to ReplicaSet

func SetSSOwnerRef

func SetSSOwnerRef(pod *corev1.Pod)

SetSSOwnerRef sets the given pod's owner to StatefulSet

Types

This section is empty.

Jump to

Keyboard shortcuts

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