Skip to content

Commit be7c3e3

Browse files
authored
Merge pull request #742 from snyk/fix/mount-permissions
fix: fixes #739 set securityContext.fsGroup at pod level
2 parents 24f4922 + dec08a8 commit be7c3e3

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

snyk-monitor/templates/deployment.yaml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,10 @@ spec:
1818
app.kubernetes.io/name: {{ include "snyk-monitor.name" . }}
1919
app.kubernetes.io/instance: {{ .Release.Name }}
2020
spec:
21+
securityContext:
22+
fsGroup: 2000
2123
serviceAccountName: {{ include "snyk-monitor.name" . }}
2224
restartPolicy: Always
23-
initContainers:
24-
- name: volume-permissions
25-
image: "{{ .Values.initContainerImage.repository }}:{{ .Values.initContainerImage.tag }}"
26-
command : ['sh', '-c', 'chmod -R go+rwX /var/tmp || true']
27-
volumeMounts:
28-
- name: temporary-storage
29-
mountPath: "/var/tmp"
30-
securityContext:
31-
privileged: false
32-
runAsNonRoot: false
33-
allowPrivilegeEscalation: false
34-
readOnlyRootFilesystem: true
35-
capabilities:
36-
drop:
37-
- ALL
3825
containers:
3926
- name: {{ include "snyk-monitor.name" . }}
4027
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

0 commit comments

Comments
 (0)