You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ztp-deleting-node-using-siteconfig.adoc
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
[id="ztp-deleting-node-siteconfig_{context}"]
7
7
= Deleting a node by using the SiteConfig CR
8
8
9
-
By using a `SiteConfig` custom resource (CR), you can delete and reprovision a node.
9
+
By using a `SiteConfig` custom resource (CR), you can delete and reprovision a node.
10
10
This method is more efficient than manually deleting the node.
11
11
12
12
.Prerequisites
@@ -18,7 +18,7 @@ This method is more efficient than manually deleting the node.
18
18
19
19
.Procedure
20
20
21
-
. Update the `SiteConfig` CR to include the `bmac.agent-install.openshift.io/remove-agent-and-node-on-delete=true` annotation:
21
+
. Update the `SiteConfig` CR to include the `bmac.agent-install.openshift.io/remove-agent-and-node-on-delete=true` annotation and push the changes to the Git repository:
22
22
+
23
23
[source,yaml]
24
24
----
@@ -28,7 +28,7 @@ metadata:
28
28
name: "cnfdf20"
29
29
namespace: "cnfdf20"
30
30
spec:
31
-
Clusters:
31
+
clusters:
32
32
nodes:
33
33
- hostname: node6
34
34
role: "worker"
@@ -39,6 +39,19 @@ spec:
39
39
# ...
40
40
----
41
41
42
+
. Verify that the `BareMetalHost` object is annotated by running the following command:
. Suppress the generation of the `BareMetalHost` CR by updating the `SiteConfig` CR to include the `crSuppression.BareMetalHost` annotation:
43
56
+
44
57
[source,yaml]
@@ -58,7 +71,7 @@ spec:
58
71
# ...
59
72
----
60
73
61
-
. Push the changes to the Git repository and wait for deprovisioning to start.
74
+
. Push the changes to the Git repository and wait for deprovisioning to start.
62
75
The status of the `BareMetalHost` CR should change to `deprovisioning`. Wait for the `BareMetalHost` to finish deprovisioning, and be fully deleted.
63
76
64
77
.Verification
@@ -84,11 +97,11 @@ $ oc get nodes
84
97
+
85
98
[NOTE]
86
99
====
87
-
If you are working with secrets, deleting a secret too early can cause an issue because ArgoCD needs the secret to complete resynchronization after deletion.
100
+
If you are working with secrets, deleting a secret too early can cause an issue because ArgoCD needs the secret to complete resynchronization after deletion.
88
101
Delete the secret only after the node cleanup, when the current ArgoCD synchronization is complete.
89
102
====
90
103
91
104
.Next Steps
92
105
93
-
To reprovision a node, delete the changes previously added to the `SiteConfig`, push the changes to the Git repository, and wait for the synchronization to complete.
106
+
To reprovision a node, delete the changes previously added to the `SiteConfig`, push the changes to the Git repository, and wait for the synchronization to complete.
94
107
This regenerates the `BareMetalHost` CR of the worker node and triggers the re-install of the node.
0 commit comments