-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Open
Feature
Copy link
Labels
Milestone
Description
Is your feature request related to a problem?
Currently the kubewarden-controller adds an exclusion rule to all webhookconfigurations to ignore the namespace in which kubewarden itself is running.
We would like a feature toggle to be added to allow policies to bypass this anti-lockout mechanism so that some resources can be protected/mutated even in the kubewarden namespace.
The implementation would ideally introduce a feature toggle on the clusteradmissionpolicy resource that is evaluated for true false in
| func (r *policySubReconciler) namespaceSelector(policy policiesv1.Policy) *metav1.LabelSelector { |
Solution you'd like
So flow would be:
apiVersion: policies.kubewarden.io/v1
kind: ClusterAdmissionPolicy
metadata:
name: loadbalancerdeny
spec:
module: registry://<registry>v0.0.1
settings: {}
rules:
- apiGroups:
- ''
apiVersions:
- v1
resources:
- namespaces
operations:
- CREATE
- UPDATE
mutating: false
defaultexclusion: true
If you don't want the webhook to have the deployed namespace for kubewarden excluded.
This setting would default to false if not specified and thereby allow current users to experience existing behaviour of kubewarden.
Alternatives you've considered
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status