Skip to content

Commit

Permalink
fix(chart): whitespace in helm templating (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski authored Feb 10, 2022
1 parent c36940e commit 7a23a2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions helm-chart/renku-gateway/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ Hack for calling templates in a fake scope (until this is solved https://github.

{{/*
Define the redis hostname either from global values section or from a subchart.
Logic:
1. If global hostname for redis is found use that
2. If global hostname for redis is not found, then check for redis subchart and then use that
*/}}
{{- define "redis.host" -}}
{{- if .Values.global.redis.host -}}
# If global hostname for redis is found use that
{{- .Values.global.redis.host -}}
{{ .Values.global.redis.host -}}
{{- else -}}
# If global hostname for redis is not found, then check for redis subchart and then use that
{{- required "Either global.redis.host should be defined or a subchart for redis should be used where redis.fullname is available." (include "call-nested" (list . "redis" "redis.fullname")) -}}
{{ required "Either global.redis.host should be defined or a subchart for redis should be used where redis.fullname is available." (include "call-nested" (list . "redis" "redis.fullname")) -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion helm-chart/renku-gateway/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ spec:
app: {{ template "gateway.name" . }}-auth
release: {{ .Release.Name }}
# The label below enables the gateway to connect to redis
{{ .Values.global.redis.clientLabel | default (printf "%s-%s" (include "redis.host" .) "-client") }}: "true"
{{ .Values.global.redis.clientLabel | default (printf "%s-%s" (include "redis.host" .) "client") | nindent 8 }}: "true"
spec:
initContainers:
{{- include "certificates.initContainer" . | nindent 8 }}
Expand Down

0 comments on commit 7a23a2f

Please sign in to comment.