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

Conversation

robholland
Copy link
Contributor

Using the name alone wasn't a good test as they may want the default name.

What was changed

Set serviceAccountName if serviceAccount: { create: true } is set.

Why?

Previously we checked only if the default name was being over-ridden. This broke if people wanted to use the default name.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Using the name alone wasn't a good test as they may want the default name.
@@ -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

@robholland
Copy link
Contributor Author

Closing in favour of #562 which is a better fix.

@robholland robholland closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants