labels

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 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 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 IsOwnedByK8ssandraController

func IsOwnedByK8ssandraController(component Labeled) bool

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

func IsPartOf

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

IsPartOf returns true if this component was created by the k8ssandra-cluster controller, and belongs to the K8ssandraCluster resource specified by klusterKey. klusterKey refers to the namespace and name of the K8ssandraCluster.

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 PartOfLabels

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

PartOfLabels returns the labels used to identify a component created by the k8ssandra-cluster controller, and belonging to the K8ssandraCluster resource specified by klusterKey, which is 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