corev1

package
v0.20.0-alpha.2...-9003028 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package corev1 defines functions which should satisfy one of the following:

- Be used by more than one core component (kube-scheduler, kubelet, kube-apiserver, etc.) - Be used by a core component and another kubernetes project (cluster-autoscaler, descheduler)

And be a scheduling feature.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindMatchingUntoleratedTaint

func FindMatchingUntoleratedTaint(taints []v1.Taint, tolerations []v1.Toleration, inclusionFilter taintsFilterFunc) (v1.Taint, bool)

FindMatchingUntoleratedTaint checks if the given tolerations tolerates all the filtered taints, and returns the first taint without a toleration Returns true if there is an untolerated taint Returns false if all taints are tolerated

func GetAvoidPodsFromNodeAnnotations

func GetAvoidPodsFromNodeAnnotations(annotations map[string]string) (v1.AvoidPods, error)

GetAvoidPodsFromNodeAnnotations scans the list of annotations and returns the pods that needs to be avoided for this node from scheduling

func MatchNodeSelectorTerms

func MatchNodeSelectorTerms(
	node *v1.Node,
	nodeSelector *v1.NodeSelector,
) (bool, error)

MatchNodeSelectorTerms checks whether the node labels and fields match node selector terms in ORed; nil or empty term matches no objects.

func PodPriority

func PodPriority(pod *v1.Pod) int32

PodPriority returns priority of the given pod.

func TolerationsTolerateTaint

func TolerationsTolerateTaint(tolerations []v1.Toleration, taint *v1.Taint) bool

TolerationsTolerateTaint checks if taint is tolerated by any of the tolerations.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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