Documentation
¶
Index ¶
- func BuildGetPodsAssignedToNodeFunc(podInformer v1.PodInformer) (framework.GetPodsAssignedToNodeFunc, error)
- func BuildTestNode(name string, millicpu int64, mem int64, pods int64, apply func(*corev1.Node)) *corev1.Node
- func BuildTestPod(name string, cpu int64, memory int64, nodeName string, apply func(*corev1.Pod)) *corev1.Pod
- func GetDaemonSetOwnerRefList() []metav1.OwnerReference
- func GetMirrorPodAnnotation() map[string]string
- func GetNormalPodOwnerRefList() []metav1.OwnerReference
- func GetReplicaSetOwnerRefList() []metav1.OwnerReference
- func GetStatefulSetOwnerRefList() []metav1.OwnerReference
- func MakeBestEffortPod(pod *corev1.Pod)
- func MakeBurstablePod(pod *corev1.Pod)
- func MakeGuaranteedPod(pod *corev1.Pod)
- func SetDSOwnerRef(pod *corev1.Pod)
- func SetNodeExtendedResource(node *corev1.Node, resourceName corev1.ResourceName, requestQuantity int64)
- func SetNodeUnschedulable(node *corev1.Node)
- func SetNormalOwnerRef(pod *corev1.Pod)
- func SetPodExtendedResourceRequest(pod *corev1.Pod, resourceName corev1.ResourceName, requestQuantity int64)
- func SetPodPriority(pod *corev1.Pod, priority int32)
- func SetRSOwnerRef(pod *corev1.Pod)
- func SetSSOwnerRef(pod *corev1.Pod)
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 ¶
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 ¶
MakeBestEffortPod makes the given pod a BestEffort pod
func MakeBurstablePod ¶
MakeBurstablePod makes the given pod a Burstable pod
func MakeGuaranteedPod ¶
MakeGuaranteedPod makes the given pod an Guaranteed pod
func SetDSOwnerRef ¶
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 ¶
SetNodeUnschedulable sets the given node unschedulable
func SetNormalOwnerRef ¶
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 ¶
SetPodPriority sets the given pod's priority
func SetRSOwnerRef ¶
SetRSOwnerRef sets the given pod's owner to ReplicaSet
func SetSSOwnerRef ¶
SetSSOwnerRef sets the given pod's owner to StatefulSet
Types ¶
This section is empty.