Skip to content

Conversation

@diamonwiggins
Copy link
Contributor

What this PR does / why we need it:

This PR implements the foundation for the kURL to Embedded Cluster migration by starting the API server in migration mode when a kURL cluster is detected during upgrade. This allows the migration UI to be accessible and validates that the skeleton migration API endpoints are functional.

Key changes:

  • Modified upgrade.go to start the API server in migration mode when ENABLE_V3=1 and a kURL cluster is detected
  • Added runMigrationAPI() function that generates TLS certificates and bcrypt password hash at runtime
  • Added dryrun test TestUpgradeKURLMigration to validate the migration API endpoints
  • Test verifies that POST /api/linux/kurl-migration/start and GET /api/linux/kurl-migration/status return expected skeleton responses

Which issue(s) this PR fixes:

Relates to the kURL Migration Foundation work (Shortcut story TBD)

Does this PR require a test?

Yes, added TestUpgradeKURLMigration in tests/dryrun/upgrade_kurl_migration_test.go that validates:

  • API server starts correctly in migration mode
  • Authentication works with bcrypt password
  • Migration endpoints return expected skeleton responses
  • Migration state transitions from InProgress to Failed with "migration phase not implemented" error

Does this PR require a release note?

NONE

Does this PR require documentation?

NONE

@github-actions
Copy link

github-actions bot commented Nov 20, 2025

This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID.

Online Installer:

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/appver-dev-83e9833" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Airgap Installer (may take a few minutes before the airgap bundle is built):

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci-airgap/appver-dev-83e9833?airgap=true" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Happy debugging!

…github.com:replicatedhq/embedded-cluster into diamonwiggins/130971/kurl-migration-api-foundation
…github.com:replicatedhq/embedded-cluster into diamonwiggins/130971/kurl-migration-api-foundation
…github.com:replicatedhq/embedded-cluster into diamonwiggins/130971/kurl-migration-api-foundation
@diamonwiggins diamonwiggins merged commit 6acfee9 into main Dec 2, 2025
98 of 101 checks passed
@diamonwiggins diamonwiggins deleted the diamonwiggins/130971/kurl-migration-api-foundation branch December 2, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants