From 879dc0f5f0977e2b8283ef0b52133f0a40caf787 Mon Sep 17 00:00:00 2001 From: Juan Ariza Toledano Date: Tue, 22 Aug 2023 17:24:05 +0200 Subject: [PATCH] [bitnami/sealed-secrets] Support for customizing standard labels (#18439) --- bitnami/sealed-secrets/Chart.lock | 6 ++-- bitnami/sealed-secrets/Chart.yaml | 2 +- .../sealed-secrets/templates/clusterrole.yaml | 5 +--- .../templates/clusterrolebinding.yaml | 5 +--- .../sealed-secrets/templates/deployment.yaml | 29 +++++-------------- bitnami/sealed-secrets/templates/ingress.yaml | 14 ++------- .../templates/networkpolicy.yaml | 10 +++---- .../templates/psp-clusterrole.yaml | 5 +--- .../templates/psp-clusterrolebinding.yaml | 5 +--- bitnami/sealed-secrets/templates/psp.yaml | 5 +--- bitnami/sealed-secrets/templates/role.yaml | 10 ++----- .../sealed-secrets/templates/rolebinding.yaml | 10 ++----- bitnami/sealed-secrets/templates/service.yaml | 17 ++++------- .../templates/serviceaccount.yaml | 14 ++------- .../templates/servicemonitor.yaml | 26 +++++------------ .../sealed-secrets/templates/tls-secret.yaml | 10 ++----- 16 files changed, 45 insertions(+), 128 deletions(-) diff --git a/bitnami/sealed-secrets/Chart.lock b/bitnami/sealed-secrets/Chart.lock index fe33629dde..b3cb3effd1 100644 --- a/bitnami/sealed-secrets/Chart.lock +++ b/bitnami/sealed-secrets/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-17T11:42:08.840843547Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:32:14.664689+02:00" diff --git a/bitnami/sealed-secrets/Chart.yaml b/bitnami/sealed-secrets/Chart.yaml index bbf6516448..be2d7b94a3 100644 --- a/bitnami/sealed-secrets/Chart.yaml +++ b/bitnami/sealed-secrets/Chart.yaml @@ -28,4 +28,4 @@ maintainers: name: sealed-secrets sources: - https://github.com/bitnami/charts/tree/main/bitnami/sealed-secrets -version: 1.4.12 +version: 1.5.0 diff --git a/bitnami/sealed-secrets/templates/clusterrole.yaml b/bitnami/sealed-secrets/templates/clusterrole.yaml index 8d41a9db0e..d3393b08c5 100644 --- a/bitnami/sealed-secrets/templates/clusterrole.yaml +++ b/bitnami/sealed-secrets/templates/clusterrole.yaml @@ -8,10 +8,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRole metadata: name: {{ printf "%s-unsealer" (include "common.names.fullname.namespace" .) }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/clusterrolebinding.yaml b/bitnami/sealed-secrets/templates/clusterrolebinding.yaml index a49a12d59a..94510b424a 100644 --- a/bitnami/sealed-secrets/templates/clusterrolebinding.yaml +++ b/bitnami/sealed-secrets/templates/clusterrolebinding.yaml @@ -8,10 +8,7 @@ kind: ClusterRoleBinding apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ template "common.names.fullname.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/deployment.yaml b/bitnami/sealed-secrets/templates/deployment.yaml index c6321a0412..a1b8d6aafd 100644 --- a/bitnami/sealed-secrets/templates/deployment.yaml +++ b/bitnami/sealed-secrets/templates/deployment.yaml @@ -8,10 +8,7 @@ kind: Deployment metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -19,26 +16,16 @@ spec: {{- if .Values.updateStrategy }} strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} template: metadata: {{- if or .Values.podAnnotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.podAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} - {{- end }} + {{- $annotations := merge .ValuespodAnnotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} spec: serviceAccountName: {{ template "sealed-secrets.serviceAccountName" . }} {{- include "sealed-secrets.imagePullSecrets" . | nindent 6 }} @@ -49,8 +36,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.nodeSelector }} diff --git a/bitnami/sealed-secrets/templates/ingress.yaml b/bitnami/sealed-secrets/templates/ingress.yaml index fdcc0e8a5b..a857b332f6 100644 --- a/bitnami/sealed-secrets/templates/ingress.yaml +++ b/bitnami/sealed-secrets/templates/ingress.yaml @@ -9,18 +9,10 @@ kind: Ingress metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.ingress.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.ingress.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingress.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.ingress.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} diff --git a/bitnami/sealed-secrets/templates/networkpolicy.yaml b/bitnami/sealed-secrets/templates/networkpolicy.yaml index 2e8aa9e417..d8f37c1424 100644 --- a/bitnami/sealed-secrets/templates/networkpolicy.yaml +++ b/bitnami/sealed-secrets/templates/networkpolicy.yaml @@ -9,16 +9,14 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} policyTypes: - Ingress ingress: @@ -31,6 +29,6 @@ spec: matchLabels: {{ include "common.names.fullname" . }}-client: "true" - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} {{- end }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/psp-clusterrole.yaml b/bitnami/sealed-secrets/templates/psp-clusterrole.yaml index 770a78a738..e8d243b49c 100644 --- a/bitnami/sealed-secrets/templates/psp-clusterrole.yaml +++ b/bitnami/sealed-secrets/templates/psp-clusterrole.yaml @@ -8,10 +8,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRole metadata: name: {{ printf "%s-psp" (include "common.names.fullname.namespace" .) }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/psp-clusterrolebinding.yaml b/bitnami/sealed-secrets/templates/psp-clusterrolebinding.yaml index 89c6c56bbe..c41ad100f1 100644 --- a/bitnami/sealed-secrets/templates/psp-clusterrolebinding.yaml +++ b/bitnami/sealed-secrets/templates/psp-clusterrolebinding.yaml @@ -8,10 +8,7 @@ kind: ClusterRoleBinding apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ printf "%s-psp" (include "common.names.fullname.namespace" .) }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/psp.yaml b/bitnami/sealed-secrets/templates/psp.yaml index a0b5324947..ab712e8c07 100644 --- a/bitnami/sealed-secrets/templates/psp.yaml +++ b/bitnami/sealed-secrets/templates/psp.yaml @@ -9,10 +9,7 @@ kind: PodSecurityPolicy metadata: name: {{ template "common.names.fullname.namespace" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/role.yaml b/bitnami/sealed-secrets/templates/role.yaml index 41ececef4b..b5cfa63fa6 100644 --- a/bitnami/sealed-secrets/templates/role.yaml +++ b/bitnami/sealed-secrets/templates/role.yaml @@ -9,10 +9,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ printf "%s-key-admin" (include "common.names.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -41,10 +38,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ printf "%s-service-proxier" (include "common.names.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/rolebinding.yaml b/bitnami/sealed-secrets/templates/rolebinding.yaml index 1249083ff9..5be99797eb 100644 --- a/bitnami/sealed-secrets/templates/rolebinding.yaml +++ b/bitnami/sealed-secrets/templates/rolebinding.yaml @@ -9,10 +9,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ printf "%s-key-admin" (include "common.names.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -30,10 +27,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ printf "%s-service-proxier" (include "common.names.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/service.yaml b/bitnami/sealed-secrets/templates/service.yaml index 5310ac9374..bd4ce2ce27 100644 --- a/bitnami/sealed-secrets/templates/service.yaml +++ b/bitnami/sealed-secrets/templates/service.yaml @@ -8,18 +8,10 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.service.type }} @@ -53,4 +45,5 @@ spec: {{- if .Values.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} diff --git a/bitnami/sealed-secrets/templates/serviceaccount.yaml b/bitnami/sealed-secrets/templates/serviceaccount.yaml index f99850f77c..281c807c78 100644 --- a/bitnami/sealed-secrets/templates/serviceaccount.yaml +++ b/bitnami/sealed-secrets/templates/serviceaccount.yaml @@ -9,18 +9,10 @@ kind: ServiceAccount metadata: name: {{ template "sealed-secrets.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/servicemonitor.yaml b/bitnami/sealed-secrets/templates/servicemonitor.yaml index 390aa714fb..504baa6d5c 100644 --- a/bitnami/sealed-secrets/templates/servicemonitor.yaml +++ b/bitnami/sealed-secrets/templates/servicemonitor.yaml @@ -8,29 +8,17 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "common.names.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace | quote }} - {{- else }} - namespace: {{ include "common.names.namespace" . | quote }} + namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} + {{- if or .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} spec: jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/bitnami/sealed-secrets/templates/tls-secret.yaml b/bitnami/sealed-secrets/templates/tls-secret.yaml index 0f0fec1736..ea4a2151c2 100644 --- a/bitnami/sealed-secrets/templates/tls-secret.yaml +++ b/bitnami/sealed-secrets/templates/tls-secret.yaml @@ -11,10 +11,7 @@ kind: Secret metadata: name: {{ .name }} namespace: {{ include "common.names.namespace" $ | quote }} - labels: {{- include "common.labels.standard" $ | nindent 4 }} - {{- if $.Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} {{- if $.Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -34,10 +31,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ include "common.names.namespace" $ | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }}