labels

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package labels implements label utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLabels added in v1.14.0

func AddLabels(o metav1.Object, desired map[string]string) bool

AddLabels sets the desired labels on the object and returns true if the labels have changed.

func GetManagedLabels added in v1.9.7

func GetManagedLabels(labels map[string]string, additionalSyncMachineLabels ...*regexp.Regexp) map[string]string

GetManagedLabels returns the set of labels managed by CAPI, with an optional list of regex patterns for user-specified labels.

func HasWatchLabel

func HasWatchLabel(o metav1.Object, labelValue string) bool

HasWatchLabel returns true if the object has a label with the WatchLabel key matching the given value.

func IsMachinePoolOwned added in v1.6.0

func IsMachinePoolOwned(o metav1.Object) bool

IsMachinePoolOwned returns true if the object has the `cluster.x-k8s.io/pool-name` label or is owned by a MachinePool.

func IsTopologyOwned added in v0.4.3

func IsTopologyOwned(o metav1.Object) bool

IsTopologyOwned returns true if the object has the `topology.cluster.x-k8s.io/owned` label.

Types

This section is empty.

Directories

Path Synopsis
Package format contains functions to format and compare formatted values used in Kubernetes labels.
Package format contains functions to format and compare formatted values used in Kubernetes labels.

Jump to

Keyboard shortcuts

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