diff --git a/charts/rhdh/Chart.yaml b/charts/rhdh/Chart.yaml index 6a7fef611..463a322d8 100644 --- a/charts/rhdh/Chart.yaml +++ b/charts/rhdh/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: redhat-developer-hub type: application -version: 3.4.8 +version: 3.4.9 appVersion: 2.1.0 annotations: artifacthub.io/category: integration-delivery diff --git a/charts/rhdh/README.md b/charts/rhdh/README.md index 3b8f80396..4f610b6ed 100644 --- a/charts/rhdh/README.md +++ b/charts/rhdh/README.md @@ -1,7 +1,7 @@ # RHDH Helm Chart for OpenShift and Kubernetes -![Version: 3.4.8](https://img.shields.io/badge/Version-3.4.8-informational?style=flat-square) +![Version: 3.4.9](https://img.shields.io/badge/Version-3.4.9-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. @@ -36,7 +36,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-rhdh redhat-developer/redhat-developer-hub --version 3.4.8 +helm install my-rhdh redhat-developer/redhat-developer-hub --version 3.4.9 ``` ## Introduction diff --git a/charts/rhdh/templates/_backstage-pod-template.tpl b/charts/rhdh/templates/_backstage-pod-template.tpl index 0d16279d5..8412618bd 100644 --- a/charts/rhdh/templates/_backstage-pod-template.tpl +++ b/charts/rhdh/templates/_backstage-pod-template.tpl @@ -334,7 +334,7 @@ spec: valueFrom: secretKeyRef: name: {{ include "rhdh.postgresql.secretName" . }} - key: {{ include "rhdh.postgresql.adminPasswordKey" . }} + key: {{ include "rhdh.postgresql.passwordKey" . }} {{- else if .Values.externalDatabase.host }} - name: POSTGRES_HOST value: {{ .Values.externalDatabase.host | quote }} diff --git a/charts/rhdh/templates/_helpers.tpl b/charts/rhdh/templates/_helpers.tpl index 9bb51bfc5..5cd16e8e2 100644 --- a/charts/rhdh/templates/_helpers.tpl +++ b/charts/rhdh/templates/_helpers.tpl @@ -172,6 +172,18 @@ Returns the PostgreSQL admin password key. {{- end -}} {{- end -}} +{{/* +Returns the PostgreSQL user password key. +Uses the admin key when username is "postgres" (default). +*/}} +{{- define "rhdh.postgresql.passwordKey" -}} + {{- if eq (.Values.postgresql.auth.username | default "postgres") "postgres" -}} + {{- include "rhdh.postgresql.adminPasswordKey" . -}} + {{- else -}} + {{- (((((.Values).postgresql).auth).secretKeys).userPasswordKey) | default "password" -}} + {{- end -}} +{{- end -}} + {{/* Returns the PostgreSQL hostname. When postgresql.enabled is false, returns externalDatabase.host.