Support deploying kubernetes 1.23 (#8323)

* Ensure entries for 1.23 are added for supported_versions vars

* cri-o: add support for kubernetes 1.23 but still use cri-o 1.22

* kubescheduler-config: diferentiate config versions based on kube_version
pull/8326/head
Cristian Calin 2021-12-21 11:38:46 +02:00 committed by GitHub
parent b49ae8c21d
commit c1954ff918
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 3 deletions

View File

@ -45,6 +45,7 @@ crio_stream_port: "10010"
crio_required_version: "{{ kube_version | regex_replace('^v(?P<major>\\d+).(?P<minor>\\d+).(?P<patch>\\d+)$', '\\g<major>.\\g<minor>') }}"
crio_kubernetes_version_matrix:
"1.23": "1.22"
"1.22": "1.22"
"1.21": "1.21"
"1.20": "1.20"

View File

@ -4,7 +4,8 @@ crio_packages:
- cri-tools
crio_kubernetes_version_matrix:
"1.23": "1.22"
"1.22": "1.22"
"1.21": "1.21"
"1.20": "1.20"
crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.20') }}"
crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.22') }}"

View File

@ -94,6 +94,7 @@ krew_version: "v0.4.2"
# Get kubernetes major version (i.e. 1.17.4 => 1.17)
kube_major_version: "{{ kube_version | regex_replace('^v([0-9])+\\.([0-9]+)\\.[0-9]+', 'v\\1.\\2') }}"
crictl_supported_versions:
v1.23: "v1.22.0"
v1.22: "v1.22.0"
v1.21: "v1.21.0"
v1.20: "v1.20.0"
@ -745,6 +746,7 @@ csi_livenessprobe_image_repo: "{{ kube_image_repo }}/sig-storage/livenessprobe"
csi_livenessprobe_image_tag: "v2.5.0"
snapshot_controller_supported_versions:
v1.23: "v4.2.1"
v1.22: "v4.2.1"
v1.21: "v4.2.1"
v1.20: "v4.0.0"

View File

@ -22,7 +22,7 @@
- name: Create kube-scheduler config
template:
src: kubescheduler-config.v1beta1.yaml.j2
src: kubescheduler-config.yaml.j2
dest: "{{ kube_config_dir }}/kubescheduler-config.yaml"
mode: 0644

View File

@ -1,4 +1,11 @@
apiVersion: kubescheduler.config.k8s.io/v1beta1
{% if kube_version is version('v1.22.0', '<') %}
{% set kubescheduler_config_api_version = "v1beta1" %}
{% elif kube_version is version('v1.23.0', '<') %}
{% set kubescheduler_config_api_version = "v1beta2" %}
{% else %}
{% set kubescheduler_config_api_version = "v1beta3" %}
{% endif %}
apiVersion: kubescheduler.config.k8s.io/{{ kubescheduler_config_api_version|d('v1') }}
kind: KubeSchedulerConfiguration
clientConnection:
kubeconfig: "{{ kube_config_dir }}/scheduler.conf"