Documentation ¶
Overview ¶
Package taints implements utilities for working with taints.
Package taints implements utilities for working with taints.
Index ¶
- Constants
- func DeleteTaint(taints []corev1.Taint, taintToDelete *corev1.Taint) ([]corev1.Taint, bool)
- func DeleteTaintsByKey(taints []corev1.Taint, taintKey string) ([]corev1.Taint, bool)
- func ParseTaints(spec []string) (taintsToAdd, taintsToRemove []corev1.Taint, err error)
- func ReorganizeTaints(node *corev1.Node, overwrite bool, taintsToAdd, taintsToRemove []corev1.Taint) (string, []corev1.Taint, error)
- func TaintExists(taints []corev1.Taint, taintToFind *corev1.Taint) bool
- func TaintSetDiff(t1, t2 []corev1.Taint) (taintsToAdd, taintsToRemove []*corev1.Taint)
Constants ¶
const ( MODIFIED = "modified" TAINTED = "tainted" UNTAINTED = "untainted" )
consts that are returned by ReorganizeTaints that tell the caller the summary of what's been done to the node's taints (added, removed, just updated).
Variables ¶
This section is empty.
Functions ¶
func DeleteTaint ¶
DeleteTaint removes all the taints that have the same key and effect to given taintToDelete.
func DeleteTaintsByKey ¶
DeleteTaintsByKey removes all the taints that have the same key to given taintKey.
func ParseTaints ¶
ParseTaints takes a spec which is an array and creates slices for new taints to be added, taints to be deleted. It also validates the spec. For example, the form `<key>` may be used to remove a taint, but not to add one.
func ReorganizeTaints ¶
func ReorganizeTaints(node *corev1.Node, overwrite bool, taintsToAdd, taintsToRemove []corev1.Taint) (string, []corev1.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 TaintExists ¶
TaintExists checks if the given taint exists in list of taints. Returns true if exists false otherwise.
Types ¶
This section is empty.