Documentation
¶
Index ¶
- func GetLabels(instanceName string, instanceLabels map[string]string) label
- func Label(instanceName string) label
- func LabelSelector(instanceName string) label
- func ReconcileAndFilterAnnotations(existing map[string]string, defaults ...map[string]string) map[string]string
- func ReconcileAnnotations(existing map[string]string, defaults ...map[string]string) map[string]string
- func ValidateStatefulSetSelector(selector *metav1.LabelSelector, instanceName string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelSelector ¶
func LabelSelector(instanceName string) label
func ReconcileAnnotations ¶
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.