metadata

package
v2.22.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLabels

func GetLabels(instanceName string, instanceLabels map[string]string) label

func Label

func Label(instanceName string) label

func LabelSelector

func LabelSelector(instanceName string) label

func ReconcileAndFilterAnnotations

func ReconcileAndFilterAnnotations(existing map[string]string, defaults ...map[string]string) map[string]string

func ReconcileAnnotations

func ReconcileAnnotations(existing map[string]string, defaults ...map[string]string) map[string]string

func ValidateStatefulSetSelector added in v2.22.4

func ValidateStatefulSetSelector(selector *metav1.LabelSelector, instanceName string, templateLabelOverrides map[string]string) error

ValidateStatefulSetSelector checks that a StatefulSet selector override is satisfied by the StatefulSet's pod template labels: the operator's own labels (Label(instanceName)) plus any labels added via the pod template's metadata override. A nil selector defaults to the operator's own LabelSelector(instanceName), matching what the StatefulSet builder does when no selector override is present.

Kubernetes requires spec.selector to match spec.template.metadata.labels on every StatefulSet create and update, and rejects a selector that doesn't select on any label (since that would match every pod in the namespace); if either requirement is violated, the API server rejects the object outright. Since the operator regenerates the same StatefulSet on every reconcile, an inconsistent override causes a permanent reconciliation failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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