Skip to content

Commit 720d876

Browse files
committed
[run-with-webhook] Cleanup webhook and scale down operator
This will allow to run openstack operator locally with webhook enabled.
1 parent 8c3a003 commit 720d876

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hack/run_with_local_webhook.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,10 @@ if [ -n "${CSV_NAME}" ]; then
400400

401401
oc patch "${CSV_NAME}" -n openstack-operators --type=json -p="[{'op': 'replace', 'path': '/spec/install/spec/deployments/0/spec/replicas', 'value': 0}]"
402402
oc patch "${CSV_NAME}" -n openstack-operators --type=json -p="[{'op': 'replace', 'path': '/spec/webhookdefinitions', 'value': []}]"
403+
oc wait -n openstack-operators --for=jsonpath='{.spec.replicas}'=0 deploy/openstack-operator-controller-operator
404+
oc scale --replicas=0 -n openstack-operators deploy/openstack-operator-controller-manager
405+
oc delete --ignore-not-found=true validatingwebhookconfiguration openstack-operator-validating-webhook-configuration
406+
oc delete --ignore-not-found=true mutatingwebhookconfiguration openstack-operator-mutating-webhook-configuration
403407
fi
404408

405409
source hack/export_related_images.sh && \

0 commit comments

Comments
 (0)