Skip to content

Commit 1d78f98

Browse files
Fix undeploy when using Ambient mode (openshift-service-mesh#533)
When make undeploy is executed in an Ambient deployment, it hangs. This happens because the Sail Operator is deleted, but a finalizer remains on the ztunnel resource. As the finalizer isn't removed, the ztunnel CR and the associated CRD cannot be deleted. Related to: istio-ecosystem#500 Signed-off-by: Sridhar Gaddam <[email protected]>
1 parent e910fdd commit 1d78f98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Makefile.core.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,17 @@ deploy-olm: verify-kubeconfig bundle bundle-build bundle-push ## Build and push
330330
.PHONY: undeploy
331331
undeploy: verify-kubeconfig ## Undeploy controller from an existing cluster.
332332
kubectl delete istios.sailoperator.io --all --all-namespaces --wait=true
333+
kubectl delete istiocni.sailoperator.io --all --all-namespaces --wait=true
334+
kubectl delete ztunnel.sailoperator.io --all --all-namespaces --wait=true
333335
$(MAKE) -e HELM_TEMPL_DEF_FLAGS="$(HELM_TEMPL_DEF_FLAGS)" deploy-yaml | kubectl delete --ignore-not-found -f -
334336
kubectl delete ns ${NAMESPACE} --ignore-not-found
335337
$(HELM) template chart chart $(HELM_TEMPL_DEF_FLAGS) --set image='$(IMAGE)' --namespace $(NAMESPACE) | kubectl delete --ignore-not-found -f -
336338

337339
.PHONY: undeploy-olm
338340
undeploy-olm: verify-kubeconfig operator-sdk ## Undeploy the operator from an existing cluster (used only if operator was installed via OLM).
339341
kubectl delete istios.sailoperator.io --all --all-namespaces --wait=true
342+
kubectl delete istiocni.sailoperator.io --all --all-namespaces --wait=true
343+
kubectl delete ztunnel.sailoperator.io --all --all-namespaces --wait=true
340344
$(OPERATOR_SDK) cleanup $(OPERATOR_NAME) --delete-all -n ${NAMESPACE}
341345

342346
.PHONY: deploy-example

0 commit comments

Comments
 (0)