Skip to content

Commit 619e9a5

Browse files
authored
[ci] Pin k3s to v1.23.6+k3s1 (kubernetes#1907) (kubernetes#1921)
This PR pinns k3s to v1.23.6+k3s1. We stick with that as long as we can't reliably say that newer versions work well enough for us. In the future, we must change code for k3s-v1.24.0 anywayse, because docker is not supported there anyways. Until we change away from docker we can't update to v1.24.
1 parent 3f50133 commit 619e9a5

File tree

5 files changed

+8
-25
lines changed

5 files changed

+8
-25
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
k8s_branch: "master"
2+
k3s_release: "v1.23.6+k3s1"
33
worker_node_count: 1
44
cluster_token: "9a08jv.c0izixklcxtmnze7"
55
devstack_workdir: "{{ ansible_user_dir }}/devstack"
@@ -8,4 +8,4 @@ sg_name: "k3s_sg"
88
keypair_name: "k3s_keypair"
99
image_url: "https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img"
1010
image_name: "ubuntu-focal"
11-
master_port_name: "k3s_master"
11+
master_port_name: "k3s_master"

tests/playbooks/roles/install-k3s/tasks/main.yaml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@
77
packages:
88
- jq
99

10-
- name: Get k3s release
11-
shell:
12-
executable: /bin/bash
13-
cmd: |
14-
# Get k3s release based on the given k8s branch.
15-
branch={{ k8s_branch }}
16-
if [[ "$branch" = "master" ]]; then
17-
k3s_release=$(curl -s "https://api.github.com/repos/k3s-io/k3s/tags" | jq -r '.[0].name')
18-
else
19-
# release-1.20 --> 1.20
20-
k8s_minor=${branch##*-}
21-
# 1.20 --> v1.20.x+k3s1 or v1.20.1-rc1+k3s1
22-
k3s_release=$(curl -s "https://api.github.com/repos/k3s-io/k3s/tags" | jq -r '.[].name' | grep -E "^v${k8s_minor}.[0-9a-z\+\-]+\+k3s1$" | awk 'NR==1 {print}')
23-
fi
24-
echo $k3s_release
25-
register: release
26-
2710
- name: Create openstack resources
2811
shell:
2912
executable: /bin/bash
@@ -98,8 +81,8 @@
9881
runcmd:
9982
- curl -sSL https://get.docker.com/ | sh
10083
- mkdir -p /var/lib/rancher/k3s/agent/images/
101-
- curl -sSL https://github.com/k3s-io/k3s/releases/download/{{ release.stdout }}/k3s-airgap-images-amd64.tar -o /var/lib/rancher/k3s/agent/images/k3s-airgap-images.tar
102-
- curl -sSL https://github.com/k3s-io/k3s/releases/download/{{ release.stdout }}/k3s -o /usr/local/bin/k3s
84+
- curl -sSL https://github.com/k3s-io/k3s/releases/download/{{ k3s_release }}/k3s-airgap-images-amd64.tar -o /var/lib/rancher/k3s/agent/images/k3s-airgap-images.tar
85+
- curl -sSL https://github.com/k3s-io/k3s/releases/download/{{ k3s_release }}/k3s -o /usr/local/bin/k3s
10386
- curl -sSL https://get.k3s.io -o /var/lib/rancher/k3s/install.sh
10487
- chmod u+x /var/lib/rancher/k3s/install.sh /usr/local/bin/k3s
10588
- INSTALL_K3S_SKIP_DOWNLOAD=true /var/lib/rancher/k3s/install.sh --docker --disable traefik --disable metrics-server --disable servicelb --disable-cloud-controller --kubelet-arg="cloud-provider=external" --tls-san {{ k3s_fip }} --token {{ cluster_token }}
@@ -194,4 +177,4 @@
194177

195178
- name: Merge KUBECONFIG env vars into global env
196179
set_fact:
197-
global_env: "{{ global_env | combine({'KUBECONFIG': kubeconfig}) }}"
180+
global_env: "{{ global_env | combine({'KUBECONFIG': kubeconfig}) }}"

tests/playbooks/test-csi-cinder-e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- cinder
2121
- role: install-k3s
2222
worker_node_count: 0
23-
k8s_branch: release-1.23
23+
k3s_release: v1.23.6+k3s1
2424
- role: install-docker
2525
- role: install-docker-registry
2626
cert_hosts: ' ["{{ ansible_default_ipv4.address }}"]'

tests/playbooks/test-csi-manila-e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- manila
2020
- role: install-k3s
2121
worker_node_count: 0
22-
k8s_branch: release-1.23
22+
k3s_release: v1.23.6+k3s1
2323
- role: install-docker
2424
- role: install-docker-registry
2525
cert_hosts: ' ["{{ ansible_default_ipv4.address }}"]'

tests/playbooks/test-occm-e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
- barbican
2222
- role: install-k3s
2323
worker_node_count: 0
24-
k8s_branch: release-1.23
24+
k3s_release: v1.23.6+k3s1
2525
- role: install-docker
2626
- role: install-docker-registry
2727
cert_hosts: ' ["{{ ansible_default_ipv4.address }}"]'

0 commit comments

Comments
 (0)