Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA (#7938)
* Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA * Add check for dynamic_kubelet_configuration with kube >= 1.22pull/7947/head
parent
43e7e2d663
commit
d57ddf0be8
|
@ -211,6 +211,9 @@ k8s_image_pull_policy: IfNotPresent
|
||||||
kubernetes_audit: false
|
kubernetes_audit: false
|
||||||
|
|
||||||
# dynamic kubelet configuration
|
# dynamic kubelet configuration
|
||||||
|
# Note: Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA.
|
||||||
|
# It is planned to be removed from Kubernetes in the version 1.23.
|
||||||
|
# Please use alternative ways to update kubelet configuration.
|
||||||
dynamic_kubelet_configuration: false
|
dynamic_kubelet_configuration: false
|
||||||
|
|
||||||
# define kubelet config dir for dynamic kubelet
|
# define kubelet config dir for dynamic kubelet
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
path: "{{ dynamic_kubelet_configuration_dir }}"
|
path: "{{ dynamic_kubelet_configuration_dir }}"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
state: directory
|
state: directory
|
||||||
when: dynamic_kubelet_configuration
|
when:
|
||||||
|
- dynamic_kubelet_configuration
|
||||||
|
- kube_version is version('v1.22.0', '<')
|
||||||
|
|
||||||
- name: Set kubelet api version to v1beta1
|
- name: Set kubelet api version to v1beta1
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -18,7 +18,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
|
||||||
--container-runtime=remote \
|
--container-runtime=remote \
|
||||||
--container-runtime-endpoint=unix://{{ cri_socket }} \
|
--container-runtime-endpoint=unix://{{ cri_socket }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if dynamic_kubelet_configuration %}
|
{% if dynamic_kubelet_configuration and kube_version is version('v1.22.0', '<') %}
|
||||||
--dynamic-config-dir={{ dynamic_kubelet_configuration_dir }} \
|
--dynamic-config-dir={{ dynamic_kubelet_configuration_dir }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
--runtime-cgroups={{ kubelet_runtime_cgroups }} \
|
--runtime-cgroups={{ kubelet_runtime_cgroups }} \
|
||||||
|
|
|
@ -114,6 +114,16 @@
|
||||||
when:
|
when:
|
||||||
- kube_version is version('v1.21.0', '>=')
|
- kube_version is version('v1.21.0', '>=')
|
||||||
|
|
||||||
|
- name: Stop when dynamic_kubelet_configuration enabled for kubernetes >= 1.22
|
||||||
|
assert:
|
||||||
|
that: not dynamic_kubelet_configuration
|
||||||
|
msg: >
|
||||||
|
Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA.
|
||||||
|
It is planned to be removed from Kubernetes in the version 1.23.
|
||||||
|
Please use alternative ways to update kubelet configuration.
|
||||||
|
when:
|
||||||
|
- kube_version is version('v1.22.0', '>=')
|
||||||
|
|
||||||
# This assertion will fail on the safe side: One can indeed schedule more pods
|
# This assertion will fail on the safe side: One can indeed schedule more pods
|
||||||
# on a node than the CIDR-range has space for when additional pods use the host
|
# on a node than the CIDR-range has space for when additional pods use the host
|
||||||
# network namespace. It is impossible to ascertain the number of such pods at
|
# network namespace. It is impossible to ascertain the number of such pods at
|
||||||
|
|
|
@ -6,7 +6,6 @@ mode: ha
|
||||||
# Kubespray settings
|
# Kubespray settings
|
||||||
calico_datastore: etcd
|
calico_datastore: etcd
|
||||||
kube_network_plugin: canal
|
kube_network_plugin: canal
|
||||||
dynamic_kubelet_configuration: true
|
|
||||||
deploy_netchecker: true
|
deploy_netchecker: true
|
||||||
dns_min_replicas: 1
|
dns_min_replicas: 1
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,5 @@ mode: ha
|
||||||
# Kubespray settings
|
# Kubespray settings
|
||||||
calico_datastore: etcd
|
calico_datastore: etcd
|
||||||
kube_network_plugin: canal
|
kube_network_plugin: canal
|
||||||
dynamic_kubelet_configuration: true
|
|
||||||
deploy_netchecker: true
|
deploy_netchecker: true
|
||||||
dns_min_replicas: 1
|
dns_min_replicas: 1
|
||||||
|
|
Loading…
Reference in New Issue