Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample-apps: handle restricted podsecurityadmission default in 4-dev-preview/4.19 #1555

Open
kaovilai opened this issue Oct 11, 2024 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@kaovilai
Copy link
Member

kaovilai commented Oct 11, 2024

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

@kaovilai kaovilai added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 11, 2024
@kaovilai kaovilai changed the title sample-apps: handle restricted podadmissionpolicy default in 4.18 sample-apps: handle restricted podsecurityadmission default in 4.18 Oct 11, 2024
@kaovilai kaovilai changed the title sample-apps: handle restricted podsecurityadmission default in 4.18 sample-apps: handle restricted podsecurityadmission default in 4-dev-preview/4.19 Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant