Skip to content

Conversation

@rohennes
Copy link
Contributor

@rohennes rohennes commented Jul 29, 2025

TELCODOCS-2281: Procedure to migrate from clusterinstance to siteconfig

Version(s):
4.20+

Issue:
https://issues.redhat.com/browse/TELCODOCS-2281

Link to docs preview:
https://96809--ocpdocs-pr.netlify.app/openshift-enterprise/latest/edge_computing/ztp-migrate-clusterinstance.html

QE review:

  • QE has approved this change.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 29, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 29, 2025

@rohennes: This pull request references TELCODOCS-2281 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

Version(s):

Issue:

Link to docs preview:

QE review:

  • QE has approved this change.

Additional information:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 29, 2025
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Jul 29, 2025

@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 30, 2025
// * edge_computing/ztp-migrate-clusterinstance.adoc

:_mod-docs-content-type: PROCEDURE
[id="ztp-preparing-migrate-clusterinstance_{context}"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] OpenShiftAsciiDoc.IdHasContextVariable: ID is missing the '_{context}' variable at the end of the ID.

@rohennes rohennes force-pushed the TELCODOCS-2281 branch 2 times, most recently from de07088 to eb7d799 Compare August 5, 2025 15:31
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 6, 2025

@rohennes: This pull request references TELCODOCS-2281 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

TELCODOCS-2281: Procedure to migrate from clusterinstance to siteconfig

Version(s):
4.20+

Issue:
https://issues.redhat.com/browse/TELCODOCS-2281

Link to docs preview:

QE review:

  • QE has approved this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

1 similar comment
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 6, 2025

@rohennes: This pull request references TELCODOCS-2281 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

TELCODOCS-2281: Procedure to migrate from clusterinstance to siteconfig

Version(s):
4.20+

Issue:
https://issues.redhat.com/browse/TELCODOCS-2281

Link to docs preview:

QE review:

  • QE has approved this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 6, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 7, 2025

@rohennes: This pull request references TELCODOCS-2281 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

TELCODOCS-2281: Procedure to migrate from clusterinstance to siteconfig

Version(s):
4.20+

Issue:
https://issues.redhat.com/browse/TELCODOCS-2281

Link to docs preview:
https://96809--ocpdocs-pr.netlify.app/openshift-enterprise/latest/edge_computing/ztp-migrate-clusterinstance.html

QE review:

  • QE has approved this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rohennes rohennes force-pushed the TELCODOCS-2281 branch 6 times, most recently from 7e66698 to d76ad75 Compare August 27, 2025 15:26
@rohennes rohennes force-pushed the TELCODOCS-2281 branch 6 times, most recently from ac3fdcd to e98b409 Compare September 4, 2025 08:34

The migration process involves the following high-level steps:

. Create a parallel pipeline by preparing a new Git folder in your repository and creating a new Argo CD project and application that monitors this folder.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say, preparing a new Git folder structure. Eventually, you will create a Git structure with all the elements required in your ZTP pipeline. See https://labs.sysdeseng.com/5g-ran-deployments-on-ocp-lab/4.19/deployment-considerations.html#git-repo-structure


toc::[]

This content describes how to incrementally migrate {sno} clusters from `SiteConfig` custom resources (CRs) to `ClusterInstance` CRs. During migration, the existing and new pipelines run in parallel, so you can migrate clusters one at a time in a controlled and phased manner.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not have to be one cluster at a time; it can be in groups. The point here is that they do not have to be all of your fleet migrated simultaneously. You can choose what suits you best.


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 a basis for this example migration:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would include the site-configs-v2 folder (at the same level as site-configs/). In the following folder structure I only see the old structure for the SiteConfig. In the Argo CD App definition for the ClusterInstance you're defining the root folder as site-configs-v2, so it makes sense to me to be shown here.

Copy link
Contributor Author

@rohennes rohennes Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, in the performing the migration procedure, the first step is to mirror the v1 folder, and I show the v2 folder structure there. So perhaps that's enough. The user can then use this v1 structure as a reference

@rohennes rohennes force-pushed the TELCODOCS-2281 branch 3 times, most recently from 70db14e to 63303f6 Compare September 9, 2025 12:28
@sudomakeinstall2
Copy link

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2025
Copy link
Contributor

@leo8a leo8a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @rohennes, content looks good to me, just dropped a couple of nits here and there. Thanks for the PR.


.Prerequisites
* You have logged in to the hub cluster as a user with `cluster-admin` privileges.
* All {sno} clusters have been successfully migrated to use `ClusterInstance` CRs and are managed by the another Argo CD application.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* All {sno} clusters have been successfully migrated to use `ClusterInstance` CRs and are managed by the another Argo CD application.
* All {sno} clusters have been successfully migrated to use `ClusterInstance` CRs and are managed by another Argo CD application.


.. Optionally, use the `siteconfig-converter` tool to automatically convert existing `SiteConfig` CRs to `ClusterInstance` CRs.

. When you complete the cluster migration, delete the original Argo project and application clean up any related resources.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
. When you complete the cluster migration, delete the original Argo project and application clean up any related resources.
. When you complete the cluster migration, delete the original Argo project, and the application cleans 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 a basis for this example migration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following Git repository folder structure is used a basis for this example migration:
The following Git repository folder structure is used as a basis for this example migration:

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 24, 2025
@openshift-ci
Copy link

openshift-ci bot commented Sep 24, 2025

New changes are detected. LGTM label has been removed.

@dgonyier
Copy link

lgtm

Copy link
Contributor

@slovern slovern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of work in here. Very clearly structured set of procedures to break down a substantial task.

A few comments to consider / rage against as you see fit

====
The SiteConfig Operator only reconciles updates for `ClusterInstance` objects. The controller does not monitor or manage deprecated `SiteConfig` objects.

Use either `SiteConfig` or `ClusterInstance` CRs for cluster definitions in the hub cluster to avoid unintended deployments of managed clusters.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the meaning here "choose either on or the other"?
Or is it "use either one ... makes no difference to me"?

I've a feeling it's the first but I think this could be clearer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sudomakeinstall2 - is it better to remove the line "Use either SiteConfig or ClusterInstance CRs for cluster definitions in the hub cluster to avoid unintended deployments of managed clusters."

If we are doing an incremental migration, won't there be both SiteConfig and ClusterInstance CRs in existence at the same time? So this point seems counter-intuitive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the sentence "Use either SiteConfig or ClusterInstance CRs for cluster definitions in the hub cluster to avoid unintended deployments of managed clusters."

to avoid confusion

sourceRepos:
- '*'
----
<1> The `ClusterInstance` CR manages the `siteconfig.open-cluster-management.io` object instead of the `SiteConfig` CR.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we doing callouts or the new approach with bullet points as in line 123 below??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps let's leave the callouts as they are for now.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 25, 2025

@rohennes: This pull request references TELCODOCS-2281 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

In response to this:

TELCODOCS-2281: Procedure to migrate from clusterinstance to siteconfig

Version(s):
4.20+

Issue:
https://issues.redhat.com/browse/TELCODOCS-2281

Link to docs preview:
https://96809--ocpdocs-pr.netlify.app/openshift-enterprise/latest/edge_computing/ztp-migrate-clusterinstance.html

QE review:

  • QE has approved this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link

openshift-ci bot commented Sep 30, 2025

@rohennes: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@slovern slovern added this to the Planned for 4.20 GA milestone Sep 30, 2025
@slovern slovern merged commit 7080b7e into openshift:main Sep 30, 2025
2 checks passed
@slovern
Copy link
Contributor

slovern commented Sep 30, 2025

/cherrypick enterprise-4.20

@openshift-cherrypick-robot

@slovern: new pull request created: #99873

In response to this:

/cherrypick enterprise-4.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch/enterprise-4.20 jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants