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

Allows specifying k3s version #1472

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

gmautner
Copy link
Contributor

@gmautner gmautner commented Sep 7, 2024

Remark: this PR had been previously approved in #1436 and then reverted in #1448 for a reason I believe was unrelated to the PR (k3s channel server outage). I’m resubmitting as asked to do so.

Sometimes a cluster operator might prefer to specify the k3s version (e.g. v1.29.6+k3s2) instead of the channel (e.g. v1.29, stable etc.)

Reasons for that could be not wanting the system upgrade controller to run at unpredictable times, or having more fine-grained control over the running version.

This PR introduces a new variable install_k3s_version in kube.tf. If undefined, the present behavior is preserved such that current installations are not affected. However, when defined, this variable takes precedence over initial_k3s_channel.

The mechanism for upgrades in either case continues to be the system upgrade controller.

The following scenarios were tested and worked according to expected:

  • Created a new cluster with default settings and initial k3s channel was used
  • Configured install k3s version on above cluster and plan was changed to refer to k3s version and executed properly
  • Created a new cluster with install_k3s_version and it was installed with the desired k3s version
  • Deleted install_k3s_version variable on above cluster, plan changed to use initial k3s channel instead and executed properly

Signed-off-by: Gilberto Mautner <[email protected]>
aleksasiriski
aleksasiriski previously approved these changes Oct 16, 2024
Copy link
Member

@aleksasiriski aleksasiriski left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Gilberto Mautner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants