HAProxy container not setting explicit USER id, breaks runAsNonRoot security policy by default
General
Escalation
General
Escalation
Description
When a pod security policy is applied which requires the container to run as a non-root user, it fails to apply with this error:
This is because the container image has, unlike the ProxySQL one, this in its specification:
instead of
I managed to work around this issue by setting the haproxy.podSecurityContext.runAsUser key to this user id on the CR, but it would be nice if this works by default.
Hello , Thank you for reporting this. We have updated our haproxy container to use 1001 as USER, also we have updated our percona-xtradb-cluster-operator image, so now USER is set to 2 instead of nobody.
Henno Schooljan May 26, 2021 at 6:13 PM
The percona/percona-xtradb-cluster-operator:1.8.0 image (which gets pulled as part of the PXC init process) has the name issue with user nobody. This time it is not clear which user id I need to use.
When a pod security policy is applied which requires the container to run as a non-root user, it fails to apply with this error:
This is because the container image has, unlike the ProxySQL one, this in its specification:
instead of
I managed to work around this issue by setting the
haproxy.podSecurityContext.runAsUser
key to this user id on the CR, but it would be nice if this works by default.