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

feat: Exclude kube-system by default in webhooks during installation #92

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions versions/kruise/1.5.2/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ annotations:
artifacthub.io/changes: |
- "[Changed]: https://github.com/openkruise/kruise/blob/master/CHANGELOG.md"
- "[Changed]: Support extra environment variables in the manager DaemonSet"
- "[Changed]: Support exclude specified namespaces from webhook"
42 changes: 42 additions & 0 deletions versions/kruise/1.5.2/templates/webhookconfiguration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ webhooks:
operator: NotIn
values:
- openkruise
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -281,6 +285,12 @@ webhooks:
matchExpressions:
- key: policy.kruise.io/delete-protection
operator: Exists
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
rules:
- apiGroups:
- apps
Expand All @@ -305,6 +315,12 @@ webhooks:
matchExpressions:
- key: policy.kruise.io/delete-protection
operator: Exists
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
rules:
- apiGroups:
- apps
Expand All @@ -329,6 +345,12 @@ webhooks:
matchExpressions:
- key: policy.kruise.io/delete-protection
operator: Exists
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
rules:
- apiGroups:
- apps
Expand All @@ -353,6 +375,12 @@ webhooks:
matchExpressions:
- key: policy.kruise.io/delete-protection
operator: Exists
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
rules:
- apiGroups:
- apiextensions.k8s.io
Expand All @@ -378,6 +406,12 @@ webhooks:
matchExpressions:
- key: policy.kruise.io/delete-protection
operator: Exists
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
rules:
- apiGroups:
- ""
Expand All @@ -404,6 +438,10 @@ webhooks:
operator: NotIn
values:
- openkruise
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -431,6 +469,10 @@ webhooks:
operator: NotIn
values:
- openkruise
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
rules:
- apiGroups:
- ""
Expand Down
Loading