-
Notifications
You must be signed in to change notification settings - Fork 36
Set readOnlyRootFilesystem to true in container security context #1213
Copy link
Copy link
Open
Description
Proposal
I'm trying to avoid containers eating node's ephemeral storage and have kyverno policy, which checks for readOnlyRootFilesystem. I think it won't be a problem to enable readOnlyRootFilesystem for containers. It will also increase container security by reducing attack scope
$ k describe pod -n mysql ps-db-haproxy-1
...
Warning PolicyViolation 3m22s kyverno-scan policy require-ro-rootfs/validate-readOnlyRootFilesystem fail: validation error: Root filesystem must be read-only. rule validate-readOnlyRootFilesystem failed at path /spec/containers/0/securityContext/
k describe pod -n mysql ps-db-mysql-1
...
Warning PolicyViolation 26m kyverno-scan policy require-ro-rootfs/validate-readOnlyRootFilesystem fail: validation error: Root filesystem must be read-only. rule validate-readOnlyRootFilesystem failed at path /spec/containers/0/securityContext/
Use-Case
No response
Is this a feature you are interested in implementing yourself?
Maybe
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels