util

package
v0.23.9 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 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 added in v0.19.8

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

func MakePG added in v0.19.8

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

func MakePod added in v0.19.8

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

func NewDefaultSchedulerComponentConfig added in v0.22.6

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

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

func NewFramework added in v0.21.6

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

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

func NominatedNodeName(pod *v1.Pod) string

NominatedNodeName returns nominated node name of a Pod.

func PodNotExist added in v0.23.9

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