Skip to content

Commit

Permalink
fix: generated secret name should follow release name
Browse files Browse the repository at this point in the history
The generated backend auth secret and the values.yaml file
seem to be run under different contexts which will not allow
the use of `common.names.fullname` to get the name of the
current release of the chart. The secret will always grab the name
of the redhat-developer-hub chart. So instead we should use the
`.Release.Name` which will always be the release name for both.
  • Loading branch information
coreydaley committed Apr 17, 2024
1 parent e3e1be3 commit 68ac643
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ sources:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.15.1
version: 2.15.2
2 changes: 1 addition & 1 deletion charts/backstage/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Returns a secret name for service to service auth
{{- if .Values.global.auth.backend.existingSecret -}}
{{- .Values.global.auth.backend.existingSecret -}}
{{- else -}}
{{- include "common.names.fullname" . -}}-auth
{{- printf "%s-auth" .Release.Name -}}
{{- end -}}
{{- end -}}

Expand Down
2 changes: 1 addition & 1 deletion charts/backstage/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.names.fullname" . }}-auth
name: {{ printf "%s-auth" .Release.Name }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: backstage
Expand Down

0 comments on commit 68ac643

Please sign in to comment.