-
Notifications
You must be signed in to change notification settings - Fork 8
feat(kurl-migration): initialize kurl migration #3207
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
base: main
Are you sure you want to change the base?
feat(kurl-migration): initialize kurl migration #3207
Conversation
|
This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID. Online Installer: Airgap Installer (may take a few minutes before the airgap bundle is built): Happy debugging! |
sgalsaleh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a dryrun test for this new functionality?
What this PR does / why we need it:
This PR implements initial detection for kURL to Embedded Cluster V3 for migration.
Key changes:
Migration Detection Infrastructure (
cmd/installer/cli/migration.go):isKurlCluster()- Detects if the system is running kURL by checking for kURL kubeconfig and thekurl-configConfigMapisECInstalled()- Checks if Embedded Cluster is already installeddetectKurlMigration()- Main detection function that determines if migration is neededgetKurlInstallDirectory()- Reads kURL install directory from ConfigMap (defaults to/var/lib/kurl)exportKurlPasswordHash()- Exports kotsadm password hash (for future migration use)Upgrade Command Integration (
cmd/installer/cli/upgrade.go):Why we need this:
This is the first step toward supporting migration from kURL to Embedded Cluster V3. While actual migration functionality will come in future PRs, this establishes the detection infrastructure
Which issue(s) this PR fixes:
Fixes: https://app.shortcut.com/replicated/story/130962
Does this PR require a test?
Yes - includes comprehensive testing:
cmd/installer/cli/migration_test.go):TestGetKurlInstallDirectory- Tests ConfigMap reading with various scenariosTestExportKurlPasswordHash- Tests password hash extractionTestIsECInstalled- Documents expected behavior (requires filesystem mocking for full testing)TestIsKurlCluster- Documents expected behavior (requires filesystem mocking for full testing)Does this PR require a release note?
Does this PR require documentation?
NONE