Skip to content

Allow changing acmesolver pod SecurityContext #5295

@SgtCoDFish

Description

@SgtCoDFish

Inspired by this reddit thread

We currently hardcode a pod security context when we create acmesolver pods:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions