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

feat: use an upgrade service deployment mechanism for embedded clusters #4756

Merged
merged 51 commits into from
Jul 15, 2024

Conversation

sgalsaleh
Copy link
Member

@sgalsaleh sgalsaleh commented Jul 11, 2024

What this PR does:

This PR changes the deployment mechanism for embedded clusters so that on upgrades, the version of KOTS / embedded cluster included in the release is used instead of the currently deployed version of KOTS / embedded cluster to fetch, render, and deploy the release.

It also changes the versioning mechanism so it is more similar to how Helm works where a new version/revision is created only when a change is actually deployed. When you deploy, you take all your inputs (manifests, config values, charts, registry settings, etc.), put them together, and deploy the new revision. There is no pre-rendering of versions that never get deployed, and you don’t have to make multiple changes to change multiple inputs.

NOTE: This new versioning / deployment mechanism is currently for embedded clusters only, and the plan is to adopt it for existing/kURL clusters later on.

Why we need it:

Main problem targeted by this change:

A key design goal for embedded cluster is that the infra and the app are coupled together, so the vendor tests and deploys their release and expects a particular version of their application to work on a particular version of embedded cluster and KOTS. During upgrades, however, the currently deployed version of KOTS pulls in and renders newly available versions. These newly available versions might specify a different embedded cluster version that includes a different KOTS version, which means the vendor might make use of new KOTS functionality. The old version of KOTS may be unable to render the newly available version, which can block the end-user from upgrading unless the vendor creates new releases that first upgrade KOTS and only later leverage the new functionality available in that version.

Other problems that are solved or improved by this approach include:

  • Unblocks the work for adding the ability to retract a release that has already been promoted to a channel.
  • Confusion around the version history page, its ordering, etc. The UX of the version history page can be very challenging beyond basic use.
  • We have a lot of complex and difficult logic for the version history page to handle features like semantic versioning, required releases, pending versions, etc. We can eventually eliminate all of that code with this approach.

Which issue(s) this PR fixes:

Fixes SC-105486

Special notes for your reviewer:

Steps to reproduce

Does this PR introduce a user-facing change?


Does this PR require documentation?

TBD

sgalsaleh and others added 30 commits June 26, 2024 17:11
* airgap preflight reporting for upgrade service

* create SubmitAppInfo func for upgrade service

* use UpgradeServiceParams where possible
* ability to deploy an available update
* Airgap upgrade service

---------

Co-authored-by: Craig O'Donnell <[email protected]>
* feat(ec): ability to upgrade the cluster

* compile

* f

* f

* f

* f

* remove test

* increase upgrade timeout to 15 minutes
…lish (#4734)

* wip

* wip

* loading state for start service
minor ui changes

* remove log
@sgalsaleh sgalsaleh added the type::feature New feature or request label Jul 11, 2024
@sgalsaleh sgalsaleh marked this pull request as ready for review July 15, 2024 13:34
Copy link
Member

@laverya laverya left a comment

Choose a reason for hiding this comment

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

I have not adequately reviewed the TS/TSX stuff yet, but go looks ok

laverya
laverya previously approved these changes Jul 15, 2024
Copy link
Member

@alicenstar alicenstar left a comment

Choose a reason for hiding this comment

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

Approved from front end perspective. Didn't see anything that really jumped out at me. Love to see the organizational and TypeScript improvements! Would be nice to add unit tests in the future. But no blockers from me.

@sgalsaleh sgalsaleh merged commit 4b2701d into main Jul 15, 2024
111 checks passed
@sgalsaleh sgalsaleh deleted the kots-upgrader branch July 15, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants