-
Notifications
You must be signed in to change notification settings - Fork 784
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
failurePolicy Ignore vs enforcing policies #893
Comments
@rubroboletus thanks! I agree with your suggestions on the webhook defaults and deployment strategy. However, can you please elaborate on this?
What namespace selector are you referring to? |
@JimBugwadia namespace selector for webhook, from K8s documentation: apiVersion: admissionregistration.k8s.io/v1
but there is a risk, when someone labels another namespace with "namespace=kyverno". So this must be done with RBAC rule disallowing K8s operators to modify / add namespace labels, or kyverno rule disallowing to modify / add labels with name "namespace". |
Release 1.4 will introduce HA options. We can then revisit the default webhook configuration. |
Hi @rubroboletus - For all other configurations, please track via #1981, #1995. |
All webhooks have failurePolicy=ignore, but that can cause problems when you wanna to enforce policies on your cluster. Also updateStrategy for Deployment is not ideal. Consider using maxSurge: 1;maxUnavailable: 40%. Then with 1 running Pod, new one will be created first and old one Terminated on success. Also for enforcing rules, maybe better solution is to set failurePolicy=Fail, setting up proper timeout and namespaceSelector.matchExpressions: with good expression and label to kyverno namespace.
The text was updated successfully, but these errors were encountered: