Skip to content
Snippets Groups Projects
Commit ae1dcb03 authored by Calin Cristian Andrei's avatar Calin Cristian Andrei Committed by Kubernetes Prow Robot
Browse files

[kubernetes] drop pre 1.22.0 workarounds

parent 9535a411
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
{% 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" %}
......
---
- 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
......
......@@ -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 %}
......
......@@ -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'
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment