[kubernetes] drop pre 1.22.0 workarounds
This commit is contained in:
parent
9535a41187
commit
ae1dcb031f
6 changed files with 1 additions and 44 deletions
|
@ -216,16 +216,9 @@ k8s_image_pull_policy: IfNotPresent
|
||||||
# audit log for kubernetes
|
# audit log for kubernetes
|
||||||
kubernetes_audit: false
|
kubernetes_audit: false
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# define kubelet config dir for dynamic kubelet
|
# define kubelet config dir for dynamic kubelet
|
||||||
# kubelet_config_dir:
|
# kubelet_config_dir:
|
||||||
default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
|
default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
|
||||||
dynamic_kubelet_configuration_dir: "{{ kubelet_config_dir | default(default_kubelet_config_dir) }}"
|
|
||||||
|
|
||||||
# pod security policy (RBAC must be enabled either by having 'RBAC' in authorization_modes or kubeadm enabled)
|
# pod security policy (RBAC must be enabled either by having 'RBAC' in authorization_modes or kubeadm enabled)
|
||||||
podsecuritypolicy_enabled: false
|
podsecuritypolicy_enabled: false
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{% if kube_version is version('v1.22.0', '<') %}
|
{% if kube_version is version('v1.23.0', '<') %}
|
||||||
{% set kubescheduler_config_api_version = "v1beta1" %}
|
|
||||||
{% elif kube_version is version('v1.23.0', '<') %}
|
|
||||||
{% set kubescheduler_config_api_version = "v1beta2" %}
|
{% set kubescheduler_config_api_version = "v1beta2" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set kubescheduler_config_api_version = "v1beta3" %}
|
{% set kubescheduler_config_api_version = "v1beta3" %}
|
||||||
|
|
|
@ -1,13 +1,4 @@
|
||||||
---
|
---
|
||||||
- name: Make sure dynamic kubelet configuration directory is writeable
|
|
||||||
file:
|
|
||||||
path: "{{ dynamic_kubelet_configuration_dir }}"
|
|
||||||
mode: 0600
|
|
||||||
state: directory
|
|
||||||
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:
|
||||||
kubeletConfig_api_version: v1beta1
|
kubeletConfig_api_version: v1beta1
|
||||||
|
|
|
@ -18,9 +18,6 @@ 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 and kube_version is version('v1.22.0', '<') %}
|
|
||||||
--dynamic-config-dir={{ dynamic_kubelet_configuration_dir }} \
|
|
||||||
{% endif %}
|
|
||||||
--runtime-cgroups={{ kubelet_runtime_cgroups }} \
|
--runtime-cgroups={{ kubelet_runtime_cgroups }} \
|
||||||
{% endset %}
|
{% endset %}
|
||||||
|
|
||||||
|
|
|
@ -77,16 +77,6 @@
|
||||||
- not ignore_assert_errors
|
- not ignore_assert_errors
|
||||||
- inventory_hostname in groups['kube_node']
|
- inventory_hostname in groups['kube_node']
|
||||||
|
|
||||||
- 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
|
||||||
|
@ -270,14 +260,6 @@
|
||||||
msg: "kata_containers_enabled support only for containerd and crio-o. See https://github.com/kata-containers/documentation/blob/1.11.4/how-to/run-kata-with-k8s.md#install-a-cri-implementation for details"
|
msg: "kata_containers_enabled support only for containerd and crio-o. See https://github.com/kata-containers/documentation/blob/1.11.4/how-to/run-kata-with-k8s.md#install-a-cri-implementation for details"
|
||||||
when: kata_containers_enabled
|
when: kata_containers_enabled
|
||||||
|
|
||||||
- name: Stop if kata_containers_version is >= 2.3.0 and kube_version < 1.22.0
|
|
||||||
assert:
|
|
||||||
that: kube_version is version('v1.22.0', '>')
|
|
||||||
msg: "Kata containers version 2.3.0 is compatible with Kubernetes 1.22.0+"
|
|
||||||
when:
|
|
||||||
- kata_containers_enabled
|
|
||||||
- kata_containers_version is version ('2.3.0', '>=')
|
|
||||||
|
|
||||||
- name: Stop if gvisor_enabled is enabled when container_manager is not containerd
|
- name: Stop if gvisor_enabled is enabled when container_manager is not containerd
|
||||||
assert:
|
assert:
|
||||||
that: container_manager == 'containerd'
|
that: container_manager == 'containerd'
|
||||||
|
|
|
@ -244,13 +244,9 @@ kube_override_hostname: >-
|
||||||
{{ inventory_hostname }}
|
{{ inventory_hostname }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
# dynamic kubelet configuration
|
|
||||||
dynamic_kubelet_configuration: false
|
|
||||||
|
|
||||||
# define kubelet config dir for dynamic kubelet
|
# define kubelet config dir for dynamic kubelet
|
||||||
# kubelet_config_dir:
|
# kubelet_config_dir:
|
||||||
default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
|
default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
|
||||||
dynamic_kubelet_configuration_dir: "{{ kubelet_config_dir | default(default_kubelet_config_dir) }}"
|
|
||||||
|
|
||||||
# Aggregator
|
# Aggregator
|
||||||
kube_api_aggregator_routing: false
|
kube_api_aggregator_routing: false
|
||||||
|
|
Loading…
Reference in a new issue