openshift / openshift/oadp-operator

sample-apps: handle restricted podsecurityadmission default in 4-dev-preview/4.20

Open
#1,555 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature lifecycle/frozen
Dominant language
Go
Stars
92
Forks
93
Avg merge
1d 23h
Merged PRs (30d)
43

Description

Is your feature request related to a problem? Please describe.

PodSecurityAdmission feature gate is enabled [in 4.18] (preview only, slated to be disabled by GA)(https://github.com/openshift/api/blob/a1523024209f3122be9e9d53515da470c6a2458b/features/features.go#L67-L72) (disabled in 4.17), will enforce restricted PodSecurityAdmission by default

which will cause errors like

deployment not available with condition: pods "mongo-5f78d6fd49-74k4r" is forbidden: violates PodSecurity "restricted:latest": privileged (container "mongo" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "mongo", "curl-tool" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "mongo", "curl-tool" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or containers "mongo", "curl-tool" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "mongo", "curl-tool" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")

as seen in our 4.18 dev-preview test and found to be possibly targeted for 4.19 release

This feature gate were documented as early as 4.12 it seems, but never enabled by default.

slack

https://issues.redhat.com/browse/OCPSTRAT-487
https://issues.redhat.com/browse/AUTH-262
https://issues.redhat.com/browse/OSDOCS-5004

Part of OADP epic https://issues.redhat.com/browse/OADP-5031
Describe the solution you'd like

Describe alternatives you've considered

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the sample-app manifests for 4-dev-preview/4.20 and reproduce the referenced dev-preview e2e failure involving restricted PodSecurityAdmission. Update the affected workloads to satisfy the restricted policy, then rerun the relevant e2e test and confirm the deployment becomes available without PodSecurity violations.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
devops, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.