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

would violate PodSecurity "restricted:latest": host namespaces #31

Closed
jtaleric opened this issue Mar 3, 2023 · 3 comments
Closed

would violate PodSecurity "restricted:latest": host namespaces #31

jtaleric opened this issue Mar 3, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@jtaleric
Copy link
Member

jtaleric commented Mar 3, 2023

Running k8s-netperf i see

W0303 20:40:52.141105 1839294 warnings.go:70] would violate PodSecurity "restricted:latest": host namespaces (hostNetwork=true), allowPrivilegeEscalation != false (container "client-host" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "client-host" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "client-host" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "client-host" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")

@jtaleric
Copy link
Member Author

Just a documentation thing unless we start creating the NS and SA for the user.

@jtaleric jtaleric added the documentation Improvements or additions to documentation label Apr 12, 2023
@paigerube14
Copy link

If you create the namespace with these labels I think we would not get the error message mentioned above:

apiVersion: v1
kind: Namespace
metadata:
  labels:
    kubernetes.io/metadata.name: <name>
    pod-security.kubernetes.io/audit: privileged
    pod-security.kubernetes.io/enforce: privileged
    pod-security.kubernetes.io/enforce-version: v1.24
    pod-security.kubernetes.io/warn: privileged
    security.openshift.io/scc.podSecurityLabelSync: “false”
  name: <name>

@jtaleric
Copy link
Member Author

jtaleric commented Mar 1, 2024

w/ #133 this should be closed.

@jtaleric jtaleric closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants