From a2c4b015dfb67291631880dd482108c653171685 Mon Sep 17 00:00:00 2001 From: Massimo Pavoni Date: Tue, 16 Jun 2026 23:48:25 +0200 Subject: [PATCH] fix(cloudnative-pg): set deployment label selector env var to cloudnative-pg.name (#351) Allow for nameOverride and fullnameOverride to change the deployment name without causing an operator crash by specifying the DEPLOYMENT_LABEL_SELECTOR env var introduced by cloudnative-pg/cloudnative-pg#10965 --- charts/cloudnative-pg/templates/deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/cloudnative-pg/templates/deployment.yaml b/charts/cloudnative-pg/templates/deployment.yaml index c17e6a7493..76b0c52496 100644 --- a/charts/cloudnative-pg/templates/deployment.yaml +++ b/charts/cloudnative-pg/templates/deployment.yaml @@ -81,6 +81,8 @@ spec: command: - /manager env: + - name: DEPLOYMENT_LABEL_SELECTOR + value: "app.kubernetes.io/name={{ include "cloudnative-pg.name" . }}" - name: OPERATOR_IMAGE_NAME value: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - name: OPERATOR_NAMESPACE