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

support helm 3.7 #134

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions charts/retool/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Usage: (include "retool.jobRunner.enabled" .)
*/}}
{{- define "retool.jobRunner.enabled" -}}
{{- $output := "" -}}
{{- if or (gt (int (toString (.Values.replicaCount))) 1) (eq .Values.jobRunner.enabled true) }}
{{- if or (gt (int (toString (.Values.replicaCount))) 1) (default false .Values.jobRunner.enabled) }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was fine as .Values.jobRunner.enabled as well, but added default for clarity.

Copy link
Contributor

Choose a reason for hiding this comment

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

so the "" and "1" output are fine, just the default needs to be changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

{{- if or (gt (int (toString (.Values.replicaCount))) 1) Values.jobRunner.enabled }}

even that was ok

but yea, the "" and "1" is non-truthy and truthy respectively

{{- $output = "1" -}}
{{- end -}}
{{- $output -}}
Expand All @@ -141,7 +141,7 @@ Usage: (include "retool.workflows.enabled" .)
*/}}
{{- define "retool.workflows.enabled" -}}
{{- $output := "" -}}
{{- if or (eq .Values.workflows.enabled true) (eq .Values.workflows.enabled false) -}}
{{- if or (eq (toString (default "" .Values.workflows.enabled)) "true") (eq (toString (default "" .Values.workflows.enabled)) "false") -}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this condition represents if the enabled field was set explicitly or not, hence cast to strings. previous version didn't work for helm 3.7

{{- if eq .Values.workflows.enabled true -}}
{{- $output = "1" -}}
{{- else -}}
Expand Down
Loading