Skip to content

Commit

Permalink
Fix undeploy when using Ambient mode
Browse files Browse the repository at this point in the history
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: #500
Signed-off-by: Sridhar Gaddam <[email protected]>
  • Loading branch information
sridhargaddam committed Dec 17, 2024
1 parent e910fdd commit e350cc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,17 @@ deploy-olm: verify-kubeconfig bundle bundle-build bundle-push ## Build and push
.PHONY: undeploy
undeploy: verify-kubeconfig ## Undeploy controller from an existing cluster.
kubectl delete istios.sailoperator.io --all --all-namespaces --wait=true
kubectl delete istiocni.sailoperator.io --all --all-namespaces --wait=true
kubectl delete ztunnel.sailoperator.io --all --all-namespaces --wait=true
$(MAKE) -e HELM_TEMPL_DEF_FLAGS="$(HELM_TEMPL_DEF_FLAGS)" deploy-yaml | kubectl delete --ignore-not-found -f -
kubectl delete ns ${NAMESPACE} --ignore-not-found
$(HELM) template chart chart $(HELM_TEMPL_DEF_FLAGS) --set image='$(IMAGE)' --namespace $(NAMESPACE) | kubectl delete --ignore-not-found -f -

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

.PHONY: deploy-example
Expand Down

0 comments on commit e350cc6

Please sign in to comment.