affinity

package
v0.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NodeFieldSelectorKeyNodeName field path use to select the Node
	NodeFieldSelectorKeyNodeName = "metadata.name"
)

Variables

This section is empty.

Functions

func GetNodeNameFromAffinity

func GetNodeNameFromAffinity(affinity *v1.Affinity) string

GetNodeNameFromAffinity return the Node name from the pod affinity configuration

func ReplaceNodeNameNodeAffinity

func ReplaceNodeNameNodeAffinity(affinity *v1.Affinity, nodename string) *v1.Affinity

ReplaceNodeNameNodeAffinity replaces the RequiredDuringSchedulingIgnoredDuringExecution NodeAffinity of the given affinity with a new NodeAffinity that selects the given nodeName. Note that this function assumes that no NodeAffinity conflicts with the selected nodeName.

Types

This section is empty.

Jump to

Keyboard shortcuts

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