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

Update _helpers.tpl #340

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/k6-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Create the name of the service account to use
{{- end -}}

{{- define "k6-operator.namespace" -}}
{{- if eq .Release.Namespace "default" }}
{{- if eq .Release.Namespace "monitoring" }}
Copy link
Contributor

@illrill illrill Nov 26, 2023

Choose a reason for hiding this comment

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

This helper template is designed to default the installation into {{ .Release.Name }}-system instead of Helm's default choice of default, in the scenario that the user doesn't specify any namespace using helm install --namespace.

This change would mean that if a user does specify monitoring as the desired namespace, the installation instead goes into {{ .Release.Name }}-system. In contrast, if a user doesn't specify any namespace, the installation goes into default (which is what this helper template meant to prevent). This chart would basically become installable in any namespace except for monitoring.

{{- printf "%v-system" .Release.Name | indent 1 }}
{{- else }}
{{- .Release.Namespace | indent 1 }}
Expand Down
Loading