Removing Stuck Operator [operator-sdk/issue/2094]ΒΆ

In cases where deleting the operators Custom Resource fails, the following can be executed:

# This may need to be customized in OLM environments:
NAMESPACE=ibm-spectrum-scale-csi-driver
kubectl get CSIScaleOperator  -n ${NAMESPACE} -o json | jq '.items[].metadata.finalizers=[] | .items[].status.conditions=[]' > tmp.json
kubectl  apply -f tmp.json
rm -f temp.json

Typically this happens when deleting the Custom Resource Definition before removing all of the Custom Resources.

For more details on this check the following operator-sdk/issue/2094.