Skip to content

Commit 294f1c6

Browse files
committed
Add notes on deleting an operator CR
This commit introduces documentation detailing how to delete an operator CR. Signed-off-by: Alexander Greene <greene.al1991@gmail.com>
1 parent 50cf7e0 commit 294f1c6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

content/en/docs/Tasks/uninstall-operator.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,13 @@ kubectl delete csv $CSV -n <namespace>
6767
## Step 4: Deciding whether or not to delete the CRDs and APIServices
6868

6969
The final step consists of deciding whether or not to delete the CRDs and APIServices that were introduced to the cluster by the operator. Assuming you have already deleted all unwanted resources on cluster as enumerated in Step 1, if no resources remain it is safe to remove the CRD or APISerivces. Otherwise, you should not delete the type as the wanted resources will be deleted automatically when the CRD or APISerivce is deleted.
70+
71+
## Step 5: Deleting the Operator CR
72+
73+
OLM recently introduced the view-only [operator CRD](https://github.com/operator-framework/api/blob/7339a22050af53df7b6f97a652b8e2d73698765a/crds/operators.coreos.com_operators.yaml). For those of you unfamiliar with the resource, when OLM installs an operator:
74+
- All resources associated with the operator will have the `operators.coreos.com/<operator CR Name>` label applied to it.
75+
- OLM will create or recreate an `operator CR` if any resources exists with the `operators.coreos.com/<operator CR Name>` label.
76+
77+
This ultimately means that in order to delete the `operator CR` users will need to delete all entries in its `status.Components` array. Typically, an `operator CR` can be delete after completing steps 1 through 4 above. However, if a user is still unable to delete an operator, they should:
78+
1. Delete each resource found in the `operator CR's` status.Components array. Alternatively, if you have deleted the operator's CSV and Subscription, you can simply remove the `operators.coreos.com/<operator CR Name>` label.
79+
2. Delete the `operator CR`.

0 commit comments

Comments
 (0)