Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we use a serviceAccount if we're asked to create one #574

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/temporal/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Create the name of the service account
Define the service account as needed
*/}}
{{- define "temporal.serviceAccount" -}}
{{- if .Values.serviceAccount.name -}}
{{- if or .Values.serviceAccount.name .Values.serviceAccount.create -}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also fixes my original issue at #562
but the reason why I did not choose to perform an "or" check here is because I want to be explicit about the name "default"

Such practice is popular in the community and can be viewed in some widely used charts here:
https://github.com/bitnami/charts/blob/b7bd1ad379e8735003f5d180fc0c79bf773f9ea6/bitnami/cassandra/templates/_helpers.tpl#L36C1-L45C12
https://github.com/prometheus-community/helm-charts/blob/24979b1d1aee425312e039882de3d27c8fa9b607/charts/prometheus/templates/_helpers.tpl#L181-L190

serviceAccountName: {{ include "temporal.serviceAccountName" . }}
{{- end -}}
{{- end -}}
Expand Down
Loading