From fe6a1b2d9645586269e119e30820b2d3127bfaf2 Mon Sep 17 00:00:00 2001 From: Juan Ariza Toledano Date: Wed, 20 Sep 2023 14:37:06 +0200 Subject: [PATCH] [bitnami/postgresql-ha] Use different app.kubernetes.io/version label on subcomponents (#19351) --- bitnami/postgresql-ha/Chart.lock | 6 +++--- bitnami/postgresql-ha/Chart.yaml | 2 +- bitnami/postgresql-ha/templates/pgpool/configmap.yaml | 4 +++- .../templates/pgpool/custom-users-secrets.yaml | 4 +++- bitnami/postgresql-ha/templates/pgpool/deployment.yaml | 5 +++-- .../templates/pgpool/initdb-scripts-configmap.yaml | 4 +++- bitnami/postgresql-ha/templates/pgpool/pdb.yaml | 4 +++- bitnami/postgresql-ha/templates/pgpool/secrets.yaml | 4 +++- bitnami/postgresql-ha/templates/pgpool/service.yaml | 3 ++- 9 files changed, 24 insertions(+), 12 deletions(-) diff --git a/bitnami/postgresql-ha/Chart.lock b/bitnami/postgresql-ha/Chart.lock index 9c35807281..0b5694661c 100644 --- a/bitnami/postgresql-ha/Chart.lock +++ b/bitnami/postgresql-ha/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.11.0 -digest: sha256:250b173b89f097db6e85c9c203d88df6076bf4f7930c9db7fcc072f428922276 -generated: "2023-09-13T18:48:49.407845557Z" + version: 2.11.1 +digest: sha256:ead8f26c76a9ec082f23629a358e8efd8f88d87aaed734bf41febcb8a7bc5d4c +generated: "2023-09-18T16:07:54.990736+02:00" diff --git a/bitnami/postgresql-ha/Chart.yaml b/bitnami/postgresql-ha/Chart.yaml index 2e021fcf7f..bcaddd89e5 100644 --- a/bitnami/postgresql-ha/Chart.yaml +++ b/bitnami/postgresql-ha/Chart.yaml @@ -40,4 +40,4 @@ maintainers: name: postgresql-ha sources: - https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha -version: 11.9.4 +version: 11.9.5 diff --git a/bitnami/postgresql-ha/templates/pgpool/configmap.yaml b/bitnami/postgresql-ha/templates/pgpool/configmap.yaml index f70ceb4bca..935333da85 100644 --- a/bitnami/postgresql-ha/templates/pgpool/configmap.yaml +++ b/bitnami/postgresql-ha/templates/pgpool/configmap.yaml @@ -9,7 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-configuration" (include "postgresql-ha.pgpool" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.pgpool.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pgpool {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/bitnami/postgresql-ha/templates/pgpool/custom-users-secrets.yaml b/bitnami/postgresql-ha/templates/pgpool/custom-users-secrets.yaml index 2982f6f0d7..612b398f08 100644 --- a/bitnami/postgresql-ha/templates/pgpool/custom-users-secrets.yaml +++ b/bitnami/postgresql-ha/templates/pgpool/custom-users-secrets.yaml @@ -9,7 +9,9 @@ kind: Secret metadata: name: {{ printf "%s-custom-users" (include "postgresql-ha.pgpool" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.pgpool.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pgpool {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/bitnami/postgresql-ha/templates/pgpool/deployment.yaml b/bitnami/postgresql-ha/templates/pgpool/deployment.yaml index 40dce2eac5..d40ed1b01f 100644 --- a/bitnami/postgresql-ha/templates/pgpool/deployment.yaml +++ b/bitnami/postgresql-ha/templates/pgpool/deployment.yaml @@ -8,7 +8,8 @@ kind: Deployment metadata: name: {{ include "postgresql-ha.pgpool" . }} namespace: {{ include "common.names.namespace" . | quote }} - {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.pgpool.labels .Values.commonLabels ) "context" . ) }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.pgpool.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.pgpool.labels .Values.commonLabels $versionLabel ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pgpool {{- if .Values.commonAnnotations }} @@ -16,7 +17,7 @@ metadata: {{- end }} spec: replicas: {{ .Values.pgpool.replicaCount }} - {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.pgpool.podLabels .Values.commonLabels ) "context" . ) }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.pgpool.podLabels .Values.commonLabels $versionLabel ) "context" . ) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: pgpool diff --git a/bitnami/postgresql-ha/templates/pgpool/initdb-scripts-configmap.yaml b/bitnami/postgresql-ha/templates/pgpool/initdb-scripts-configmap.yaml index 02c01b85da..edec37aa38 100644 --- a/bitnami/postgresql-ha/templates/pgpool/initdb-scripts-configmap.yaml +++ b/bitnami/postgresql-ha/templates/pgpool/initdb-scripts-configmap.yaml @@ -9,7 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-initdb-scripts" (include "postgresql-ha.pgpool" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.pgpool.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pgpool {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/bitnami/postgresql-ha/templates/pgpool/pdb.yaml b/bitnami/postgresql-ha/templates/pgpool/pdb.yaml index 5f17a10acc..e68f5df2d4 100644 --- a/bitnami/postgresql-ha/templates/pgpool/pdb.yaml +++ b/bitnami/postgresql-ha/templates/pgpool/pdb.yaml @@ -9,7 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ include "postgresql-ha.pgpool" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.pgpool.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pgpool {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/bitnami/postgresql-ha/templates/pgpool/secrets.yaml b/bitnami/postgresql-ha/templates/pgpool/secrets.yaml index e512a379f2..f701fb68b8 100644 --- a/bitnami/postgresql-ha/templates/pgpool/secrets.yaml +++ b/bitnami/postgresql-ha/templates/pgpool/secrets.yaml @@ -9,7 +9,9 @@ kind: Secret metadata: name: {{ include "postgresql-ha.pgpool" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.pgpool.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pgpool {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/bitnami/postgresql-ha/templates/pgpool/service.yaml b/bitnami/postgresql-ha/templates/pgpool/service.yaml index 29f42582e9..6d6edc7fb8 100644 --- a/bitnami/postgresql-ha/templates/pgpool/service.yaml +++ b/bitnami/postgresql-ha/templates/pgpool/service.yaml @@ -8,7 +8,8 @@ kind: Service metadata: name: {{ include "postgresql-ha.pgpool" . }} namespace: {{ include "common.names.namespace" . | quote }} - {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.pgpool.serviceLabels .Values.commonLabels ) "context" . ) }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.pgpool.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.pgpool.serviceLabels .Values.commonLabels $versionLabel ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pgpool {{- if or .Values.pgpool.serviceAnnotations .Values.service.annotations .Values.commonAnnotations }}