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

cli: fix upgrades when using outdated Kubernetes patch version #2718

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

daniel-weisse
Copy link
Member

@daniel-weisse daniel-weisse commented Dec 14, 2023

Context

Users may choose to not upgrade their Kubernetes version when running a Constellation upgrade.
This includes not upgrading a patch version of Kubernetes.
We use the Kubernetes version set in a user's config to determine which image to use for the Constellation deployed cloud-controller-manager and cluster-autoscaler.
Currently, the CLI incorrectly sets the k8s version to an empty string if a user chooses to apply an upgrade with a no longer supported Kubernetes patch version.

Proposed change(s)

  • Fix the issue by translating an outdated user's Kubernetes version to a currently supported Kubernetes version
    • Kubernetes upgrades are still skipped
    • This version is only used to determine which image to use for the cloud-controller-manager and cluster-autoscaler. Both of which are independent of the Kubernetes patch version

Additional info

@daniel-weisse daniel-weisse added the no changelog Change won't be listed in release changelog label Dec 14, 2023
@daniel-weisse daniel-weisse requested a review from msanft December 14, 2023 15:13
@daniel-weisse daniel-weisse changed the title cli: Fix empty k8s version on invalid k8s upgrade cli: fix empty k8s version on invalid k8s upgrade Dec 14, 2023
@daniel-weisse daniel-weisse marked this pull request as ready for review December 14, 2023 15:13
@daniel-weisse daniel-weisse added this to the v2.14.0 milestone Dec 14, 2023
@daniel-weisse daniel-weisse changed the title cli: fix empty k8s version on invalid k8s upgrade cli: fix upgrades when using outdated Kubernetes patch version Dec 14, 2023
Copy link

netlify bot commented Dec 14, 2023

Deploy Preview for constellation-docs canceled.

Name Link
🔨 Latest commit 4410dd9
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/657c55e72eb40900072f54ba

cli/internal/cmd/apply.go Outdated Show resolved Hide resolved
cli/internal/cmd/apply_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

Coverage report

Package Old New Trend
cli/internal/cmd 58.30% 58.50% ↗️
internal/versions/components [no test files] 32.40% ↗️

@daniel-weisse daniel-weisse merged commit a1f67d0 into main Dec 15, 2023
10 checks passed
@daniel-weisse daniel-weisse deleted the fix/cli/helm-upgrades branch December 15, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Change won't be listed in release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants