6장. Migrating from SiteConfig CRs to ClusterInstance CRs
You can incrementally migrate single-node OpenShift clusters from SiteConfig custom resources (CRs) to ClusterInstance CRs. During migration, the existing and new pipelines run in parallel, so you can migrate one or more clusters at a time in a controlled and phased manner.
-
The
SiteConfigCR is deprecated from OpenShift Container Platform version 4.18 and will be removed in a future version. -
The
ClusterInstanceCR is available from Red Hat Advanced Cluster Management (RHACM) version 2.12 or later.
6.1. Overview of migrating from SiteConfig CRs to ClusterInstance CRs 링크 복사링크가 클립보드에 복사되었습니다!
The ClusterInstance CR provides a more unified and generic approach to defining clusters and is the preferred method for managing cluster deployments in the GitOps ZTP workflow. The SiteConfig Operator, which manages the ClusterInstance custom resource (CR), is a fully developed controller shipped as an add-on within Red Hat Advanced Cluster Management (RHACM).
The SiteConfig Operator only reconciles updates for ClusterInstance objects. The controller does not monitor or manage deprecated SiteConfig objects.
The migration from SiteConfig CRs to ClusterInstance CRs provides several improvements, such as enhanced scalability and a clear separation of cluster parameters from the cluster deployment method. For more information about these improvements, and the SiteConfig Operator, see SiteConfig.
The migration process involves the following high-level steps:
- Set up the parallel pipeline by preparing a new Git folder structure in your repository and creating the corresponding Argo CD project and application.
To migrate the clusters incrementally, first remove the associated
SiteConfigCR from the old pipeline. Then, add a correspondingClusterInstanceCR to the new pipeline.참고By using the
prune=falsesync policy in the initial Argo CD application, the resources managed by this pipeline remain intact even after you remove the target cluster from this application. This approach ensures that the existing cluster resources remain operational during the migration process.-
Optionally, use the
siteconfig-convertertool to automatically convert existingSiteConfigCRs toClusterInstanceCRs.
-
Optionally, use the
- When you complete the cluster migration, delete the original Argo project and application and clean up any related resources.
The following sections describe how to migrate an example cluster, sno1, from using a SiteConfig CR to a ClusterInstance CR.
The following Git repository folder structure is used as a basis for this example migration:
├── site-configs/
│ ├── kustomization.yaml
│ ├── hub-1/
│ │ └── kustomization.yaml
│ │ ├── sno1.yaml
│ │ ├── sno2.yaml
│ │ ├── sno3.yaml
│ │ ├── extra-manifest/
│ │ │ ├── enable-crun-master.yaml
│ │ │ └── enable-crun-worker.yaml
│ ├── pre-reqs/
│ │ ├── kustomization.yaml
│ │ ├── sno1/
│ │ │ ├── bmc-credentials.yaml
│ │ │ ├── kustomization.yaml
│ │ │ └── pull-secret.yaml
│ │ ├── sno2/
│ │ │ ├── bmc-credentials.yaml
│ │ │ ├── kustomization.yaml
│ │ │ └── pull-secret.yaml
│ │ └── sno3/
│ │ ├── bmc-credentials.yaml
│ │ ├── kustomization.yaml
│ │ └── pull-secret.yaml
│ ├── reference-manifest/
│ │ └── 4.21/
│ ├──resources/
│ │ ├── active-ocp-version.yaml
│ │ └── kustomization.yaml
└── site-policies/ #Policies and configurations implemented for the clusters
...