Skip to content

Commit

Permalink
Deep copy before unsetting values (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang authored Jul 19, 2021
1 parent f556617 commit 8c2a61c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion galaxy/templates/deployment-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
{{- range $each := $.Values.extraInitContainers -}}
{{- if $each.applyToJob -}}
{{- print "- " | nindent 8 -}}
{{- tpl ((unset (unset (unset $each "applyToJob") "applyToWeb") "applyToWorkflow") | toYaml | indent 10 | trim) $ -}}
{{- tpl ((unset (unset (unset ($each | deepCopy) "applyToJob") "applyToWeb") "applyToWorkflow") | toYaml | indent 10 | trim) $ -}}
{{- end }}
{{- end }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion galaxy/templates/deployment-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
{{- .Values.extraVolumeMounts | toYaml | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.nginx.resources | nindent 12 }}
lifecycle:
preStop:
exec:
Expand Down
2 changes: 1 addition & 1 deletion galaxy/templates/deployment-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
{{- range $each := .Values.extraInitContainers -}}
{{- if $each.applyToWeb -}}
{{- print "- " | nindent 8 -}}
{{- tpl ((unset (unset (unset $each "applyToJob") "applyToWeb") "applyToWorkflow") | toYaml | indent 10 | trim) $ -}}
{{- tpl ((unset (unset (unset ($each | deepCopy) "applyToJob") "applyToWeb") "applyToWorkflow") | toYaml | indent 10 | trim) $ -}}
{{- end }}
{{- end }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion galaxy/templates/deployment-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
{{- range $each := .Values.extraInitContainers -}}
{{- if $each.applyToWorkflow -}}
{{- print "- " | nindent 8 -}}
{{- tpl ((unset (unset (unset $each "applyToJob") "applyToWeb") "applyToWorkflow") | toYaml | indent 10 | trim) $ -}}
{{- tpl ((unset (unset (unset ($each | deepCopy) "applyToJob") "applyToWeb") "applyToWorkflow") | toYaml | indent 10 | trim) $ -}}
{{- end }}
{{- end }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions galaxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -628,3 +628,4 @@ nginx:
pullPolicy: IfNotPresent
conf:
client_max_body_size: 100g

0 comments on commit 8c2a61c

Please sign in to comment.