From d889b29ced0cd093eebf7f786306c815f21ba9fc Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Fri, 6 May 2022 13:55:33 +0200 Subject: [PATCH] Fix instructions to run the controller and webhook locally --- README.md | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index dc99658..372ac74 100644 --- a/README.md +++ b/README.md @@ -58,21 +58,24 @@ spec: externalName: 172.21.0.1 # Change to host IP EOF -kubctl apply -f ./config/webhook/manifests.yaml +kubectl apply -f ./config/webhook/manifests.yaml kubectl patch validatingwebhookconfiguration validating-webhook-configuration \ - -p '{ - "webhooks": [ - { - "name": "validate-users.appuio.io", - "clientConfig": { - "caBundle": "'"$(base64 -w0 "./local-env/webhook-certs/tls.crt)"'", - "service": { - "namespace": "default", - "port": 9443 - } - } - } - ] - }' + --type=json -p '[ + { + "op": "add", + "path": "/webhooks/0/clientConfig/caBundle", + "value": "'"$(base64 -w0 ./webhook-certs/tls.crt)"'" + }, + { + "op": "replace", + "path": "/webhooks/0/clientConfig/service/namespace", + "value": "default" + }, + { + "op": "replace", + "path": "/webhooks/0/clientConfig/service/port", + "value": 9443 + } + ]' ```