Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit ce98366

Browse files
committed
Support server-side dry run
See issue #1027. To support server-side dry-run, all admission webhooks must state that they do not have any side effects. Our version of controller-gen doesn't include the sideEffects marker so I added them as a kustomization patch. Tested: server-side dry-run fails on a pod creation in Kind 1.18 without this fix and passes with it. GKE doesn't have 1.18 yet so I couldn't test it there, but I also tested it on GKE 1.15 (the oldest currently supported version) to ensure that it had no ill effects, and all e2e tests work fine on both Kind 1.18 and GKE 1.15.
1 parent 0aac07d commit ce98366

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: incubator/hnc/config/webhook/webhook_patch.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,12 @@ metadata:
66
webhooks:
77
- name: objects.hnc.x-k8s.io
88
timeoutSeconds: 2
9+
sideEffects: None
10+
- name: subnamespaceanchors.hnc.x-k8s.io
11+
sideEffects: None
12+
- name: hierarchyconfigurations.hnc.x-k8s.io
13+
sideEffects: None
14+
- name: hncconfigurations.hnc.x-k8s.io
15+
sideEffects: None
16+
- name: namespaces.hnc.x-k8s.io
17+
sideEffects: None

0 commit comments

Comments
 (0)