Skip to content

Commit 2f477fa

Browse files
matthewgrossmanshiju-nv
authored andcommitted
fix(tests): pin the k3s installer to a release (#5223)
get.k3s.io serves the latest install.sh from k3s master, so the pinned checksum broke when upstream changed the script. Download install.sh from the release tag matching k3s_version instead and pin its checksum. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> Signed-off-by: Shiju <shiju@nvidia.com>
1 parent ce59971 commit 2f477fa

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • tests/tmachine/ansible/playbooks

‎tests/tmachine/ansible/playbooks/k3s.yaml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
state: present
2222
update_cache: true
2323

24+
# get.k3s.io serves the latest script, so pin the one from the k3s_version
25+
# release tag. Update the checksum whenever k3s_version changes.
2426
- name: Download K3s installer
2527
ansible.builtin.get_url:
26-
url: https://get.k3s.io
27-
checksum: sha256:e5cc3b3d9dfc1662c2d9be6da5abc9a4cd317d6abc3a5ffc02e3dd3248207fee
28+
url: "https://raw.githubusercontent.com/k3s-io/k3s/v{{ k3s_version | urlencode }}/install.sh"
29+
checksum: sha256:3ce239d57d43b2d836d2b561043433e6decae8b9dc41f5d13908c0fafb0340cd
2830
dest: /tmp/install-k3s.sh
2931
mode: "0755"
3032

0 commit comments

Comments
 (0)