6.5. Deleting the Argo CD pipeline post-migration
After you migrate all single-node OpenShift clusters from using SiteConfig CRs to ClusterInstance CRs, you can delete the original Argo CD application and related resources that managed the SiteConfig CRs.
Only delete the Argo CD application and related resources after you have confirmed that all clusters are successfully managed by the new Argo CD application that uses ClusterInstance CRs. Additionally, if the Argo CD project was only used for the migrated cluster’s Argo application, you can also delete this project.
Prerequisites
-
You have logged in to the hub cluster as a user with
cluster-adminprivileges. -
All single-node OpenShift clusters have been successfully migrated to use
ClusterInstanceCRs and are managed by another Argo CD application.
Procedure
Delete the original Argo CD application that managed the
SiteConfigCRs:$ oc delete application.argo clusters -n openshift-gitops-
Replace
clusterswith the name of your original Argo CD application.
-
Replace
Delete the original Argo CD project by running the following command:
$ oc delete appproject ztp-app-project -n openshift-gitops-
Replace
ztp-app-projectwith the name of your original Argo CD project.
-
Replace
Verification
Confirm that the original Argo CD application is deleted by running the following command:
$ oc get appproject -n openshift-gitopsExample output
NAME AGE default 6d20h policy-app-project 2d22h ztpv2-app-project 44h-
The original Argo CD project in this example,
ztp-app-projectis not present in the output.
-
The original Argo CD project in this example,
Confirm that the original Argo CD project is deleted by running the following command:
oc get applications.argo -n openshift-gitopsExample output
NAME SYNC STATUS HEALTH STATUS clusters-v2 Synced Healthy policies Synced Healthy-
The original Argo CD application in this example,
clustersis not present in the output.
-
The original Argo CD application in this example,