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(ctx context.Context, c clientset.Interface, nodeName string, ...) error
- func AddOrUpdateTaintOnNode(ctx context.Context, c clientset.Interface, nodeName string, ...) error
- func CloneAndAddCondition(conditions []v1.NodeCondition, condition v1.NodeCondition) []v1.NodeCondition
- func GetNodeCondition(ctx context.Context, c clientset.Interface, nodeName string, ...) (*v1.NodeCondition, error)
- func PatchNodeTaints(ctx context.Context, c clientset.Interface, nodeName string, oldNode *v1.Node, ...) error
- func RemoveTaintOffNode(ctx context.Context, c clientset.Interface, nodeName string, node *v1.Node, ...) error
- func UpdateNodeConditions(ctx context.Context, c clientset.Interface, nodeName string, oldNode *v1.Node, ...) error
- func UpdateNodeTaints(ctx context.Context, c clientset.Interface, nodeName string, oldNode *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(ctx context.Context, c clientset.Interface, nodeName string, condition v1.NodeCondition) error
AddOrUpdateConditionsOnNode adds a condition to the node's status
func AddOrUpdateTaintOnNode ¶
func AddOrUpdateTaintOnNode(ctx context.Context, c clientset.Interface, nodeName string, taints ...*v1.Taint) error
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(ctx context.Context, c clientset.Interface, nodeName string, conditionType v1.NodeConditionType) (*v1.NodeCondition, error)
GetNodeCondition get the nodes condition matching the specified type
func PatchNodeTaints ¶
func PatchNodeTaints(ctx context.Context, 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(ctx context.Context, 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.