Skip to content
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.13.0
version: 5.13.1
4 changes: 2 additions & 2 deletions charts/backstage/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# RHDH Backstage Helm Chart for OpenShift

![Version: 5.13.0](https://img.shields.io/badge/Version-5.13.0-informational?style=flat-square)
![Version: 5.13.1](https://img.shields.io/badge/Version-5.13.1-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.
Expand Down Expand Up @@ -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.13.0
helm install my-backstage redhat-developer/backstage --version 5.13.1
```

## Introduction
Expand Down
15 changes: 15 additions & 0 deletions charts/backstage/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/backstage/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3097,7 +3097,7 @@
"name": "POSTGRESQL_ADMIN_PASSWORD",
"valueFrom": {
"secretKeyRef": {
"key": "postgres-password",
"key": "{{- include \"rhdh.postgresql.adminPasswordKey\" . }}",
"name": "{{- include \"rhdh.postgresql.secretName\" . }}"
}
}
Expand Down
4 changes: 2 additions & 2 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,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.
Expand Down Expand Up @@ -469,7 +469,7 @@ upstream:
- name: POSTGRESQL_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
key: postgres-password
key: '{{- include "rhdh.postgresql.adminPasswordKey" . }}'
name: '{{- include "postgresql.v1.secretName" . }}'
service:
extraPorts:
Expand Down
Loading