Skip to content

Commit d03b8c1

Browse files
committed
Use last patch versions by default for etcd/crio/crictl
This uses the same logic than the other versions, with simplications for crictl and crio whose versionning scheme is tied to upstream kubernetes. Also move some version variables in vars/ rather than defaults/, because they are not used elsewhere and don't really make sense as modifiable by the user.
1 parent b1fc870 commit d03b8c1

File tree

3 files changed

+20
-26
lines changed

3 files changed

+20
-26
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ Note:
112112

113113
- Core
114114
- [kubernetes](https://github.com/kubernetes/kubernetes) 1.32.5
115-
- [etcd](https://github.com/etcd-io/etcd) 3.5.16
115+
- [etcd](https://github.com/etcd-io/etcd) 3.5.21
116116
- [docker](https://www.docker.com/) 28.0
117117
- [containerd](https://containerd.io/) 2.0.5
118-
- [cri-o](http://cri-o.io/) 1.32.0 (experimental: see [CRI-O Note](docs/CRI/cri-o.md). Only on fedora, ubuntu and centos based OS)
118+
- [cri-o](http://cri-o.io/) 1.32.4 (experimental: see [CRI-O Note](docs/CRI/cri-o.md). Only on fedora, ubuntu and centos based OS)
119119
- Network Plugin
120120
- [cni-plugins](https://github.com/containernetworking/plugins) 1.4.1
121121
- [calico](https://github.com/projectcalico/calico) 3.29.3

roles/kubespray_defaults/defaults/main/download.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -124,32 +124,10 @@ helm_version: "{{ (helm_archive_checksums['amd64'] | dict2items)[0].key }}"
124124
nerdctl_version: "{{ (nerdctl_archive_checksums['amd64'] | dict2items)[0].key }}"
125125
skopeo_version: "{{ (skopeo_binary_checksums['amd64'] | dict2items)[0].key }}"
126126

127-
# Get kubernetes major version (i.e. 1.17.4 => 1.17)
128-
kube_major_version: "{{ (kube_version | split('.'))[:-1] | join('.') }}"
129-
130-
pod_infra_supported_versions:
131-
'1.32': '3.10'
132-
'1.31': '3.10'
133-
'1.30': '3.9'
134127
pod_infra_version: "{{ pod_infra_supported_versions[kube_major_version] }}"
135-
136-
etcd_supported_versions:
137-
'1.32': 3.5.16
138-
'1.31': 3.5.16
139-
'1.30': 3.5.16
140128
etcd_version: "{{ etcd_supported_versions[kube_major_version] }}"
141-
142-
crictl_supported_versions:
143-
'1.32': 1.32.0
144-
'1.31': 1.31.1
145-
'1.30': 1.30.1
146-
crictl_version: "{{ crictl_supported_versions[kube_major_version] }}"
147-
148-
crio_supported_versions:
149-
'1.32': 1.32.0
150-
'1.31': 1.31.3
151-
'1.30': 1.30.3
152-
crio_version: "{{ crio_supported_versions[kube_major_version] }}"
129+
crictl_version: "{{ (crictl_checksums['amd64'].keys() | select('version', kube_major_next_version, '<'))[0] }}"
130+
crio_version: "{{ (crio_archive_checksums['amd64'].keys() | select('version', kube_major_next_version, '<'))[0] }}"
153131

154132
# Scheduler plugins doesn't build for K8s 1.29 yet
155133
scheduler_plugins_supported_versions:

roles/kubespray_defaults/vars/main/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
---
2+
# Internal version manipulation tooling
3+
4+
# Get kubernetes major version (i.e. 1.17.4 => 1.17)
5+
kube_major_version: "{{ (kube_version | split('.'))[:-1] | join('.') }}"
6+
kube_next: "{{ ((kube_version | split('.'))[1] | int) + 1 }}"
7+
kube_major_next_version: "1.{{ kube_next }}"
8+
9+
pod_infra_supported_versions:
10+
'1.32': '3.10'
11+
'1.31': '3.10'
12+
'1.30': '3.9'
13+
14+
etcd_supported_versions:
15+
'1.32': "{{ (etcd_binary_checksums['amd64'].keys() | select('version', '3.6', '<'))[0] }}"
16+
'1.31': "{{ (etcd_binary_checksums['amd64'].keys() | select('version', '3.6', '<'))[0] }}"
17+
'1.30': "{{ (etcd_binary_checksums['amd64'].keys() | select('version', '3.6', '<'))[0] }}"
218
# Kubespray constants
319

420
kube_proxy_deployed: "{{ 'addon/kube-proxy' not in kubeadm_init_phases_skip }}"

0 commit comments

Comments
 (0)