Fix helm charts when pass values file. (#2222)

This commit is contained in:
Tingluo Huang
2023-01-30 08:37:26 -05:00
committed by GitHub
parent 01e9dd31a9
commit 835eac7835
4 changed files with 38 additions and 5 deletions

View File

@@ -12,21 +12,21 @@ spec:
runnerGroup: {{ . }}
{{- end }}
{{- if and (kindIs "int64" .Values.minRunners) (kindIs "int64" .Values.maxRunners) }}
{{- if and (or (kindIs "int64" .Values.minRunners) (kindIs "float64" .Values.minRunners)) (or (kindIs "int64" .Values.maxRunners) (kindIs "float64" .Values.maxRunners)) }}
{{- if gt .Values.minRunners .Values.maxRunners }}
{{- fail "maxRunners has to be greater or equal to minRunners" }}
{{- end }}
{{- end }}
{{- if kindIs "int64" .Values.maxRunners }}
{{- if lt .Values.maxRunners 0 }}
{{- if or (kindIs "int64" .Values.maxRunners) (kindIs "float64" .Values.maxRunners) }}
{{- if lt (.Values.maxRunners | int) 0 }}
{{- fail "maxRunners has to be greater or equal to 0" }}
{{- end }}
maxRunners: {{ .Values.maxRunners | int }}
{{- end }}
{{- if kindIs "int64" .Values.minRunners }}
{{- if lt .Values.minRunners 0 }}
{{- if or (kindIs "int64" .Values.minRunners) (kindIs "float64" .Values.minRunners) }}
{{- if lt (.Values.minRunners | int) 0 }}
{{- fail "minRunners has to be greater or equal to 0" }}
{{- end }}
minRunners: {{ .Values.minRunners | int }}