-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Inspired by this reddit thread
We currently hardcode a pod security context when we create acmesolver pods:
cert-manager/pkg/issuer/acme/http/pod.go
Lines 176 to 181 in 33c7c29
SecurityContext: &corev1.PodSecurityContext{ | |
RunAsNonRoot: pointer.BoolPtr(true), | |
SeccompProfile: &corev1.SeccompProfile{ | |
Type: corev1.SeccompProfileTypeRuntimeDefault, | |
}, | |
}, |
This enforces RunAsNonRoot
which is a sane default given that we run as USER 1000
in our container.
However, some tools will inject init containers for pods for whatever reason. An example is https://github.com/k8tz/k8tz
If those init containers violate the pod security context, acmesolver will fail to start. k8tz has fixed their containers running as root, but the risk remains that other tools might need to run as root (or maybe use a more expansive seccomp profile or something).
It would be nice for the security context to be configurable for users.
/kind feature