Documentation
¶
Index ¶
- type K8SLabelKey
- type Labels
- func (l Labels) AsK8sLabelSelector() *metav1.LabelSelector
- func (l Labels) Component(value string) Labels
- func (l Labels) Get(label string) string
- func (l Labels) Has(label string) bool
- func (l Labels) Instance(value string) Labels
- func (l Labels) ManagedBy(value string) Labels
- func (l Labels) Name(value string) Labels
- func (l Labels) Set(label, value string)
- func (l Labels) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type K8SLabelKey ¶
type K8SLabelKey string
K8SlabelKey is the commonly used labels as kubernetes docs defines. https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
var ( // NameLabelKey is the name of the application. NameLabelKey K8SLabelKey = "app.kubernetes.io/name" // InstanceLabelKey is a unique name identifying the instance of an application. InstanceLabelKey K8SLabelKey = "app.kubernetes.io/instance" // ManagedByLabelKey represents the tool being used to manage the operation of an application. ManagedByLabelKey K8SLabelKey = "app.kubernetes.io/managed-by" // ComponentLabelKey is the component within the architecture ComponentLabelKey K8SLabelKey = "app.kubernetes.io/component" )
type Labels ¶
Labels is the standard type to manage labels for the operator.
func NewLabelSet ¶
func NewLabelSet() Labels
NewLabels returns a new Labels type to which type can be associated.
func (Labels) AsK8sLabelSelector ¶
func (l Labels) AsK8sLabelSelector() *metav1.LabelSelector
AsK8sLabelSelector returns label selector from Label set type.
Click to show internal directories.
Click to hide internal directories.