labels

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 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 IsManagedBy

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

IsManagedBy checks whether the given component is managed by K8ssandra, and belongs to the K8ssandraCluster resource specified by klusterKey which specifies the namespace and name of the K8ssandraCluster.

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 ManagedByLabels

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

ManagedByLabels returns the labels used to identify a component managed by K8ssandra. 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 SetManagedBy

func SetManagedBy(component Labeled, klusterKey client.ObjectKey)

SetManagedBy sets the required labels for making a component managed by K8ssandra. 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