diff --git a/Makefile b/Makefile index b655a4e45..018ef488c 100644 --- a/Makefile +++ b/Makefile @@ -72,20 +72,13 @@ cluster-down: delete-config prep-config: @echo 'Generating certs and deploying into active cluster...' cat deploy/deployment-base.yaml | sed -e "s|IMAGE|${IMAGE}|g" | tee deploy/deployment.yaml - cat deploy/mutatingwebhook.yaml | hack/webhook-patch-ca-bundle.sh > deploy/mutatingwebhook-ca-bundle.yaml deploy-config: prep-config @echo 'Applying configuration to active cluster...' kubectl apply -f deploy/auth.yaml kubectl apply -f deploy/deployment.yaml kubectl apply -f deploy/service.yaml - kubectl apply -f deploy/mutatingwebhook-ca-bundle.yaml - until kubectl get csr -o \ - jsonpath='{.items[?(@.spec.username=="system:serviceaccount:default:pod-identity-webhook")].metadata.name}' | \ - grep -m 1 "csr-"; \ - do echo "Waiting for CSR to be created" && sleep 1 ; \ - done - kubectl certificate approve $$(kubectl get csr -o jsonpath='{.items[?(@.spec.username=="system:serviceaccount:default:pod-identity-webhook")].metadata.name}') + kubectl apply -f deploy/mutatingwebhook.yaml delete-config: @echo 'Tearing down mutating controller and associated resources...'