Skip to content

Commit

Permalink
fix(helm): do not run webhooks on kube-system (#8157)
Browse files Browse the repository at this point in the history
Some public cloud providers have a warning which confuses users
In any case it's good practice: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#avoiding-operating-on-the-kube-system-namespace

Signed-off-by: Charly Molter <[email protected]>
  • Loading branch information
lahabana authored Oct 27, 2023
1 parent ecfeee8 commit cea44a3
Show file tree
Hide file tree
Showing 25 changed files with 1,051 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ spec:
metadata:
annotations:
checksum/config: fd9d1d8386f97f2bd49e50f476520816168a1c9f60bbc43dec1347a64d239155
checksum/tls-secrets: 7b6ae860b2e6214ea9bd8283136caf4596a9e217a60e28e709a2e781f9676180
checksum/tls-secrets: ec0bc0b5613dc75c86fb3dc148f404db4eaec3e3817ee4eba2a70fd1bc535999
labels:
app: kuma-control-plane
app.kubernetes.io/name: kuma
Expand Down Expand Up @@ -722,6 +722,11 @@ webhooks:
- name: mesh.defaulter.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -755,6 +760,11 @@ webhooks:
- name: owner-reference.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -804,8 +814,13 @@ webhooks:
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchLabels:
kuma.io/sidecar-injection: enabled
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
- key: kuma.io/sidecar-injection
operator: In
values: ["enabled"]
clientConfig:
caBundle: XYZ
service:
Expand All @@ -825,6 +840,11 @@ webhooks:
- name: pods-kuma-injector.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
objectSelector:
matchLabels:
kuma.io/sidecar-injection: enabled
Expand All @@ -847,6 +867,11 @@ webhooks:
- name: kuma-injector.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -877,6 +902,11 @@ webhooks:
- name: validator.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -931,6 +961,11 @@ webhooks:
- name: service.validator.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -975,6 +1010,11 @@ webhooks:
- name: gateway.validator.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6506,7 +6506,7 @@ spec:
metadata:
annotations:
checksum/config: fd9d1d8386f97f2bd49e50f476520816168a1c9f60bbc43dec1347a64d239155
checksum/tls-secrets: 7b6ae860b2e6214ea9bd8283136caf4596a9e217a60e28e709a2e781f9676180
checksum/tls-secrets: ec0bc0b5613dc75c86fb3dc148f404db4eaec3e3817ee4eba2a70fd1bc535999
labels:
app: kuma-control-plane
app.kubernetes.io/name: kuma
Expand Down Expand Up @@ -6659,6 +6659,11 @@ webhooks:
- name: mesh.defaulter.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6692,6 +6697,11 @@ webhooks:
- name: owner-reference.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6741,8 +6751,13 @@ webhooks:
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchLabels:
kuma.io/sidecar-injection: enabled
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
- key: kuma.io/sidecar-injection
operator: In
values: ["enabled"]
clientConfig:
caBundle: XYZ
service:
Expand All @@ -6762,6 +6777,11 @@ webhooks:
- name: pods-kuma-injector.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
objectSelector:
matchLabels:
kuma.io/sidecar-injection: enabled
Expand All @@ -6784,6 +6804,11 @@ webhooks:
- name: kuma-injector.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6814,6 +6839,11 @@ webhooks:
- name: validator.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6868,6 +6898,11 @@ webhooks:
- name: service.validator.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6912,6 +6947,11 @@ webhooks:
- name: gateway.validator.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6506,7 +6506,7 @@ spec:
metadata:
annotations:
checksum/config: fd9d1d8386f97f2bd49e50f476520816168a1c9f60bbc43dec1347a64d239155
checksum/tls-secrets: 7b6ae860b2e6214ea9bd8283136caf4596a9e217a60e28e709a2e781f9676180
checksum/tls-secrets: ec0bc0b5613dc75c86fb3dc148f404db4eaec3e3817ee4eba2a70fd1bc535999
labels:
app: kuma-control-plane
app.kubernetes.io/name: kuma
Expand Down Expand Up @@ -6659,6 +6659,11 @@ webhooks:
- name: mesh.defaulter.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6692,6 +6697,11 @@ webhooks:
- name: owner-reference.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6741,8 +6751,13 @@ webhooks:
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchLabels:
kuma.io/sidecar-injection: enabled
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
- key: kuma.io/sidecar-injection
operator: In
values: ["enabled"]
clientConfig:
caBundle: XYZ
service:
Expand All @@ -6762,6 +6777,11 @@ webhooks:
- name: pods-kuma-injector.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
objectSelector:
matchLabels:
kuma.io/sidecar-injection: enabled
Expand All @@ -6784,6 +6804,11 @@ webhooks:
- name: kuma-injector.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6814,6 +6839,11 @@ webhooks:
- name: validator.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Fail
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6868,6 +6898,11 @@ webhooks:
- name: service.validator.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down Expand Up @@ -6912,6 +6947,11 @@ webhooks:
- name: gateway.validator.kuma-admission.kuma.io
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values: ["kube-system"]
clientConfig:
caBundle: XYZ
service:
Expand Down
Loading

0 comments on commit cea44a3

Please sign in to comment.