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

Support cluster default pod security standards. #585

Open
GrahamDumpleton opened this issue Sep 25, 2024 · 2 comments
Open

Support cluster default pod security standards. #585

GrahamDumpleton opened this issue Sep 25, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@GrahamDumpleton
Copy link
Collaborator

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

Some Kubernetes clusters are configured to apply a default pod security standards for any namespaces created. This can be a problem when using Educates to install contour as depending on configuration it can fail as a result.

 message: '(combined from similar events): Error creating: pods "envoy-qqlnh" is forbidden:
   violates PodSecurity "baseline:latest": hostPort (container "envoy" uses hostPorts
   443, 80)'

To deal with this the projectcontour namespace would need to have labels:

     pod-security.kubernetes.io/audit: privileged 
     pod-security.kubernetes.io/enforce: privileged
     pod-security.kubernetes.io/warn: privileged

Describe the solution you'd like

Look at way of applying these labels automatically, either always, or as an option.

Right now no choice but to disable default pod security standards for the cluster as a whole.

Describe alternatives you've considered

No response

Additional information

No response

@GrahamDumpleton
Copy link
Collaborator Author

Note that may need to also look at how such a default pod security standard may apply to workshop sessions when Kyverno is used as cluster security policy engine. Although, if there is a default cluster pod security standard applied, may be forced to deploy Educates using pod security standards for cluster security instead of Kyverno, with Kyverno only used to workshop/session security.

@GrahamDumpleton
Copy link
Collaborator Author

For Contour case, need to see if hostPorts was needed in this case as was using LoadBalancer, so may not have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant