Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
inkube.tf
. If undefined, the present behavior is preserved such that current installations are not affected. However, when defined, this variable takes precedence overinitial_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:
install k3s version
on above cluster and plan was changed to refer to k3s version and executed properlyinstall_k3s_version
and it was installed with the desired k3s versioninstall_k3s_version
variable on above cluster, plan changed to use initial k3s channel instead and executed properly