util

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeNodesAndPods

func MakeNodesAndPods(labels map[string]string, existingPodsNum, allNodesNum int) (existingPods []*corev1.Pod, allNodes []*corev1.Node)

func MakePG

func MakePG(name, namespace string, min int32, creationTime *time.Time, minResource *corev1.ResourceList) *v1alpha1.PodGroup

func MakePod

func MakePod(podName string, namespace string, memReq int64, cpuReq int64, priority int32, uid string, nodeName string) *corev1.Pod

func NewDefaultSchedulerComponentConfig

func NewDefaultSchedulerComponentConfig() (config.KubeSchedulerConfiguration, error)

NewDefaultSchedulerComponentConfig returns a default scheduler cc object. We need this function due to k/k#102796 - default profile needs to built manually.

func NewFakeSharedLister

func NewFakeSharedLister(pods []*v1.Pod, nodes []*v1.Node) framework.SharedLister

func NewFramework

func NewFramework(fns []st.RegisterPluginFunc, cfgs []config.PluginConfig, profileName string, opts ...runtime.Option) (framework.Framework, error)

NewFramework is a variant version of st.NewFramework - with extra PluginConfig slice as input.

func NewPodNominator

func NewPodNominator(podLister listersv1.PodLister) framework.PodNominator

NewPodNominator creates a nominator as a backing of framework.PodNominator. A podLister is passed in so as to check if the pod exists before adding its nominatedNode info.

func NominatedNodeName

func NominatedNodeName(pod *v1.Pod) string

NominatedNodeName returns nominated node name of a Pod.

func PodNotExist

func PodNotExist(cs clientset.Interface, podNamespace, podName string) bool

PodNotExist returns true if the given pod does not exist.

func PrintPods

func PrintPods(t *testing.T, cs clientset.Interface, ns string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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