Documentation ¶
Overview ¶
package taints implements utilities for working with taints
Index ¶
- Constants
- func AddOrUpdateTaint(node *v1.Node, taint *v1.Taint) (*v1.Node, bool, error)
- func CheckIfTaintsAlreadyExists(oldTaints []v1.Taint, taints []v1.Taint) string
- func DeleteTaint(taints []v1.Taint, taintToDelete *v1.Taint) ([]v1.Taint, bool)
- func DeleteTaintsByKey(taints []v1.Taint, taintKey string) ([]v1.Taint, bool)
- func NewTaintsVar(ptr *[]api.Taint) taintsVar
- func ParseTaints(spec []string) ([]v1.Taint, []v1.Taint, error)
- func RemoveTaint(node *v1.Node, taint *v1.Taint) (*v1.Node, bool, error)
- func ReorganizeTaints(node *v1.Node, overwrite bool, taintsToAdd []v1.Taint, ...) (string, []v1.Taint, error)
- func TaintExists(taints []v1.Taint, taintToFind *v1.Taint) bool
- func TaintSetDiff(t1, t2 []v1.Taint) (taintsToAdd []*v1.Taint, taintsToRemove []*v1.Taint)
- func TaintSetFilter(taints []v1.Taint, fn func(*v1.Taint) bool) []v1.Taint
Constants ¶
const ( MODIFIED = "modified" TAINTED = "tainted" UNTAINTED = "untainted" )
Variables ¶
This section is empty.
Functions ¶
func AddOrUpdateTaint ¶ added in v1.8.8
AddOrUpdateTaint tries to add a taint to annotations list. Returns a new copy of updated Node and true if something was updated false otherwise.
func CheckIfTaintsAlreadyExists ¶ added in v1.8.8
CheckIfTaintsAlreadyExists checks if the node already has taints that we want to add and returns a string with taint keys.
func DeleteTaint ¶ added in v1.8.8
DeleteTaint removes all the taints that have the same key and effect to given taintToDelete.
func DeleteTaintsByKey ¶ added in v1.8.8
DeleteTaintsByKey removes all the taints that have the same key to given taintKey
func NewTaintsVar ¶
NewTaintsVar wraps []api.Taint in a struct that implements flag.Value to allow taints to be bound to command line flags.
func ParseTaints ¶ added in v1.8.8
ParseTaints takes a spec which is an array and creates slices for new taints to be added, taints to be deleted.
func RemoveTaint ¶ added in v1.8.8
RemoveTaint tries to remove a taint from annotations list. Returns a new copy of updated Node and true if something was updated false otherwise.
func ReorganizeTaints ¶ added in v1.8.8
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 TaintExists ¶ added in v1.8.8
TaintExists checks if the given taint exists in list of taints. Returns true if exists false otherwise.
func TaintSetDiff ¶ added in v1.8.8
Types ¶
This section is empty.