Skip to content

Conversation

@diamonwiggins
Copy link
Member

@diamonwiggins diamonwiggins commented Oct 10, 2025

What this PR does / why we need it:

Fixes an issue where channel switches in Embedded Cluster environments skip infrastructure upgrades, leaving clusters on outdated Kubernetes versions despite the vendor providing updated EmbeddedClusterConfig.

The Problem:
When a license sync triggers a channel switch in EC environments:

  1. KOTS automatically calls CheckForUpdates() which downloads the new channel's release
  2. User clicks "Deploy" in the admin console
  3. Deployment goes through the normal deployment flow (pkg/version/version.go:DeployVersion)
  4. Normal deployment flow does NOT check for infrastructure upgrades
  5. Cluster upgrade is skipped, leaving infrastructure outdated

The Root Cause:
KOTS has two distinct deployment flows:

  • Normal deployment flow: Used when users click "Deploy" - does not check for cluster upgrades
  • Upgrade service flow: Used for explicit EC upgrades - properly checks for and handles cluster upgrades via RequiresClusterUpgrade()

After a channel switch, the automatic download + manual deploy pattern uses the normal flow, which lacks infrastructure upgrade checks.

The Solution:
In Embedded Cluster environments, skip the automatic CheckForUpdates() call after channel switches. This allows users to manually check for updates, which can then be properly routed through the upgrade service flow that correctly handles infrastructure upgrades.

Changes made in pkg/handlers/license.go:

  • SyncLicense(): Skip automatic update check in EC after channel change
  • ChangeLicense(): Skip automatic update check in EC after channel change

Behavior after this fix:

  • Standard Kubernetes: No change - automatic update check happens after channel switch
  • Embedded Cluster: Skips automatic check; users manually check for updates, allowing proper upgrade service flow to handle infrastructure changes

Which issue(s) this PR fixes:

Fixes SC-129263

Does this PR require a test?

Tested manually in the local environment. Syncing a license after the channel resulted in the following:
Screenshot 2025-10-10 at 1 00 11 PM

Prior, two new versions showed up in the "All Versions" section with one of them being an upstream update which confusingly didn't deploy the infrastructure.

Does this PR require a release note?

Fixed an issue where channel switches in Embedded Cluster installations would skip infrastructure upgrades, leaving the cluster on an outdated Kubernetes version.

Does this PR require documentation?

NONE

@diamonwiggins diamonwiggins added type::bug Something isn't working bug::normal labels Oct 10, 2025
@diamonwiggins diamonwiggins merged commit fcb41bd into main Oct 10, 2025
95 checks passed
@diamonwiggins diamonwiggins deleted the diamonwiggins/sc-129263/fix-infra-install-skipped branch October 10, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug::normal type::bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants