Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add v1->v3 cluster migration #575

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

alexander-demicev
Copy link
Member

What this PR does / why we need it:
This PR allows migrating from V1->V3 cluster without reimporting the clusters. Rancher already creates a V3 cluster for every V1 cluster. V3 cluster controller will check that V1 cluster includes a migrated annotation or exists at all for a given v3 cluster if the annotation is present, the reconciliation will continue as expected.
Users are required to set proper labels on the existing V3 cluster before migrating, this will be described in the ADR and rancher turtles docs.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@salasberryfin
Copy link
Contributor

Thanks @alexander-demicev, LGTM. I pushed some minor changes to fix CI checks and I'm fixing E2E tests locally and will be pushing an update too.

@salasberryfin salasberryfin force-pushed the v1v3clustermigration branch 2 times, most recently from 8284d36 to f6374f2 Compare June 21, 2024 09:41
@furkatgofurov7
Copy link
Contributor

@alexander-demicev is this a duplicate of #576 ?

@salasberryfin
Copy link
Contributor

Hey @furkatgofurov7, #576 implements the approach presented by @Danil-Grigorev, which will be considered the primary migration method. The changes proposed in this PR will allow us to also support manual migration of clusters and it will also help with avoiding breaking clusters when users do not follow the proper migration procedure, i.e. prevent from creating duplicate resources to represent the same CAPI cluster.

internal/controllers/import_controller_v3.go Outdated Show resolved Hide resolved
internal/controllers/import_controller_v3.go Outdated Show resolved Hide resolved
internal/controllers/import_controller_v3.go Outdated Show resolved Hide resolved
internal/controllers/import_controller_v3.go Outdated Show resolved Hide resolved
@salasberryfin salasberryfin force-pushed the v1v3clustermigration branch 3 times, most recently from 262b3b2 to 13fecc9 Compare June 26, 2024 14:36
@salasberryfin
Copy link
Contributor

Thanks for the review @Danil-Grigorev. Only E2E is pending for this to be ready to be merged.

alexander-demicev and others added 2 commits June 28, 2024 09:45
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
Signed-off-by: Carlos Salas <carlos.salas@suse.com>
@Danil-Grigorev Danil-Grigorev enabled auto-merge (squash) June 28, 2024 07:55
@Danil-Grigorev Danil-Grigorev merged commit 7bd8932 into rancher:main Jun 28, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants