Documentation ¶
Overview ¶
Package nodeops is used to provide the node functionalities
Package nodeops is used to provide the node functionalities
Index ¶
- Variables
- func AddOrUpdateCondition(node *v1.Node, condition v1.NodeCondition) *v1.Node
- func AddOrUpdateConditionsOnNode(c clientset.Interface, nodeName string, condition v1.NodeCondition) error
- func AddOrUpdateTaintOnNode(c clientset.Interface, nodeName string, taints ...*v1.Taint) error
- func CloneAndAddCondition(conditions []v1.NodeCondition, condition v1.NodeCondition) []v1.NodeCondition
- func GetNodeCondition(c clientset.Interface, nodeName string, conditionType v1.NodeConditionType) (*v1.NodeCondition, error)
- func PatchNodeTaints(c clientset.Interface, nodeName string, oldNode *v1.Node, newNode *v1.Node) error
- func RemoveTaintOffNode(c clientset.Interface, nodeName string, node *v1.Node, taints ...*v1.Taint) error
- func UpdateNodeConditions(c clientset.Interface, nodeName string, oldNode *v1.Node, newNode *v1.Node) error
- func UpdateNodeTaints(c clientset.Interface, nodeName string, oldNode *v1.Node, newNode *v1.Node) error
Constants ¶
This section is empty.
Variables ¶
var Backoff = wait.Backoff{ Steps: 5, Duration: 100 * time.Millisecond, Jitter: 1.0, }
Backoff is the backoff period used while updating nodes
Functions ¶
func AddOrUpdateCondition ¶
AddOrUpdateCondition adds a condition to the condition list. Returns a new copy of updated Node
func AddOrUpdateConditionsOnNode ¶
func AddOrUpdateConditionsOnNode(c clientset.Interface, nodeName string, condition v1.NodeCondition) error
AddOrUpdateConditionsOnNode adds a condition to the node's status
func AddOrUpdateTaintOnNode ¶
AddOrUpdateTaintOnNode add taints to the node. If taint was added into node, it'll issue API calls to update nodes; otherwise, no API calls. Return error if any.
func CloneAndAddCondition ¶
func CloneAndAddCondition(conditions []v1.NodeCondition, condition v1.NodeCondition) []v1.NodeCondition
CloneAndAddCondition adds condition to the conditions slice if
func GetNodeCondition ¶
func GetNodeCondition(c clientset.Interface, nodeName string, conditionType v1.NodeConditionType) (*v1.NodeCondition, error)
GetNodeCondition get the nodes condition matching the specified type
func PatchNodeTaints ¶
func PatchNodeTaints(c clientset.Interface, nodeName string, oldNode *v1.Node, newNode *v1.Node) error
PatchNodeTaints is for updating the node taints from oldNode to the newNode It makes a TwoWayMergePatch by comparing the two objects It calls the Patch() method to do the final patch
func RemoveTaintOffNode ¶
func RemoveTaintOffNode(c clientset.Interface, nodeName string, node *v1.Node, taints ...*v1.Taint) error
RemoveTaintOffNode is for cleaning up taints temporarily added to node, won't fail if target taint doesn't exist or has been removed. If passed a node it'll check if there's anything to be done, if taint is not present it won't issue any API calls.
Types ¶
This section is empty.