Skip to content

Commit 0064efc

Browse files
authored
Fix kyverno webhook namespace selectors (#434)
* Fix kyverno webhook namespace selectors * Fix waiting for kyverno webhook
1 parent 637af40 commit 0064efc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hack/config/kyverno/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ configMapGenerator:
1414
# overwrite default namespaceSelector for webhook configs to exclude kube-system
1515
# the second part makes gardeners care controller/webhook remediation happy
1616
- >-
17-
webhooks=[{
17+
webhooks={
1818
"namespaceSelector": {
1919
"matchExpressions": [{
2020
"key": "kubernetes.io/metadata.name",
@@ -26,4 +26,4 @@ configMapGenerator:
2626
"values": ["kube-system"]
2727
}]
2828
}
29-
}]
29+
}

hack/config/skaffold.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ deploy:
111111
- |
112112
for i in $(seq 1 20); do
113113
# create dummy policy with dry-run enabled to test availability of webhook
114-
if kubectl create --raw "/apis/kyverno.io/v1/clusterpolicies?dryRun=All" -f <(echo '{"apiVersion": "kyverno.io/v1", "kind": "ClusterPolicy", "metadata": {"name": "test"}, "spec": {}}') >/dev/null ; then
114+
if kubectl create --dry-run=server -f <(yq '.metadata.name |= "test-kyverno"' hack/config/policy/shoot/sharder-scheduling.yaml) ; then
115115
exit 0
116116
fi
117117
echo "Waiting until kyverno webhook is ready to handle policy creation"

0 commit comments

Comments
 (0)