Documentation ¶
Index ¶
- func AddAnnotations(obj v1.Object, entries map[string]string) error
- func AddLabels(obj v1.Object, entries map[string]string) error
- func CopyAnnotationsByPrefix(source, destination v1.Object, prefix string) error
- func CopyAnnotationsWithPrefixReplacement(source, destination v1.Object, sourcePrefix, destinationPrefix string) error
- func CopyLabelsByPrefix(source, destination v1.Object, prefix string) error
- func CopyLabelsWithPrefixReplacement(source, destination v1.Object, sourcePrefix, destinationPrefix string) error
- func DeleteAnnotation(obj v1.Object, key string) error
- func DeleteLabel(obj v1.Object, key string) error
- func GetAnnotationsWithPrefix(obj v1.Object, prefix string) (map[string]string, error)
- func GetLabelsWithPrefix(obj v1.Object, prefix string) (map[string]string, error)
- func HasAnnotation(obj v1.Object, key string) bool
- func HasAnnotationWithValue(obj v1.Object, key, value string) bool
- func HasLabel(obj v1.Object, key string) bool
- func HasLabelWithValue(obj v1.Object, key, value string) bool
- func SetAnnotation(obj v1.Object, key string, value string) error
- func SetLabel(obj v1.Object, key string, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAnnotations ¶
AddAnnotations copies the map into the resource's Annotations map. When the destination map is nil, then the map will be created. The unexported function addEntries is called with args passed.
func AddLabels ¶
AddLabels copies the map into the resource's Labels map. When the destination map is nil, then the map will be created. The unexported function addEntries is called with args passed.
func CopyAnnotationsByPrefix ¶
CopyAnnotationsByPrefix copies all annotations from a source object to a destination object where the key matches the specified sourcePrefix.
func CopyAnnotationsWithPrefixReplacement ¶
func CopyAnnotationsWithPrefixReplacement(source, destination v1.Object, sourcePrefix, destinationPrefix string) error
CopyAnnotationsWithPrefixReplacement copies all annotations from a source object to a destination object where the key matches the specified sourcePrefix. The source prefix will be replaced with the destination prefix.
func CopyLabelsByPrefix ¶
CopyLabelsByPrefix copies all labels from a source object to a destination object where the key matches the specified sourcePrefix.
func CopyLabelsWithPrefixReplacement ¶
func CopyLabelsWithPrefixReplacement(source, destination v1.Object, sourcePrefix, destinationPrefix string) error
CopyLabelsWithPrefixReplacement copies all labels from a source object to a destination object where the key matches the specified sourcePrefix. If destinationPrefix is different from sourcePrefix, the sourcePrefix will be replaced while performing the copy.
func DeleteAnnotation ¶
DeleteAnnotation deletes the annotation specified by name from the referenced object. If the annotation doesn't exist it's a no-op.
func DeleteLabel ¶
DeleteLabel deletes the label specified by name from the referenced object. If the label doesn't exist it's a no-op.
func GetAnnotationsWithPrefix ¶
GetAnnotationsWithPrefix is a method that returns a map of key/value pairs matching a prefix string. The unexported function filterByPrefix is called with args passed.
func GetLabelsWithPrefix ¶
GetLabelsWithPrefix is a method that returns a map of key/value pairs matching a prefix string. The unexported function filterByPrefix is called with args passed.
func HasAnnotation ¶
HasAnnotation checks whether a given annotation exists or not.
func HasAnnotationWithValue ¶
HasAnnotationWithValue checks if an annotation exists and has the given value.
func HasLabelWithValue ¶
HasLabelWithValue checks if a label exists and has the given value.
func SetAnnotation ¶
SetAnnotation adds a new annotation to the referenced object or updates its value if it already exists.
Types ¶
This section is empty.