labels

package
v1.2.5-dev11 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0, BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLabel

func AddLabel(labels map[string]string, labelKey, labelValue string) map[string]string

AddLabel returns a map with the given key and value added to the given map.

func AddLabelToSelector

func AddLabelToSelector(selector *metav1.LabelSelector, labelKey, labelValue string) *metav1.LabelSelector

AddLabelToSelector returns a selector with the given key and value added to the given selector's MatchLabels.

func CloneAndAddLabel

func CloneAndAddLabel(labels map[string]string, labelKey, labelValue string) map[string]string

CloneAndAddLabel the given map and returns a new map with the given key and value added. Returns the given map, if labelKey is empty.

func CloneAndRemoveLabel

func CloneAndRemoveLabel(labels map[string]string, labelKey string) map[string]string

CloneAndRemoveLabel clones the given map and returns a new map with the given key removed. Returns the given map, if labelKey is empty.

func CloneSelectorAndAddLabel

func CloneSelectorAndAddLabel(selector *metav1.LabelSelector, labelKey, labelValue string) *metav1.LabelSelector

CloneSelectorAndAddLabel the given selector and returns a new selector with the given key and value added. Returns the given selector, if labelKey is empty.

func SelectorHasLabel

func SelectorHasLabel(selector *metav1.LabelSelector, labelKey string) bool

SelectorHasLabel checks if the given selector contains the given label key in its MatchLabels

Types

This section is empty.

Jump to

Keyboard shortcuts

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