Documentation ¶
Index ¶
- Constants
- func ApplyDesiredVersionAnnotation(ctx context.Context, c client.Client, node core.Node, value string) error
- func ApplyLabelsAndAnnotations(ctx context.Context, c client.Client, node core.Node, ...) error
- func ApplyRebootAnnotation(ctx context.Context, c client.Client, node core.Node) error
- func ApplyUpgradingLabel(ctx context.Context, c client.Client, node *core.Node) error
- func ApplyVersionAnnotation(ctx context.Context, c client.Client, node core.Node, value string) error
- func GenerateAddPatch(labels, annotations map[string]string) ([]byte, error)
- func GenerateRemovePatch(labels, annotations []string) ([]byte, error)
- func RemoveRebootAnnotation(ctx context.Context, c client.Client, node core.Node) error
- func RemoveUpgradingLabel(ctx context.Context, c client.Client, node *core.Node) error
- func RemoveVersionAnnotation(ctx context.Context, c client.Client, node core.Node) error
- func WaitForRebootAnnotationRemoval(ctx context.Context, c client.Client, nodeName string) error
- func WaitForVersionAnnotation(ctx context.Context, c client.Client, nodeName string) error
Constants ¶
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 ¶
ApplyRebootAnnotation applies an annotation to the given Node communicating that the instance needs to be restarted
func ApplyUpgradingLabel ¶
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 ¶
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 ¶
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 ¶
RemoveVersionAnnotation clears the reboot annotation from the node, indicating the instance no longer needs a restart
func RemoveUpgradingLabel ¶
RemoveUpgradingLabel clears the upgrading label from the node reference, indicating the instance is no longer upgrading
func RemoveVersionAnnotation ¶
RemoveVersionAnnotation clears the version annotation from the node object, indicating the node is not configured
func WaitForRebootAnnotationRemoval ¶
WaitForRebootAnnotationRemoval waits for the reboot annotation to be cleared from the node
func WaitForVersionAnnotation ¶
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.