Documentation ¶
Index ¶
- func AddOrUpdateTaint(cluster *clusterapi.ManagedCluster, taint *v1.Taint) (*clusterapi.ManagedCluster, bool, error)
- func DeleteTaint(taints []v1.Taint, taintToDelete *v1.Taint) ([]v1.Taint, bool)
- func RemoveTaint(cluster *clusterapi.ManagedCluster, taint *v1.Taint) (*clusterapi.ManagedCluster, bool, error)
- func TaintExists(taints []v1.Taint, taintToFind *v1.Taint) bool
- func TaintSetDiff(taintsNew, taintsOld []v1.Taint) (taintsToAdd []*v1.Taint, taintsToRemove []*v1.Taint)
- func TaintSetFilter(taints []v1.Taint, fn func(*v1.Taint) bool) []v1.Taint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOrUpdateTaint ¶
func AddOrUpdateTaint(cluster *clusterapi.ManagedCluster, taint *v1.Taint) (*clusterapi.ManagedCluster, bool, error)
AddOrUpdateTaint tries to add a taint to annotations list. Returns a new copy of updated Cluster and true if something was updated false otherwise.
func DeleteTaint ¶
DeleteTaint removes all the taints that have the same key and effect to given taintToDelete.
func RemoveTaint ¶
func RemoveTaint(cluster *clusterapi.ManagedCluster, taint *v1.Taint) (*clusterapi.ManagedCluster, bool, error)
RemoveTaint tries to remove a taint from annotations list. Returns a new copy of updated Cluster and true if something was updated false otherwise.
func TaintExists ¶
TaintExists checks if the given taint exists in list of taints. Returns true if exists false otherwise.
func TaintSetDiff ¶
func TaintSetDiff(taintsNew, taintsOld []v1.Taint) (taintsToAdd []*v1.Taint, taintsToRemove []*v1.Taint)
TaintSetDiff finds the difference between two taint slices and returns all new and removed elements of the new slice relative to the old slice. for example: input: taintsNew=[a b] taintsOld=[a c] output: taintsToAdd=[b] taintsToRemove=[c]
Types ¶
This section is empty.