kubernetes

Per-resource node lifecycle ops.

Added in version 2.1.0.

Dormant on stock Salt — see saltext.kubernetes.resources.kubernetes.

saltext.kubernetes.modules.kuberesource_node.cordon()[source]

Cordon the active Node resource.

CLI Example:

salt '*' kuberesource_node.cordon
saltext.kubernetes.modules.kuberesource_node.uncordon()[source]

Uncordon the active Node resource.

CLI Example:

salt '*' kuberesource_node.uncordon
saltext.kubernetes.modules.kuberesource_node.drain(ignore_daemonsets=True, delete_emptydir_data=False, disable_eviction=False, force=False, grace_period_seconds=None, timeout=300)[source]

Drain the active Node resource.

CLI Example:

salt '*' kuberesource_node.drain
saltext.kubernetes.modules.kuberesource_node.taint(key, effect, value=None)[source]

Add (or replace) a taint on the active Node resource.

CLI Example:

salt '*' kuberesource_node.taint
saltext.kubernetes.modules.kuberesource_node.untaint(key, effect=None)[source]

Remove a taint from the active Node resource.

key

Taint key to remove.

effect

Optional effect filter. When None every taint matching the key is removed regardless of effect.

CLI Example:

salt '*' kuberesource_node.untaint
saltext.kubernetes.modules.kuberesource_node.annotations()[source]

Return the annotations on the active Node resource.

Added in version 2.1.0.

CLI Example:

salt '*' kuberesource_node.annotations
saltext.kubernetes.modules.kuberesource_node.add_annotation(annotation_name, annotation_value)[source]

Set or update an annotation on the active Node resource.

Added in version 2.1.0.

annotation_name

Annotation key. May contain / to namespace the key.

annotation_value

Annotation value. Coerced to str by the underlying kubernetes.node_add_annotation call.

CLI Example:

salt '*' kuberesource_node.add_annotation             annotation_name=example.com/owner annotation_value=ops
saltext.kubernetes.modules.kuberesource_node.remove_annotation(annotation_name)[source]

Remove an annotation from the active Node resource.

Added in version 2.1.0.

Removing an annotation that is not present is a no-op (no error raised).

annotation_name

Annotation key to remove.

CLI Example:

salt '*' kuberesource_node.remove_annotation             annotation_name=example.com/owner