metadata

package
v0.0.0-...-e561cac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VersionAnnotation indicates the version of WMCO that configured the node
	VersionAnnotation = "windowsmachineconfig.openshift.io/version"
	// DesiredVersionAnnotation is a Node annotation, indicating the Service ConfigMap that should be used to configure it
	DesiredVersionAnnotation = "windowsmachineconfig.openshift.io/desired-version"
	// RebootAnnotation indicates the node's underlying instance needs to be restarted
	RebootAnnotation = "windowsmachineconfig.openshift.io/reboot-required"
	// UpgradingLabel indicates the node's underlying instance is performing an upgrade
	UpgradingLabel = "windowsmachineconfig.openshift.io/upgrading"
)

Variables

This section is empty.

Functions

func ApplyDesiredVersionAnnotation

func ApplyDesiredVersionAnnotation(ctx context.Context, c client.Client, node core.Node, value string) error

ApplyDesiredVersionAnnotation applies this operator's version as the desired version annotation to the given Node

func ApplyLabelsAndAnnotations

func ApplyLabelsAndAnnotations(ctx context.Context, c client.Client, node core.Node, labels, annotations map[string]string) error

ApplyLabelsAndAnnotations applies all the given annotations to the given Node resource

func ApplyRebootAnnotation

func ApplyRebootAnnotation(ctx context.Context, c client.Client, node core.Node) error

ApplyRebootAnnotation applies an annotation to the given Node communicating that the instance needs to be restarted

func ApplyUpgradingLabel

func ApplyUpgradingLabel(ctx context.Context, c client.Client, node *core.Node) error

ApplyUpgradingLabel applies the upgrading label to the given node reference indicating the instance is performing an upgrade

func ApplyVersionAnnotation

func ApplyVersionAnnotation(ctx context.Context, c client.Client, node core.Node, value string) error

ApplyVersionAnnotation applies this operator's version as the version annotation to the given Node

func GenerateAddPatch

func GenerateAddPatch(labels, annotations map[string]string) ([]byte, error)

GenerateAddPatch creates a comma-separated list of operations to add all given labels and annotations from an object An "add" patch overwrites existing value if a label or annotation already exists

func GenerateRemovePatch

func GenerateRemovePatch(labels, annotations []string) ([]byte, error)

GenerateRemovePatch creates a comma-separated list of operations to remove all given labels and annotations from an object. A "remove" patch fails transactionally if any of the annotations do not exist.

func RemoveRebootAnnotation

func RemoveRebootAnnotation(ctx context.Context, c client.Client, node core.Node) error

RemoveVersionAnnotation clears the reboot annotation from the node, indicating the instance no longer needs a restart

func RemoveUpgradingLabel

func RemoveUpgradingLabel(ctx context.Context, c client.Client, node *core.Node) error

RemoveUpgradingLabel clears the upgrading label from the node reference, indicating the instance is no longer upgrading

func RemoveVersionAnnotation

func RemoveVersionAnnotation(ctx context.Context, c client.Client, node core.Node) error

RemoveVersionAnnotation clears the version annotation from the node object, indicating the node is not configured

func WaitForRebootAnnotationRemoval

func WaitForRebootAnnotationRemoval(ctx context.Context, c client.Client, nodeName string) error

WaitForRebootAnnotationRemoval waits for the reboot annotation to be cleared from the node

func WaitForVersionAnnotation

func WaitForVersionAnnotation(ctx context.Context, c client.Client, nodeName string) error

WaitForVersionAnnotation checks if the node object has equivalent version and desiredVersion annotations. Waits for retry.Interval seconds and returns an error if the version annotation does not appear in that time frame.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL