annotations

package
v0.56.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package annotations implements utilites for working with annotatoins

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOrUpdateAnnotation

func AddOrUpdateAnnotation(node *v1.Node, annotations map[string]string) (*v1.Node, bool, error)

AddOrUpdateAnnotation tries to add an annotation. Returns a new copy of updated Node and true if something was updated false otherwise.

func CreateMachinesTriggeredForDeletionAnnotValue added in v0.56.0

func CreateMachinesTriggeredForDeletionAnnotValue(machineNames []string) string

CreateMachinesTriggeredForDeletionAnnotValue constructs the annotation value for machineutils.TriggerDeletionByMCM from the given machine names.

func DeleteAnnotation

func DeleteAnnotation(nodeAnnotations map[string]string, annotations map[string]string) (map[string]string, bool)

DeleteAnnotation removes the annotation with annotationKey.

func GetMachineNamesTriggeredForDeletion added in v0.56.0

func GetMachineNamesTriggeredForDeletion(mcd *v1alpha1.MachineDeployment) []string

GetMachineNamesTriggeredForDeletion returns the set of machine names contained within the machineutils.TriggerDeletionByMCM annotation on the given MachineDeployment

func RemoveAnnotation

func RemoveAnnotation(node *v1.Node, annotations map[string]string) (*v1.Node, bool, error)

RemoveAnnotation tries to remove an annotation from annotations list. Returns a new copy of updated Node and true if something was updated false otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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