[kubernetes] drop pre 1.22.0 workarounds

pull/8978/head
Calin Cristian Andrei 2022-06-06 18:10:10 +03:00 committed by Kubernetes Prow Robot
parent 9535a41187
commit ae1dcb031f
6 changed files with 1 additions and 44 deletions

View File

@ -216,16 +216,9 @@ k8s_image_pull_policy: IfNotPresent
# audit log for kubernetes
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
# kubelet_config_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)
podsecuritypolicy_enabled: false

View File

@ -1,6 +1,4 @@
{% if kube_version is version('v1.22.0', '<') %}
{% set kubescheduler_config_api_version = "v1beta1" %}
{% elif kube_version is version('v1.23.0', '<') %}
{% if kube_version is version('v1.23.0', '<') %}
{% set kubescheduler_config_api_version = "v1beta2" %}
{% else %}
{% set kubescheduler_config_api_version = "v1beta3" %}

View File

@ -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
set_fact:
kubeletConfig_api_version: v1beta1

View File

@ -18,9 +18,6 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
--container-runtime=remote \
--container-runtime-endpoint=unix://{{ cri_socket }} \
{% 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 }} \
{% endset %}

View File

@ -77,16 +77,6 @@
- not ignore_assert_errors
- 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
# 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
@ -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"
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
assert:
that: container_manager == 'containerd'

View File

@ -244,13 +244,9 @@ kube_override_hostname: >-
{{ inventory_hostname }}
{%- endif -%}
# dynamic kubelet configuration
dynamic_kubelet_configuration: false
# define kubelet config dir for dynamic kubelet
# kubelet_config_dir:
default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
dynamic_kubelet_configuration_dir: "{{ kubelet_config_dir | default(default_kubelet_config_dir) }}"
# Aggregator
kube_api_aggregator_routing: false