Skip to content

Commit 94d1f0e

Browse files
authored
Merge pull request #1448 from kube-hetzner/revert-1436-master
Revert "Allows specifying k3s version"
2 parents f5b69bc + dd5c1a0 commit 94d1f0e

File tree

5 files changed

+2
-30
lines changed

5 files changed

+2
-30
lines changed

init.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ resource "null_resource" "kustomization" {
128128
# Redeploy when versions of addons need to be updated
129129
versions = join("\n", [
130130
coalesce(var.initial_k3s_channel, "N/A"),
131-
coalesce(var.install_k3s_version, "N/A"),
132131
coalesce(var.cluster_autoscaler_version, "N/A"),
133132
coalesce(var.hetzner_ccm_version, "N/A"),
134133
coalesce(var.hetzner_csi_version, "N/A"),
@@ -234,7 +233,6 @@ resource "null_resource" "kustomization" {
234233
"${path.module}/templates/plans.yaml.tpl",
235234
{
236235
channel = var.initial_k3s_channel
237-
version = var.install_k3s_version
238236
disable_eviction = !var.system_upgrade_enable_eviction
239237
drain = var.system_upgrade_use_drain
240238
})

kube.tf.example

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,10 +597,6 @@ module "kube-hetzner" {
597597
# The default is "v1.29".
598598
# initial_k3s_channel = "stable"
599599

600-
# Allows you to specify the k3s version. If defined, supersedes initial_k3s_channel.
601-
# See https://github.com/k3s-io/k3s/releases
602-
# install_k3s_version = "v1.30.2+k3s2"
603-
604600
# The cluster name, by default "k3s"
605601
# cluster_name = ""
606602

locals.tf

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,10 @@ locals {
125125
swap_node_label = ["node.kubernetes.io/server-swap=enabled"]
126126

127127
install_k3s_server = concat(local.common_pre_install_k3s_commands, [
128-
var.install_k3s_version == "" ? (
129-
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_CHANNEL=${var.initial_k3s_channel} INSTALL_K3S_EXEC='server ${var.k3s_exec_server_args}' sh -"
130-
) : (
131-
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_VERSION=${var.install_k3s_version} INSTALL_K3S_EXEC='server ${var.k3s_exec_server_args}' sh -"
132-
)
128+
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_CHANNEL=${var.initial_k3s_channel} INSTALL_K3S_EXEC='server ${var.k3s_exec_server_args}' sh -"
133129
], (var.disable_selinux ? [] : local.apply_k3s_selinux), local.common_post_install_k3s_commands)
134130
install_k3s_agent = concat(local.common_pre_install_k3s_commands, [
135-
var.install_k3s_version == "" ? (
136-
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_CHANNEL=${var.initial_k3s_channel} INSTALL_K3S_EXEC='agent ${var.k3s_exec_agent_args}' sh -"
137-
) : (
138-
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_VERSION=${var.install_k3s_version} INSTALL_K3S_EXEC='agent ${var.k3s_exec_agent_args}' sh -"
139-
)
131+
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_CHANNEL=${var.initial_k3s_channel} INSTALL_K3S_EXEC='agent ${var.k3s_exec_agent_args}' sh -"
140132
], (var.disable_selinux ? [] : local.apply_k3s_selinux), local.common_post_install_k3s_commands)
141133

142134
control_plane_nodes = merge([

templates/plans.yaml.tpl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ metadata:
1010
k3s_upgrade: agent
1111
spec:
1212
concurrency: 1
13-
%{~ if version == "" ~}
1413
channel: https://update.k3s.io/v1-release/channels/${channel}
15-
%{~ else ~}
16-
version: ${version}
17-
%{~ endif ~}
1814
serviceAccountName: system-upgrade
1915
nodeSelector:
2016
matchExpressions:
@@ -46,11 +42,7 @@ metadata:
4642
k3s_upgrade: server
4743
spec:
4844
concurrency: 1
49-
%{~ if version == "" ~}
5045
channel: https://update.k3s.io/v1-release/channels/${channel}
51-
%{~ else ~}
52-
version: ${version}
53-
%{~ endif ~}
5446
serviceAccountName: system-upgrade
5547
nodeSelector:
5648
matchExpressions:

variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -545,12 +545,6 @@ variable "initial_k3s_channel" {
545545
}
546546
}
547547

548-
variable "install_k3s_version" {
549-
type = string
550-
default = ""
551-
description = "Allows you to specify the k3s version (Example: v1.29.6+k3s2). Supersedes initial_k3s_channel."
552-
}
553-
554548
variable "system_upgrade_enable_eviction" {
555549
type = bool
556550
default = true

0 commit comments

Comments
 (0)