Skip to content

Commit

Permalink
[Application] Fix securityContext for sidecars (#163)
Browse files Browse the repository at this point in the history
The previous implementation did override the default value which then
were applied to the next sidecar if no securityContext was set for this
sidecar.

---------

Co-authored-by: Florian Heubeck <40993644+heubeck@users.noreply.github.com>
  • Loading branch information
knabben-mms and heubeck authored Dec 3, 2024
1 parent 2a55aa7 commit f586829
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/application/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ maintainers:
- name: MediaMarktSaturn
url: https://github.com/MediaMarktSaturn
appVersion: 1.0.0
version: 1.29.0
version: 1.29.1
4 changes: 2 additions & 2 deletions charts/application/templates/_podTemplate.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
{{- end }}
securityContext:
{{- if and $i.securityContext $.Values.initDefaults.securityContext }}
{{- toYaml (mergeOverwrite $.Values.initDefaults.securityContext $i.securityContext) | nindent 8 }}
{{- toYaml (merge $i.securityContext $.Values.initDefaults.securityContext) | nindent 8 }}
{{- else }}
{{- toYaml (or $i.securityContext $.Values.initDefaults.securityContext) | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -127,7 +127,7 @@ spec:
{{- end }}
securityContext:
{{- if and $s.securityContext $.Values.sidecarDefaults.securityContext }}
{{- toYaml (mergeOverwrite $.Values.sidecarDefaults.securityContext $s.securityContext) | nindent 8 }}
{{- toYaml (merge $s.securityContext $.Values.sidecarDefaults.securityContext) | nindent 8 }}
{{- else }}
{{- toYaml (or $s.securityContext $.Values.sidecarDefaults.securityContext) | nindent 8 }}
{{- end }}
Expand Down

0 comments on commit f586829

Please sign in to comment.