From 0e5b1790687274c5e2251a1299826ec42ba886c3 Mon Sep 17 00:00:00 2001 From: Michael Burke Date: Mon, 17 Feb 2025 11:53:40 -0500 Subject: [PATCH 1/4] edit --- modules/deleting-wmco-namespace.adoc | 29 ++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/modules/deleting-wmco-namespace.adoc b/modules/deleting-wmco-namespace.adoc index 2745967f4643..193ec369a9f2 100644 --- a/modules/deleting-wmco-namespace.adoc +++ b/modules/deleting-wmco-namespace.adoc @@ -4,28 +4,45 @@ :_mod-docs-content-type: PROCEDURE [id="deleting-wmco-namespace_{context}"] -= Deleting the Windows Machine Config Operator namespace += Deleting the Windows Machine Config Operator namespace and operands -You can delete the namespace that was generated for the Windows Machine Config Operator (WMCO) by default. +After removing the Windows Machine Config Operator, it is recommended that you remove the other components associated with the Operator to avoid potential issues. .Prerequisites +* The Windows `Machine` objects that hosted your Windows workloads are removed from your cluster. * The WMCO is removed from your cluster. .Procedure -. Remove all Windows workloads that were created in the `openshift-windows-machine-config-operator` namespace: +This procedure assumes that you are using the default `openshift-windows-machine-config-operator` namespace. + +// Removing the workloads and pods steps, as these should have been done as a prereq for removing the Operator + +. Delete the subscription + [source,terminal] ---- -$ oc delete --all pods --namespace=openshift-windows-machine-config-operator +$ oc delete subscription -n openshift-windows-machine-config-operator windows-machine-config-operator ---- -. Verify that all pods in the `openshift-windows-machine-config-operator` namespace are deleted or are reporting a terminating state: +. Delete the CSV ++ +[source,terminal] +---- +$ oc delete csv -n openshift-windows-machine-config-operator ${WMCO_CSV} +---- + +. Delete RBAC resources ++ +[source,terminal] +---- +$ oc delete clusterrolebinding windows-instance-config-daemon +---- + [source,terminal] ---- -$ oc get pods --namespace openshift-windows-machine-config-operator +$ oc delete clusterroles windows-instance-config-daemon ---- . Delete the `openshift-windows-machine-config-operator` namespace: From 044305e5c8b5aef3d7468a65c8895387c0642e2e Mon Sep 17 00:00:00 2001 From: Michael Burke Date: Tue, 25 Feb 2025 09:10:10 -0500 Subject: [PATCH 2/4] edits per jose --- modules/deleting-wmco-namespace.adoc | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/modules/deleting-wmco-namespace.adoc b/modules/deleting-wmco-namespace.adoc index 193ec369a9f2..72fafe5b392f 100644 --- a/modules/deleting-wmco-namespace.adoc +++ b/modules/deleting-wmco-namespace.adoc @@ -17,23 +17,35 @@ After removing the Windows Machine Config Operator, it is recommended that you r This procedure assumes that you are using the default `openshift-windows-machine-config-operator` namespace. -// Removing the workloads and pods steps, as these should have been done as a prereq for removing the Operator +. Remove all resources that were created in the `openshift-windows-machine-config-operator` namespace by using the following command: ++ +[source,terminal] +---- +$ oc delete --all pods --namespace=openshift-windows-machine-config-operator +---- + +. Verify that all pods in the `openshift-windows-machine-config-operator` namespace are deleted or are reporting a terminating state by using the following command: ++ +[source,terminal] +---- +$ oc get pods --namespace openshift-windows-machine-config-operator +---- -. Delete the subscription +. Delete the subscription by using the following command: + [source,terminal] ---- $ oc delete subscription -n openshift-windows-machine-config-operator windows-machine-config-operator ---- -. Delete the CSV +. Delete the CSV by using the following command: + [source,terminal] ---- $ oc delete csv -n openshift-windows-machine-config-operator ${WMCO_CSV} ---- -. Delete RBAC resources +. Delete RBAC resources by using the following command: + [source,terminal] ---- @@ -45,7 +57,7 @@ $ oc delete clusterrolebinding windows-instance-config-daemon $ oc delete clusterroles windows-instance-config-daemon ---- -. Delete the `openshift-windows-machine-config-operator` namespace: +. Delete the `openshift-windows-machine-config-operator` namespace by using the following command: + [source,terminal] ---- From 827a7b82c5c82d10e37fc58f9631b3025a6bc00c Mon Sep 17 00:00:00 2001 From: Michael Burke Date: Thu, 27 Feb 2025 08:07:00 -0500 Subject: [PATCH 3/4] edits --- modules/deleting-wmco-namespace.adoc | 42 ++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/modules/deleting-wmco-namespace.adoc b/modules/deleting-wmco-namespace.adoc index 72fafe5b392f..c10a89fa33c8 100644 --- a/modules/deleting-wmco-namespace.adoc +++ b/modules/deleting-wmco-namespace.adoc @@ -17,12 +17,17 @@ After removing the Windows Machine Config Operator, it is recommended that you r This procedure assumes that you are using the default `openshift-windows-machine-config-operator` namespace. -. Remove all resources that were created in the `openshift-windows-machine-config-operator` namespace by using the following command: +. Remove all WMCO resources that were created in the `openshift-windows-machine-config-operator` namespace by using the following command: + [source,terminal] ---- $ oc delete --all pods --namespace=openshift-windows-machine-config-operator ---- ++ +[NOTE] +==== +The `openshift-windows-machine-config-operator` namespace is reserved for WMCO resources. There should be no Windows workloads or pods in the namespace. +==== . Verify that all pods in the `openshift-windows-machine-config-operator` namespace are deleted or are reporting a terminating state by using the following command: + @@ -31,18 +36,45 @@ $ oc delete --all pods --namespace=openshift-windows-machine-config-operator $ oc get pods --namespace openshift-windows-machine-config-operator ---- -. Delete the subscription by using the following command: +. Delete the subscription and CSV: by using the following command: + +.. Ensure the latest version of the subscribed operator is identified in the `currentCSV` field by using the following command: ++ +[source,terminal] +---- +$ oc get subscription.operators.coreos.com windows-machine-config-operator -n openshift-windows-machine-config-operator -o yaml | grep currentCSV +---- + +.Example output [source,terminal] ---- -$ oc delete subscription -n openshift-windows-machine-config-operator windows-machine-config-operator + currentCSV: openshift-windows-machine-config-operator ---- -. Delete the CSV by using the following command: +.. Delete the subscription by using the following command: ++ +[source,terminal] +---- +$ oc delete subscription.operators.coreos.com windows-machine-config-operator -n openshift-windows-machine-config-operator +---- ++ +.Example output +[source,terminal] +---- +subscription.operators.coreos.com "windows-machine-config-operator" deleted +---- + +.. Delete the CSV for the Operator in the target namespace by using the following command with the `currentCSV` value from the previous step: ++ +[source,terminal] +---- +$ oc delete clusterserviceversion windows-machine-config-operator -n openshift-windows-machine-config-operator +---- + +.Example output [source,terminal] ---- -$ oc delete csv -n openshift-windows-machine-config-operator ${WMCO_CSV} +clusterserviceversion.operators.coreos.com "serverless-operator.v1.28.0" deleted ---- . Delete RBAC resources by using the following command: From d356bb040df7090c25017136fae0e0530d64f081 Mon Sep 17 00:00:00 2001 From: Michael Burke Date: Thu, 27 Feb 2025 16:01:56 -0500 Subject: [PATCH 4/4] edits from testing --- modules/deleting-wmco-namespace.adoc | 37 +--------------------------- modules/uninstalling-wmco.adoc | 2 +- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/modules/deleting-wmco-namespace.adoc b/modules/deleting-wmco-namespace.adoc index c10a89fa33c8..f2bafa8d0b0e 100644 --- a/modules/deleting-wmco-namespace.adoc +++ b/modules/deleting-wmco-namespace.adoc @@ -35,46 +35,11 @@ The `openshift-windows-machine-config-operator` namespace is reserved for WMCO r ---- $ oc get pods --namespace openshift-windows-machine-config-operator ---- - -. Delete the subscription and CSV: by using the following command: - -.. Ensure the latest version of the subscribed operator is identified in the `currentCSV` field by using the following command: -+ -[source,terminal] ----- -$ oc get subscription.operators.coreos.com windows-machine-config-operator -n openshift-windows-machine-config-operator -o yaml | grep currentCSV ----- -+ -.Example output -[source,terminal] ----- - currentCSV: openshift-windows-machine-config-operator ----- - -.. Delete the subscription by using the following command: -+ -[source,terminal] ----- -$ oc delete subscription.operators.coreos.com windows-machine-config-operator -n openshift-windows-machine-config-operator ----- -+ -.Example output -[source,terminal] ----- -subscription.operators.coreos.com "windows-machine-config-operator" deleted ----- - -.. Delete the CSV for the Operator in the target namespace by using the following command with the `currentCSV` value from the previous step: -+ -[source,terminal] ----- -$ oc delete clusterserviceversion windows-machine-config-operator -n openshift-windows-machine-config-operator ----- + .Example output [source,terminal] ---- -clusterserviceversion.operators.coreos.com "serverless-operator.v1.28.0" deleted +No resources found in openshift-windows-machine-config-operator namespace. ---- . Delete RBAC resources by using the following command: diff --git a/modules/uninstalling-wmco.adoc b/modules/uninstalling-wmco.adoc index 3a0ca2c9c2dc..1144c19a0223 100644 --- a/modules/uninstalling-wmco.adoc +++ b/modules/uninstalling-wmco.adoc @@ -14,7 +14,7 @@ You can uninstall the Windows Machine Config Operator (WMCO) from your cluster. .Procedure -. From the *Operators -> OperatorHub* page, use the *Filter by keyword* box to search for `Red Hat Windows Machine Config Operator`. +. From the *Operators -> OperatorHub* page, use the *Filter by keyword* box to search for `Windows Machine Config Operator`. . Click the *Red Hat Windows Machine Config Operator* tile. The Operator tile indicates it is installed.