From 2dde6db87f7938354e8954f9e1b23b9efc76a7bf Mon Sep 17 00:00:00 2001 From: Lukas Hankeln Date: Thu, 14 Aug 2025 08:26:54 +0200 Subject: [PATCH] feat(cloudnative-pg): adding commonLabels to all resources Signed-off-by: Lukas Hankeln --- charts/cloudnative-pg/templates/_helpers.tpl | 3 +++ charts/cloudnative-pg/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/charts/cloudnative-pg/templates/_helpers.tpl b/charts/cloudnative-pg/templates/_helpers.tpl index 045b06d9da..f65de2af0c 100644 --- a/charts/cloudnative-pg/templates/_helpers.tpl +++ b/charts/cloudnative-pg/templates/_helpers.tpl @@ -51,6 +51,9 @@ helm.sh/chart: {{ include "cloudnative-pg.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if .Values.commonLabels }} +{{ toYaml .Values.commonLabels }} +{{- end }} {{- end }} {{/* diff --git a/charts/cloudnative-pg/values.yaml b/charts/cloudnative-pg/values.yaml index cbba75053b..1e43be39e2 100644 --- a/charts/cloudnative-pg/values.yaml +++ b/charts/cloudnative-pg/values.yaml @@ -115,6 +115,8 @@ rbac: # -- Annotations to be added to all other resources. commonAnnotations: {} +# -- Labels to be added to all other resources. +commonLabels: {} # -- Annotations to be added to the pod. podAnnotations: {} # -- Labels to be added to the pod.