Skip to content

Commit 4dd18a1

Browse files
Gianluca755jonnyowenpowell
authored andcommitted
fix: include fsgroup override for backwards compatibility
1 parent e51de40 commit 4dd18a1

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

snyk-monitor/templates/deployment.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,19 @@ spec:
3333
{{- toYaml . | nindent 8 }}
3434
{{- end }}
3535
spec:
36-
{{- with .Values.podSecurityContext }}
37-
securityContext:
38-
{{- toYaml . | nindent 8 }}
39-
{{- end }}
36+
{{- with .Values.podSecurityContext }}
37+
securityContext:
38+
{{- $fsGroupOverride := dict }}
39+
{{- if hasKey $.Values.securityContext "fsGroup" }}
40+
{{- $fsGroupOverride = dict "fsGroup" (int $.Values.securityContext.fsGroup) }}
41+
{{- end }}
42+
{{- merge $fsGroupOverride . | toYaml | nindent 8 }}
43+
{{- else }}
44+
{{- if .Values.securityContext.fsGroup }}
45+
securityContext:
46+
fsGroup: {{ int .Values.securityContext.fsGroup }}
47+
{{- end }}
48+
{{- end }}
4049
affinity:
4150
nodeAffinity:
4251
requiredDuringSchedulingIgnoredDuringExecution:

0 commit comments

Comments
 (0)