labels

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLabel

func AddLabel(obj Labeled, labelKey string, labelValue string)

func CleanedUpByLabels added in v1.8.0

func CleanedUpByLabels(klusterKey client.ObjectKey) map[string]string

CleanedUpByLabels returns the labels used to indicate that a component should be cleaned up by the k8ssandra-cluster controller when the given K8ssandraCluster is deleted. (This is only used for cross-context references, when ownerReferences cannot be used).

func GetLabel

func GetLabel(component Labeled, labelKey string) string

func HasLabel

func HasLabel(component Labeled, labelKey string) bool

func HasLabelWithValue

func HasLabelWithValue(component Labeled, labelKey string, labelValue string) bool

func IsCleanedUpBy added in v1.8.0

func IsCleanedUpBy(component Labeled, klusterKey client.ObjectKey) bool

IsCleanedUpBy returns whether this component is labelled to be cleaned up by the k8ssandra-cluster controller when the given K8ssandraCluster is deleted.

func IsOwnedByK8ssandraController

func IsOwnedByK8ssandraController(component Labeled) bool

IsOwnedByK8ssandraController returns true if this component was created by the k8ssandra-cluster controller.

func IsReplicatedBy added in v1.6.0

func IsReplicatedBy(component Labeled, klusterKey client.ObjectKey) bool

IsReplicatedBy checks whether the given component (which in practice will be Secret) is selectable by a ReplicatedSecret for the given K8ssandraCluster. klusterKey specifies the namespace and name of the K8ssandraCluster.

func IsWatchedByK8ssandraCluster added in v1.6.0

func IsWatchedByK8ssandraCluster(component Labeled, klusterKey client.ObjectKey) bool

IsWatchedByK8ssandraCluster checks whether the given component is watched by a K8ssandraCluster. klusterKey specifies the namespace and name of the K8ssandraCluster.

func ReplicatedByLabels added in v1.6.0

func ReplicatedByLabels(klusterKey client.ObjectKey) map[string]string

ReplicatedByLabels returns the labels used to make a Secret selectable by a ReplicatedSecret for the given K8ssandraCluster. klusterKey specifies the namespace and name of the K8ssandraCluster.

func SetReplicatedBy added in v1.6.0

func SetReplicatedBy(component Labeled, klusterKey client.ObjectKey)

SetReplicatedBy sets the required labels that make a Secret selectable by a ReplicatedSecret for a given K8ssandraCluster. klusterKey specifies the namespace and name of the K8ssandraCluster.

func SetWatchedByK8ssandraCluster added in v1.6.0

func SetWatchedByK8ssandraCluster(component Labeled, klusterKey client.ObjectKey)

SetWatchedByK8ssandraCluster sets the required labels for making a component watched by the K8ssandraCluster, i.e. a modification of the component will trigger a reconciliation loop in K8ssandraClusterReconciler. klusterKey specifies the namespace and name of the K8ssandraCluster.

func WatchedByK8ssandraClusterLabels added in v1.6.0

func WatchedByK8ssandraClusterLabels(klusterKey client.ObjectKey) map[string]string

WatchedByK8ssandraClusterLabels returns the labels used to make a component watched by a K8ssandraCluster. klusterKey specifies the namespace and name of the K8ssandraCluster.

Types

type Labeled

type Labeled interface {
	GetLabels() map[string]string
	SetLabels(labels map[string]string)
}

Jump to

Keyboard shortcuts

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