scheduling

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemPriorityClassPrefix = "system-"
	// SystemClusterCritical is the system priority class name that represents cluster-critical.
	SystemClusterCritical = SystemPriorityClassPrefix + "cluster-critical"
	// SystemNodeCritical is the system priority class name that represents node-critical.
	SystemNodeCritical = SystemPriorityClassPrefix + "node-critical"
)

Variables

This section is empty.

Functions

func CreateHostPortPods

func CreateHostPortPods(f *framework.Framework, id string, replicas int, expectRunning bool)

CreateHostPortPods creates RC with host port 4321

func CreateNodeSelectorPods

func CreateNodeSelectorPods(f *framework.Framework, id string, replicas int, nodeSelector map[string]string, expectRunning bool) error

CreateNodeSelectorPods creates RC with host port 4321 and defines node selector

func GenerateLabelThatMatchNoNode

func GenerateLabelThatMatchNoNode(nodes []v1.Node) (key, value string)

func Get2NodesThatCanRunPod

func Get2NodesThatCanRunPod(f *framework.Framework) []string

Get2NodesThatCanRunPod return a 2-node slice where can run pod.

func GetNodeThatCanRunPod

func GetNodeThatCanRunPod(f *framework.Framework) string

GetNodeThatCanRunPod trying to launch a pod without a label to get a node which can launch it

func GetPod

func GetPod(f *framework.Framework, namespace, name string) *v1.Pod

func GetPodAnnotations

func GetPodAnnotations(resourceType podutil.PodResourceType, podLauncher podutil.PodLauncher) map[string]string

func GetPodsScheduled

func GetPodsScheduled(workerNodes sets.String, pods *v1.PodList) (scheduledPods, notScheduledPods []v1.Pod)

GetPodsScheduled returns a number of currently scheduled and not scheduled Pods on worker nodes.

func SIGDescribe

func SIGDescribe(text string, body func()) bool

SIGDescribe annotates the test with the SIG label.

func WaitForPodsToBeDeleted

func WaitForPodsToBeDeleted(c clientset.Interface)

WaitForPodsToBeDeleted waits until pods that are terminating to get deleted.

func WaitForSchedulerAfterAction

func WaitForSchedulerAfterAction(f *framework.Framework, action Action, ns, podName string, expectSuccess bool)

WaitForSchedulerAfterAction performs the provided action and then waits for scheduler to act on the given pod.

func WaitForStableCluster

func WaitForStableCluster(c clientset.Interface, workerNodes sets.String) int

WaitForStableCluster waits until all existing pods are scheduled and returns their amount.

func WithHardConstraints

func WithHardConstraints(anno map[string]string, constraintNames []string) map[string]string

func WithPodGroup

func WithPodGroup(anno map[string]string, podGroupName string) map[string]string

func WithPreemptible

func WithPreemptible(anno map[string]string, preemptible bool) map[string]string

func WithSoftConstraints

func WithSoftConstraints(anno map[string]string, constraintNames []string) map[string]string

func WithVictimPods

func WithVictimPods(anno map[string]string, nominatedNode api.NominatedNode) map[string]string

Types

type Action

type Action func() error

Action is a function to be performed by the system.

type Resource

type Resource struct {
	MilliCPU int64
	Memory   int64
}

Resource is a collection of compute resource.

Jump to

Keyboard shortcuts

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