Skip to content

Commit 51a94a5

Browse files
committed
fix: changing permissions on mounted PVC on startup is best-effort
On OpenShift there is a "permission denied" issue with the 'chmod' command, even though it succeeds and makes the volume writable. Using chmod with the '-f' flag didn't help either, so opting for a best-effort approach by always returning a success status code.
1 parent 2376065 commit 51a94a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

snyk-monitor/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
initContainers:
2424
- name: volume-permissions
2525
image: "{{ .Values.initContainerImage.repository }}:{{ .Values.initContainerImage.tag }}"
26-
command : ['sh', '-c', 'chmod -R 777 /var/tmp']
26+
command : ['sh', '-c', 'chmod -R g+rwX /var/tmp || true']
2727
volumeMounts:
2828
- name: temporary-storage
2929
mountPath: "/var/tmp"

0 commit comments

Comments
 (0)