Skip to content

Commit 0cc5579

Browse files
committed
If RunAsUser is set, also set runAsNonRoot and seccompProfile
Reviewer suggested I also set runAsNonRoot and seccompProfile in addtion to RunAsUser. I tried this on IBM cloud and it seems to work fine. Note that this likely won't work if the runAsUser is not set, because then the runAsNonRoot: true will cause the container to fail to start up because the container itself is built to default to run as root.
1 parent a9565a5 commit 0cc5579

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bindata/network/ovn-kubernetes/managed/ovnkube-control-plane.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ spec:
291291
{{- if .RunAsUser }}
292292
securityContext:
293293
runAsUser: {{.RunAsUser}}
294+
runAsNonRoot: true
295+
seccompProfile:
296+
type: RuntimeDefault
294297
{{- end }}
295298
volumes:
296299
- name: ovnkube-config

0 commit comments

Comments
 (0)