From 0ec8e0d95c23a208f5b25750cfc1b16f952fe5e9 Mon Sep 17 00:00:00 2001 From: Danyel <3709726+muja@users.noreply.github.com> Date: Fri, 15 May 2026 02:46:55 +0300 Subject: [PATCH 1/2] fix(values): consistent usage of postgresql.adminPasswordKey (#44) * fix(values): consistent usage of postgresql.adminPasswordKey * fix(backstage): consistent usage of postgresql.adminPasswordKey Replace hard-coded `postgres-password` key in POSTGRESQL_ADMIN_PASSWORD env vars with the new `rhdh.postgresql.adminPasswordKey` helper, so overriding `upstream.postgresql.auth.secretKeys.adminPasswordKey` is consistently respected by both the Backstage and PostgreSQL containers. --------- Co-authored-by: Corey Daley Co-authored-by: Armel Soro Co-authored-by: Armel Soro Co-authored-by: Fortune Ndlovu --- charts/backstage/Chart.yaml | 2 +- charts/backstage/README.md | 4 ++-- charts/backstage/templates/_helpers.tpl | 15 +++++++++++++++ charts/backstage/values.schema.json | 2 +- charts/backstage/values.yaml | 4 ++-- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index d9fdfb8f..f2dd77f4 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.1 +version: 5.12.2 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index b62a26c5..71c450a5 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -1,7 +1,7 @@ # RHDH Backstage Helm Chart for OpenShift -![Version: 5.12.1](https://img.shields.io/badge/Version-5.12.1-informational?style=flat-square) +![Version: 5.12.2](https://img.shields.io/badge/Version-5.12.2-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.1 +helm install my-backstage redhat-developer/backstage --version 5.12.2 ``` ## 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 4ef3f3d5..d6cf6738 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 7afe2b75..eed09725 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: From 173bc7bf9af0a6674a1bd794c835a4b78b4749f6 Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Mon, 18 May 2026 09:17:37 +0200 Subject: [PATCH 2/2] chore: bump backstage chart version --- charts/backstage/Chart.yaml | 2 +- charts/backstage/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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