MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / LabelClusterName

Function LabelClusterName

pkg/utils/labels_annotations.go:393–399  ·  view source on GitHub ↗

LabelClusterName labels the object with the cluster name

(object *metav1.ObjectMeta, name string)

Source from the content-addressed store, hash-verified

391
392// LabelClusterName labels the object with the cluster name
393func LabelClusterName(object *metav1.ObjectMeta, name string) {
394 if object.Labels == nil {
395 object.Labels = make(map[string]string)
396 }
397
398 object.Labels[ClusterLabelName] = name
399}
400
401// SetOperatorVersion set inside a certain object metadata the annotation
402// containing the version of the operator that generated the object

Callers 3

createBackupFunction · 0.92
SetInheritedDataMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected