taints

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// MODIFIED ...
	MODIFIED = "modified"
	// TAINTED ...
	TAINTED = "tainted"
	// UNTAINTED ...
	UNTAINTED = "untainted"
)

Variables

This section is empty.

Functions

func AddTaints

func AddTaints(oldTaints []v1.Taint, newTaints *[]v1.Taint) bool

AddTaints adds the newTaints list to existing ones and updates the newTaints List. TODO: This needs a rewrite to take only the new values instead of appended newTaints list to be consistent.

func DeleteTaint

func DeleteTaint(taints []v1.Taint, taintToDelete *v1.Taint) ([]v1.Taint, bool)

DeleteTaint removes all the the taints that have the same key and effect to given taintToDelete.

func DeleteTaints

func DeleteTaints(taintsToRemove []v1.Taint, newTaints *[]v1.Taint) ([]error, bool)

DeleteTaints deletes the given taints from the node's taintlist.

func DeleteTaintsByKey

func DeleteTaintsByKey(taints []v1.Taint, taintKey string) ([]v1.Taint, bool)

DeleteTaintsByKey removes all the taints that have the same key to given taintKey

func ReorganizeTaints

func ReorganizeTaints(node *v1.Node, overwrite bool, taintsToAdd []v1.Taint, taintsToRemove []v1.Taint) (string, []v1.Taint, error)

ReorganizeTaints returns the updated set of taints, taking into account old taints that were not updated, old taints that were updated, old taints that were deleted, and new taints.

func ValidateNoTaintOverwrites

func ValidateNoTaintOverwrites(node *v1.Node, taints []v1.Taint) error

ValidateNoTaintOverwrites validates that when overwrite is false, to-be-updated taints don't exist in the node taint list (yet)

Types

This section is empty.

Jump to

Keyboard shortcuts

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