diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index f2dd77f4..d42609e1 100644 --- a/charts/backstage/Chart.yaml +++ b/charts/backstage/Chart.yaml @@ -47,4 +47,4 @@ sources: [] # Versions are expected to follow Semantic Versioning (https://semver.org/) # Note that when this chart is published to https://github.com/openshift-helm-charts/charts # it will follow the RHDH versioning 1.y.z -version: 5.12.2 +version: 5.12.3 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index 860932c9..44327092 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -1,7 +1,7 @@ # RHDH Backstage Helm Chart for OpenShift -![Version: 5.12.2](https://img.shields.io/badge/Version-5.12.2-informational?style=flat-square) +![Version: 5.12.3](https://img.shields.io/badge/Version-5.12.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for deploying Red Hat Developer Hub, which is a Red Hat supported version of Backstage. @@ -29,7 +29,7 @@ For the **Generally Available** version of this chart, see: helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add redhat-developer https://redhat-developer.github.io/rhdh-chart -helm install my-backstage redhat-developer/backstage --version 5.12.2 +helm install my-backstage redhat-developer/backstage --version 5.12.3 ``` ## Introduction diff --git a/charts/backstage/templates/_helpers.tpl b/charts/backstage/templates/_helpers.tpl index d0e493d7..9d72a184 100644 --- a/charts/backstage/templates/_helpers.tpl +++ b/charts/backstage/templates/_helpers.tpl @@ -35,6 +35,21 @@ Sets the secretKeyRef name for Backstage to the PostgreSQL existing secret if it {{- end -}} {{- end -}} +{{/* +Returns the PostgreSQL admin password key, supporting both global and local configurations. +*/}} +{{- define "rhdh.postgresql.adminPasswordKey" -}} + {{- if ((((((.Values).global).postgresql).auth).secretKeys).adminPasswordKey) -}} + {{- .Values.global.postgresql.auth.secretKeys.adminPasswordKey -}} + {{- else if (((((.Values).postgresql).auth).secretKeys).adminPasswordKey) -}} + {{- .Values.postgresql.auth.secretKeys.adminPasswordKey -}} + {{- else if ((((.Values).auth).secretKeys).adminPasswordKey) -}} + {{- .Values.auth.secretKeys.adminPasswordKey -}} + {{- else -}} + postgres-password + {{- end -}} +{{- end -}} + {{/* Get the password secret. Referenced from: https://github.com/bitnami/charts/blob/main/bitnami/postgresql/templates/_helpers.tpl#L94-L105 diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index ae8e92b6..78bef61e 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -3005,7 +3005,7 @@ "name": "POSTGRESQL_ADMIN_PASSWORD", "valueFrom": { "secretKeyRef": { - "key": "postgres-password", + "key": "{{- include \"rhdh.postgresql.adminPasswordKey\" . }}", "name": "{{- include \"rhdh.postgresql.secretName\" . }}" } } diff --git a/charts/backstage/values.yaml b/charts/backstage/values.yaml index d44fbf00..e3a3dd7a 100644 --- a/charts/backstage/values.yaml +++ b/charts/backstage/values.yaml @@ -286,7 +286,7 @@ upstream: - name: POSTGRESQL_ADMIN_PASSWORD valueFrom: secretKeyRef: - key: postgres-password + key: '{{- include "rhdh.postgresql.adminPasswordKey" . }}' name: '{{- include "rhdh.postgresql.secretName" . }}' args: # This additional `app-config`` file is generated by the initContainer below, and contains the merged configuration of installed dynamic plugins. @@ -445,7 +445,7 @@ upstream: - name: POSTGRESQL_ADMIN_PASSWORD valueFrom: secretKeyRef: - key: postgres-password + key: '{{- include "rhdh.postgresql.adminPasswordKey" . }}' name: '{{- include "postgresql.v1.secretName" . }}' service: extraPorts: