From 4599d9b70f48d1971815cf21b1df8bc372b5dae2 Mon Sep 17 00:00:00 2001 From: Juan Ariza Toledano Date: Fri, 25 Aug 2023 11:20:37 +0200 Subject: [PATCH] [bitnami/elasticsearch] Support for customizing standard labels (#18484) --- bitnami/elasticsearch/Chart.lock | 8 ++-- bitnami/elasticsearch/Chart.yaml | 2 +- .../elasticsearch/templates/configmap.yaml | 5 +-- .../templates/coordinating/hpa.yaml | 5 +-- .../templates/coordinating/pdb.yaml | 8 ++-- .../coordinating/serviceaccount.yaml | 14 ++----- .../templates/coordinating/statefulset.yaml | 26 ++++--------- .../templates/coordinating/svc-headless.yaml | 8 ++-- bitnami/elasticsearch/templates/data/hpa.yaml | 5 +-- bitnami/elasticsearch/templates/data/pdb.yaml | 8 ++-- .../templates/data/serviceaccount.yaml | 14 ++----- .../templates/data/statefulset.yaml | 37 ++++++------------- .../templates/data/svc-headless.yaml | 8 ++-- .../elasticsearch/templates/ingest/hpa.yaml | 5 +-- .../templates/ingest/ingress.yaml | 14 ++----- .../elasticsearch/templates/ingest/pdb.yaml | 8 ++-- .../templates/ingest/service.yaml | 19 ++++------ .../templates/ingest/serviceaccount.yaml | 14 ++----- .../templates/ingest/statefulset.yaml | 26 ++++--------- .../templates/ingest/svc-headless.yaml | 8 ++-- .../templates/ingress-tls-secrets.yaml | 20 ++-------- bitnami/elasticsearch/templates/ingress.yaml | 14 ++----- .../templates/initialization-configmap.yaml | 5 +-- .../elasticsearch/templates/master/hpa.yaml | 5 +-- .../elasticsearch/templates/master/pdb.yaml | 8 ++-- .../templates/master/serviceaccount.yaml | 14 ++----- .../templates/master/statefulset.yaml | 37 ++++++------------- .../templates/master/svc-headless.yaml | 8 ++-- .../templates/metrics/deployment.yaml | 28 +++++--------- .../templates/metrics/prometheusrule.yaml | 5 +-- .../templates/metrics/service.yaml | 16 ++++---- .../templates/metrics/servicemonitor.yaml | 11 ++---- bitnami/elasticsearch/templates/secrets.yaml | 10 +---- bitnami/elasticsearch/templates/service.yaml | 18 +++------ .../elasticsearch/templates/tls-secret.yaml | 20 ++-------- 35 files changed, 137 insertions(+), 324 deletions(-) diff --git a/bitnami/elasticsearch/Chart.lock b/bitnami/elasticsearch/Chart.lock index bfbc30054f..a207701345 100644 --- a/bitnami/elasticsearch/Chart.lock +++ b/bitnami/elasticsearch/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: kibana repository: oci://registry-1.docker.io/bitnamicharts - version: 10.4.8 + version: 10.5.0 - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:fc89b1d30caf7196ce7c54c9ca565372a69483ddd84258f47179b199ed22a008 -generated: "2023-08-17T12:05:48.202683481Z" + version: 2.9.0 +digest: sha256:5b4f425b55a10777388e1a6c9e3e00e09fe454e20664a36839237b63f9ff0e07 +generated: "2023-08-23T16:03:28.34726+02:00" diff --git a/bitnami/elasticsearch/Chart.yaml b/bitnami/elasticsearch/Chart.yaml index 53a40fe590..4ac0ac2173 100644 --- a/bitnami/elasticsearch/Chart.yaml +++ b/bitnami/elasticsearch/Chart.yaml @@ -34,4 +34,4 @@ maintainers: name: elasticsearch sources: - https://github.com/bitnami/charts/tree/main/bitnami/elasticsearch -version: 19.10.9 +version: 19.11.0 diff --git a/bitnami/elasticsearch/templates/configmap.yaml b/bitnami/elasticsearch/templates/configmap.yaml index 9a74625dd1..7f96c69282 100644 --- a/bitnami/elasticsearch/templates/configmap.yaml +++ b/bitnami/elasticsearch/templates/configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap 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 }} diff --git a/bitnami/elasticsearch/templates/coordinating/hpa.yaml b/bitnami/elasticsearch/templates/coordinating/hpa.yaml index 4860d52faa..022398475d 100644 --- a/bitnami/elasticsearch/templates/coordinating/hpa.yaml +++ b/bitnami/elasticsearch/templates/coordinating/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "elasticsearch.coordinating.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: coordinating-only - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/elasticsearch/templates/coordinating/pdb.yaml b/bitnami/elasticsearch/templates/coordinating/pdb.yaml index bfb11c2106..63d318e3f8 100644 --- a/bitnami/elasticsearch/templates/coordinating/pdb.yaml +++ b/bitnami/elasticsearch/templates/coordinating/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "elasticsearch.coordinating.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: coordinating-only - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.coordinating.pdb.maxUnavailable }} maxUnavailable: {{ .Values.coordinating.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.coordinating.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: coordinating-only {{- end }} diff --git a/bitnami/elasticsearch/templates/coordinating/serviceaccount.yaml b/bitnami/elasticsearch/templates/coordinating/serviceaccount.yaml index 57649ca0dd..c4ec7660c6 100644 --- a/bitnami/elasticsearch/templates/coordinating/serviceaccount.yaml +++ b/bitnami/elasticsearch/templates/coordinating/serviceaccount.yaml @@ -9,19 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "elasticsearch.coordinating.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: coordinating-only - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if or .Values.coordinating.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.coordinating.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.coordinating.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.coordinating.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/bitnami/elasticsearch/templates/coordinating/statefulset.yaml b/bitnami/elasticsearch/templates/coordinating/statefulset.yaml index 648bdd7871..48d8bff95c 100644 --- a/bitnami/elasticsearch/templates/coordinating/statefulset.yaml +++ b/bitnami/elasticsearch/templates/coordinating/statefulset.yaml @@ -9,30 +9,23 @@ kind: StatefulSet metadata: name: {{ include "elasticsearch.coordinating.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: coordinating-only {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: coordinating-only {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.coordinating.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.coordinating.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.coordinating.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.coordinating.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if not .Values.coordinating.autoscaling.enabled }} replicas: {{ .Values.coordinating.replicaCount }} {{- end }} + {{- $podLabels := merge .Values.coordinating.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: coordinating-only {{- if .Values.coordinating.updateStrategy }} updateStrategy: {{- toYaml .Values.coordinating.updateStrategy | nindent 4 }} @@ -41,15 +34,12 @@ spec: podManagementPolicy: {{ .Values.coordinating.podManagementPolicy }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: coordinating-only {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: coordinating-only {{- end }} - {{- if .Values.coordinating.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.podLabels "context" $) | nindent 8 }} - {{- end }} annotations: {{- if and (include "elasticsearch.createTlsSecret" .) (not .Values.security.tls.coordinating.existingSecret) }} checksum/tls: {{ include (print $.Template.BasePath "/tls-secret.yaml") . | sha256sum }} @@ -67,8 +57,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.coordinating.podAffinityPreset "component" "coordinating-only" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.coordinating.podAntiAffinityPreset "component" "coordinating-only" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.coordinating.podAffinityPreset "component" "coordinating-only" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.coordinating.podAntiAffinityPreset "component" "coordinating-only" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.coordinating.nodeAffinityPreset.type "key" .Values.coordinating.nodeAffinityPreset.key "values" .Values.coordinating.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.coordinating.nodeSelector }} diff --git a/bitnami/elasticsearch/templates/coordinating/svc-headless.yaml b/bitnami/elasticsearch/templates/coordinating/svc-headless.yaml index 4659fe99f4..91a0a3b4c1 100644 --- a/bitnami/elasticsearch/templates/coordinating/svc-headless.yaml +++ b/bitnami/elasticsearch/templates/coordinating/svc-headless.yaml @@ -9,11 +9,8 @@ kind: Service metadata: name: {{ include "elasticsearch.coordinating.servicename" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: coordinating-only - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} {{- end }} @@ -28,6 +25,7 @@ spec: - name: tcp-transport port: {{ .Values.containerPorts.transport }} targetPort: transport - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.coordinating.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: coordinating-only {{- end }} diff --git a/bitnami/elasticsearch/templates/data/hpa.yaml b/bitnami/elasticsearch/templates/data/hpa.yaml index 2dd3a7af04..1835e643d4 100644 --- a/bitnami/elasticsearch/templates/data/hpa.yaml +++ b/bitnami/elasticsearch/templates/data/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "elasticsearch.data.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: data - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/elasticsearch/templates/data/pdb.yaml b/bitnami/elasticsearch/templates/data/pdb.yaml index bd868f5e11..0c3874d38d 100644 --- a/bitnami/elasticsearch/templates/data/pdb.yaml +++ b/bitnami/elasticsearch/templates/data/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "elasticsearch.data.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: data - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.data.pdb.maxUnavailable }} maxUnavailable: {{ .Values.data.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.data.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: data {{- end }} diff --git a/bitnami/elasticsearch/templates/data/serviceaccount.yaml b/bitnami/elasticsearch/templates/data/serviceaccount.yaml index c77fc36f30..833250e084 100644 --- a/bitnami/elasticsearch/templates/data/serviceaccount.yaml +++ b/bitnami/elasticsearch/templates/data/serviceaccount.yaml @@ -9,19 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "elasticsearch.data.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: data - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if or .Values.data.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.data.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.data.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.data.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.data.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/bitnami/elasticsearch/templates/data/statefulset.yaml b/bitnami/elasticsearch/templates/data/statefulset.yaml index eb7e6a5a21..d07f0c6ba1 100644 --- a/bitnami/elasticsearch/templates/data/statefulset.yaml +++ b/bitnami/elasticsearch/templates/data/statefulset.yaml @@ -9,31 +9,24 @@ kind: StatefulSet metadata: name: {{ include "elasticsearch.data.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: data {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: data {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.data.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.data.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.data.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.data.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if not .Values.data.autoscaling.enabled }} replicas: {{ .Values.data.replicaCount }} {{- end }} podManagementPolicy: {{ .Values.data.podManagementPolicy }} + {{- $podLabels := merge .Values.data.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: data serviceName: {{ include "elasticsearch.data.servicename" . }} {{- if .Values.data.updateStrategy }} @@ -41,15 +34,12 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: data {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: data {{- end }} - {{- if .Values.data.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.data.podLabels "context" $) | nindent 8 }} - {{- end }} annotations: {{- if and (include "elasticsearch.createTlsSecret" .) (not .Values.security.tls.data.existingSecret) }} checksum/tls: {{ include (print $.Template.BasePath "/tls-secret.yaml") . | sha256sum }} @@ -67,8 +57,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.data.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.data.podAffinityPreset "component" "data" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.data.podAntiAffinityPreset "component" "data" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.data.podAffinityPreset "component" "data" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.data.podAntiAffinityPreset "component" "data" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.data.nodeAffinityPreset.type "key" .Values.data.nodeAffinityPreset.key "values" .Values.data.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.data.nodeSelector }} @@ -349,13 +339,10 @@ spec: volumeClaimTemplates: - metadata: name: "data" - annotations: - {{- if .Values.data.persistence.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.data.persistence.annotations "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }} - {{- end }} + {{- if or .Values.data.persistence.annotations .Values.commonAnnotations }} + {{- $claimAnnotations := merge .Values.data.persistence.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $) | nindent 10 }} + {{- end }} {{- if .Values.commonLabels }} labels: {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }} {{- end }} diff --git a/bitnami/elasticsearch/templates/data/svc-headless.yaml b/bitnami/elasticsearch/templates/data/svc-headless.yaml index f37a1b3689..390f3ebf31 100644 --- a/bitnami/elasticsearch/templates/data/svc-headless.yaml +++ b/bitnami/elasticsearch/templates/data/svc-headless.yaml @@ -9,11 +9,8 @@ kind: Service metadata: name: {{ include "elasticsearch.data.servicename" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: data - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} {{- end }} @@ -28,6 +25,7 @@ spec: - name: tcp-transport port: {{ .Values.containerPorts.transport }} targetPort: transport - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.data.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: data {{- end }} diff --git a/bitnami/elasticsearch/templates/ingest/hpa.yaml b/bitnami/elasticsearch/templates/ingest/hpa.yaml index bf832d68e9..96810b3ad4 100644 --- a/bitnami/elasticsearch/templates/ingest/hpa.yaml +++ b/bitnami/elasticsearch/templates/ingest/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "elasticsearch.ingest.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/elasticsearch/templates/ingest/ingress.yaml b/bitnami/elasticsearch/templates/ingest/ingress.yaml index fbef42e1bb..103c34ac67 100644 --- a/bitnami/elasticsearch/templates/ingest/ingress.yaml +++ b/bitnami/elasticsearch/templates/ingest/ingress.yaml @@ -9,19 +9,11 @@ kind: Ingress metadata: name: {{ include "elasticsearch.ingest.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.ingest.ingress.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.ingest.ingress.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingest.ingress.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.ingest.ingress.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if and .Values.ingest.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} diff --git a/bitnami/elasticsearch/templates/ingest/pdb.yaml b/bitnami/elasticsearch/templates/ingest/pdb.yaml index 02fcf5711f..45a4bea07a 100644 --- a/bitnami/elasticsearch/templates/ingest/pdb.yaml +++ b/bitnami/elasticsearch/templates/ingest/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "elasticsearch.ingest.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.ingest.pdb.maxUnavailable }} maxUnavailable: {{ .Values.ingest.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.ingest.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: ingest {{- end }} diff --git a/bitnami/elasticsearch/templates/ingest/service.yaml b/bitnami/elasticsearch/templates/ingest/service.yaml index 8a7385b076..562c76084f 100644 --- a/bitnami/elasticsearch/templates/ingest/service.yaml +++ b/bitnami/elasticsearch/templates/ingest/service.yaml @@ -9,18 +9,12 @@ kind: Service metadata: name: {{ include "elasticsearch.ingest.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- 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.ingest.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingest.service.annotations "context" $) | nindent 4 }} - {{- end }} + {{- if or .Values.ingest.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.ingest.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: type: {{ .Values.ingest.service.type }} {{- if and .Values.ingest.service.clusterIP (eq .Values.ingest.service.type "ClusterIP") }} @@ -60,6 +54,7 @@ spec: {{- if .Values.ingest.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.ingest.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.ingest.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest {{- end }} diff --git a/bitnami/elasticsearch/templates/ingest/serviceaccount.yaml b/bitnami/elasticsearch/templates/ingest/serviceaccount.yaml index 1f35209704..0add42ccc1 100644 --- a/bitnami/elasticsearch/templates/ingest/serviceaccount.yaml +++ b/bitnami/elasticsearch/templates/ingest/serviceaccount.yaml @@ -9,19 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "elasticsearch.ingest.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if or .Values.ingest.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.ingest.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.ingest.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.ingest.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.ingest.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/bitnami/elasticsearch/templates/ingest/statefulset.yaml b/bitnami/elasticsearch/templates/ingest/statefulset.yaml index b0689b706d..6b29fca10c 100644 --- a/bitnami/elasticsearch/templates/ingest/statefulset.yaml +++ b/bitnami/elasticsearch/templates/ingest/statefulset.yaml @@ -9,31 +9,24 @@ kind: StatefulSet metadata: name: {{ include "elasticsearch.ingest.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: ingest {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.ingest.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.ingest.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingest.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.ingest.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if not .Values.ingest.autoscaling.enabled }} replicas: {{ .Values.ingest.replicaCount }} {{- end }} podManagementPolicy: {{ .Values.ingest.podManagementPolicy }} + {{- $podLabels := merge .Values.ingest.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: ingest serviceName: {{ include "elasticsearch.ingest.servicename" . }} {{- if .Values.ingest.updateStrategy }} @@ -41,15 +34,12 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: ingest {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: ingest {{- end }} - {{- if .Values.ingest.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.ingest.podLabels "context" $) | nindent 8 }} - {{- end }} annotations: {{- if and (include "elasticsearch.createTlsSecret" .) (not .Values.security.tls.ingest.existingSecret) }} checksum/tls: {{ include (print $.Template.BasePath "/tls-secret.yaml") . | sha256sum }} @@ -67,8 +57,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.ingest.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.ingest.podAffinityPreset "component" "ingest" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.ingest.podAntiAffinityPreset "component" "ingest" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.ingest.podAffinityPreset "component" "ingest" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.ingest.podAntiAffinityPreset "component" "ingest" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.ingest.nodeAffinityPreset.type "key" .Values.ingest.nodeAffinityPreset.key "values" .Values.ingest.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.ingest.nodeSelector }} diff --git a/bitnami/elasticsearch/templates/ingest/svc-headless.yaml b/bitnami/elasticsearch/templates/ingest/svc-headless.yaml index 1927ddca8a..6073a09e2d 100644 --- a/bitnami/elasticsearch/templates/ingest/svc-headless.yaml +++ b/bitnami/elasticsearch/templates/ingest/svc-headless.yaml @@ -9,11 +9,8 @@ kind: Service metadata: name: {{ include "elasticsearch.ingest.servicename" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} {{- end }} @@ -28,6 +25,7 @@ spec: - name: tcp-transport port: {{ .Values.containerPorts.transport }} targetPort: transport - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.ingest.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest {{- end }} diff --git a/bitnami/elasticsearch/templates/ingress-tls-secrets.yaml b/bitnami/elasticsearch/templates/ingress-tls-secrets.yaml index f32417af85..95b7760f03 100644 --- a/bitnami/elasticsearch/templates/ingress-tls-secrets.yaml +++ b/bitnami/elasticsearch/templates/ingress-tls-secrets.yaml @@ -11,10 +11,7 @@ kind: Secret metadata: name: {{ .name }} namespace: {{ template "common.names.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 }} @@ -34,10 +31,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ template "common.names.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 }} @@ -57,11 +51,8 @@ kind: Secret metadata: name: {{ .name }} namespace: {{ printf "%s-ingest-ingress" (include "common.names.namespace" $ ) }} - labels: {{- include "common.labels.standard" $ | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- if $.Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if $.Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -81,11 +72,8 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ template "common.names.namespace" $ }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/elasticsearch/templates/ingress.yaml b/bitnami/elasticsearch/templates/ingress.yaml index e20118a7b8..9afb38ddc9 100644 --- a/bitnami/elasticsearch/templates/ingress.yaml +++ b/bitnami/elasticsearch/templates/ingress.yaml @@ -9,19 +9,11 @@ kind: Ingress metadata: name: {{ include "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: elasticsearch - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- 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/elasticsearch/templates/initialization-configmap.yaml b/bitnami/elasticsearch/templates/initialization-configmap.yaml index 879c95af51..2e3ef38ac3 100644 --- a/bitnami/elasticsearch/templates/initialization-configmap.yaml +++ b/bitnami/elasticsearch/templates/initialization-configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-init-scripts" (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/elasticsearch/templates/master/hpa.yaml b/bitnami/elasticsearch/templates/master/hpa.yaml index 112e1146c2..7304ba0e4f 100644 --- a/bitnami/elasticsearch/templates/master/hpa.yaml +++ b/bitnami/elasticsearch/templates/master/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "elasticsearch.master.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/elasticsearch/templates/master/pdb.yaml b/bitnami/elasticsearch/templates/master/pdb.yaml index 4e98dd8384..3dd977f402 100644 --- a/bitnami/elasticsearch/templates/master/pdb.yaml +++ b/bitnami/elasticsearch/templates/master/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "elasticsearch.master.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.master.pdb.maxUnavailable }} maxUnavailable: {{ .Values.master.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.master.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: master {{- end }} diff --git a/bitnami/elasticsearch/templates/master/serviceaccount.yaml b/bitnami/elasticsearch/templates/master/serviceaccount.yaml index 79e7f5c07d..40f24f0397 100644 --- a/bitnami/elasticsearch/templates/master/serviceaccount.yaml +++ b/bitnami/elasticsearch/templates/master/serviceaccount.yaml @@ -9,19 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "elasticsearch.master.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if or .Values.master.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.master.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.master.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.master.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/bitnami/elasticsearch/templates/master/statefulset.yaml b/bitnami/elasticsearch/templates/master/statefulset.yaml index 20461536c4..8cf6435250 100644 --- a/bitnami/elasticsearch/templates/master/statefulset.yaml +++ b/bitnami/elasticsearch/templates/master/statefulset.yaml @@ -9,31 +9,24 @@ kind: StatefulSet metadata: name: {{ include "elasticsearch.master.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: master {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.master.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.master.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.master.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if not .Values.master.autoscaling.enabled }} replicas: {{ .Values.master.replicaCount }} {{- end }} podManagementPolicy: {{ .Values.master.podManagementPolicy }} + {{- $podLabels := merge .Values.master.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: master serviceName: {{ include "elasticsearch.master.servicename" . }} {{- if .Values.master.updateStrategy }} @@ -41,15 +34,12 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: master {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: master {{- end }} - {{- if .Values.master.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.podLabels "context" $) | nindent 8 }} - {{- end }} annotations: {{- if and (include "elasticsearch.createTlsSecret" .) (not .Values.security.tls.master.existingSecret) }} checksum/tls: {{ include (print $.Template.BasePath "/tls-secret.yaml") . | sha256sum }} @@ -67,8 +57,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.master.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAffinityPreset "component" "master" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAntiAffinityPreset "component" "master" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAffinityPreset "component" "master" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAntiAffinityPreset "component" "master" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.master.nodeAffinityPreset.type "key" .Values.master.nodeAffinityPreset.key "values" .Values.master.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.master.nodeSelector }} @@ -349,13 +339,10 @@ spec: volumeClaimTemplates: - metadata: name: "data" - annotations: - {{- if .Values.master.persistence.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.persistence.annotations "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }} - {{- end }} + {{- if or .Values.master.persistence.annotations .Values.commonAnnotations }} + {{- $claimAnnotations := merge .Values.master.persistence.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $) | nindent 10 }} + {{- end }} {{- if .Values.commonLabels }} labels: {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }} {{- end }} diff --git a/bitnami/elasticsearch/templates/master/svc-headless.yaml b/bitnami/elasticsearch/templates/master/svc-headless.yaml index c6b135416a..78bfdc934e 100644 --- a/bitnami/elasticsearch/templates/master/svc-headless.yaml +++ b/bitnami/elasticsearch/templates/master/svc-headless.yaml @@ -9,11 +9,8 @@ kind: Service metadata: name: {{ include "elasticsearch.master.servicename" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{ include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} {{- end }} @@ -28,6 +25,7 @@ spec: - name: tcp-transport port: {{ .Values.containerPorts.transport }} targetPort: transport - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.master.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master {{- end }} diff --git a/bitnami/elasticsearch/templates/metrics/deployment.yaml b/bitnami/elasticsearch/templates/metrics/deployment.yaml index bd1104bf46..4a91467fd0 100644 --- a/bitnami/elasticsearch/templates/metrics/deployment.yaml +++ b/bitnami/elasticsearch/templates/metrics/deployment.yaml @@ -9,38 +9,30 @@ kind: Deployment metadata: name: {{ include "elasticsearch.metrics.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: metrics {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.metrics.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.metrics.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.metrics.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: replicas: 1 + {{- $podLabels := merge .Values.metrics.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: metrics template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: metrics {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: metrics {{- end }} - {{- if .Values.metrics.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.podLabels "context" $) | nindent 8 }} - {{- end }} {{- if .Values.metrics.podAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }} {{- end }} @@ -53,8 +45,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.metrics.podAffinityPreset "component" "metrics" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.metrics.podAntiAffinityPreset "component" "metrics" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.metrics.podAffinityPreset "component" "metrics" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.metrics.podAntiAffinityPreset "component" "metrics" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.metrics.nodeAffinityPreset.type "key" .Values.metrics.nodeAffinityPreset.key "values" .Values.metrics.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.metrics.nodeSelector }} diff --git a/bitnami/elasticsearch/templates/metrics/prometheusrule.yaml b/bitnami/elasticsearch/templates/metrics/prometheusrule.yaml index d77297fd6b..40bac68eff 100644 --- a/bitnami/elasticsearch/templates/metrics/prometheusrule.yaml +++ b/bitnami/elasticsearch/templates/metrics/prometheusrule.yaml @@ -9,11 +9,8 @@ kind: PrometheusRule metadata: name: {{ include "common.names.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.metrics.prometheusRule.additionalLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/elasticsearch/templates/metrics/service.yaml b/bitnami/elasticsearch/templates/metrics/service.yaml index 5a976c853e..1d9219d601 100644 --- a/bitnami/elasticsearch/templates/metrics/service.yaml +++ b/bitnami/elasticsearch/templates/metrics/service.yaml @@ -9,21 +9,19 @@ kind: Service metadata: name: {{ include "elasticsearch.metrics.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: {{ include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.metrics.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.metrics.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: type: {{ .Values.metrics.service.type }} ports: - name: http-metrics port: {{ .Values.metrics.service.port }} targetPort: metrics - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.metrics.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics {{- end }} diff --git a/bitnami/elasticsearch/templates/metrics/servicemonitor.yaml b/bitnami/elasticsearch/templates/metrics/servicemonitor.yaml index 9cac1c91c9..dc2d5fcb96 100644 --- a/bitnami/elasticsearch/templates/metrics/servicemonitor.yaml +++ b/bitnami/elasticsearch/templates/metrics/servicemonitor.yaml @@ -9,21 +9,16 @@ kind: ServiceMonitor metadata: name: {{ include "elasticsearch.metrics.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.labels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "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/elasticsearch/templates/secrets.yaml b/bitnami/elasticsearch/templates/secrets.yaml index e1be4fc100..2da988c711 100644 --- a/bitnami/elasticsearch/templates/secrets.yaml +++ b/bitnami/elasticsearch/templates/secrets.yaml @@ -9,10 +9,7 @@ kind: Secret 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 }} @@ -27,10 +24,7 @@ kind: Secret metadata: name: {{ printf "%s-tls-pass" (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/elasticsearch/templates/service.yaml b/bitnami/elasticsearch/templates/service.yaml index 5e41da351d..06e7f6acbd 100644 --- a/bitnami/elasticsearch/templates/service.yaml +++ b/bitnami/elasticsearch/templates/service.yaml @@ -8,22 +8,16 @@ kind: Service metadata: name: {{ include "elasticsearch.service.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 (include "elasticsearch.coordinating.enabled" .) }} app.kubernetes.io/component: coordinating-only {{- else }} app.kubernetes.io/component: master {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }} - {{- end }} + {{- if or .Values.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.type }} {{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }} @@ -63,7 +57,7 @@ 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 }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if (include "elasticsearch.coordinating.enabled" .) }} app.kubernetes.io/component: coordinating-only {{- else }} diff --git a/bitnami/elasticsearch/templates/tls-secret.yaml b/bitnami/elasticsearch/templates/tls-secret.yaml index 8f6c63c170..ec9f356c71 100644 --- a/bitnami/elasticsearch/templates/tls-secret.yaml +++ b/bitnami/elasticsearch/templates/tls-secret.yaml @@ -23,10 +23,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 }} app.kubernetes.io/component: master {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -49,10 +46,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 }} app.kubernetes.io/component: data {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -75,10 +69,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 }} app.kubernetes.io/component: coordinating-only {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -105,10 +96,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 }} app.kubernetes.io/component: ingest {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}