operator-framework / kubectl-operator

Manage Kubernetes Operators from the command line
https://operatorframework.io/
Apache License 2.0
129 stars 37 forks source link

delete everything from install plan, wait for CRD deletion #9

Closed joelanford closed 4 years ago

joelanford commented 4 years ago

Instead of deleting just CRDs and CSVs, use the install plan to find all of the resources that were created when the operator was installed, and then delete those resources.

Also, when deleting CRDs, wait for each one to be deleted to give the operator a chance to finalize and delete the associated CRs. Without this, the operator is deleted and the CRDs and CRs are stuck waiting to be deleted because the CR finalizers may not have been not removed.