Deleting istiooperator did not respond

I deleted the resources deployed by istiooperator, but I was waiting for no response. I waited for more than 20 minutes to see what happened:

[root@node0 operator]# kubectl get IstioOperator  -n istio-system
NAME              REVISION   AGE
custom-operator              94m
installed-state              2d16h

[root@node0 operator]#  kubectl delete istiooperators.install.istio.io -n istio-system custom-operator
istiooperator.install.istio.io "custom-operator" deleted

The custom-operator cannot be deleted, and the status display is always being deleted

Did you delete the operator controller? The controller must complete deleting the istio resources before the CR is deleted. Otherwise you’re stuck with a finalizer on the CR which is the reason you can’t delete it. You can manually edit the CR to delete the finalizer if that’s the case.

This happens to me, I looked at the logs and there is an error message:

2020-05-28T18:39:05.344265Z	error	Error rendering the manifest: template: istio-ingress/templates/service.yaml:38:12: executing "istio-ingress/templates/service.yaml" at <$.Values.global.meshExpansion.enabled>: nil pointer evaluating interface {}.enabled

I simplified my IstioOperator resource as much as possible to reproduce this issue:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  name: istio-16
spec:
  tag: 1.6.0
  components:
    ingressGateways:
    - enabled: true

If I remove the components block, it deletes just fine.

David, sorry I missed this since it was an old thread. Your issue sounds a bit different. In this case it seems that the config is causing rendering of the templates to fail, which is likely not related to deletion.
Could you try the following:

  • use the latest 1.6 patch version for the test
  • apply your minimal CR above and check if the error pops up in the log
  • delete the CR and see if Istio is removed without further errors in the log.
    If you see any problems, best thing is to create an issue in istio/istio.