From f6fbbc17a4ceb674f205bbd2a04122e8078e9d65 Mon Sep 17 00:00:00 2001 From: Florian Ruynat <16313165+floryut@users.noreply.github.com> Date: Tue, 19 Jan 2021 17:43:45 +0100 Subject: [PATCH] Cleanup old checks for k8s 1.18 (#7192) --- roles/kubernetes-apps/metallb/templates/metallb.yml.j2 | 4 ++-- .../network_plugin/ovn4nfv/templates/ovn-daemonset.yml.j2 | 8 ++++---- .../ovn4nfv/templates/ovn4nfv-k8s-plugin.yml.j2 | 4 ++-- roles/win_nodes/kubernetes_patch/defaults/main.yml | 3 +-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/roles/kubernetes-apps/metallb/templates/metallb.yml.j2 b/roles/kubernetes-apps/metallb/templates/metallb.yml.j2 index b52b928d6..af4c0f215 100644 --- a/roles/kubernetes-apps/metallb/templates/metallb.yml.j2 +++ b/roles/kubernetes-apps/metallb/templates/metallb.yml.j2 @@ -339,7 +339,7 @@ spec: readOnlyRootFilesystem: true hostNetwork: true nodeSelector: - {{ 'beta.' if kube_version is version('v1.18.0', '<') }}kubernetes.io/os: linux + kubernetes.io/os: linux serviceAccountName: speaker terminationGracePeriodSeconds: 2 tolerations: @@ -390,7 +390,7 @@ spec: - all readOnlyRootFilesystem: true nodeSelector: - {{ 'beta.' if kube_version is version('v1.18.0', '<') }}kubernetes.io/os: linux + kubernetes.io/os: linux securityContext: runAsNonRoot: true runAsUser: 65534 diff --git a/roles/network_plugin/ovn4nfv/templates/ovn-daemonset.yml.j2 b/roles/network_plugin/ovn4nfv/templates/ovn-daemonset.yml.j2 index c7601b6c4..2131fe73f 100644 --- a/roles/network_plugin/ovn4nfv/templates/ovn-daemonset.yml.j2 +++ b/roles/network_plugin/ovn4nfv/templates/ovn-daemonset.yml.j2 @@ -112,13 +112,13 @@ spec: command: ["ovn4nfv-k8s", "check_ovn_control_plane"] periodSeconds: 3 livenessProbe: - exec: + exec: command: ["ovn4nfv-k8s", "check_ovn_control_plane"] initialDelaySeconds: 30 periodSeconds: 7 failureThreshold: 5 nodeSelector: - {{ 'beta.' if kube_version is version('v1.18.0', '<') }}kubernetes.io/os: "linux" + kubernetes.io/os: "linux" ovn4nfv-k8s-plugin: ovn-control-plane volumes: - name: host-run-ovs @@ -158,7 +158,7 @@ spec: template: metadata: labels: - app: ovn-controller + app: ovn-controller spec: tolerations: - operator: Exists @@ -214,7 +214,7 @@ spec: cpu: {{ ovn_controller_cpu_limit }} memory: {{ ovn_controller_memory_limit }} nodeSelector: - {{ 'beta.' if kube_version is version('v1.18.0', '<') }}kubernetes.io/os: "linux" + kubernetes.io/os: "linux" volumes: - name: host-modules hostPath: diff --git a/roles/network_plugin/ovn4nfv/templates/ovn4nfv-k8s-plugin.yml.j2 b/roles/network_plugin/ovn4nfv/templates/ovn4nfv-k8s-plugin.yml.j2 index 7e8551223..127115276 100644 --- a/roles/network_plugin/ovn4nfv/templates/ovn4nfv-k8s-plugin.yml.j2 +++ b/roles/network_plugin/ovn4nfv/templates/ovn4nfv-k8s-plugin.yml.j2 @@ -482,7 +482,7 @@ spec: spec: hostNetwork: true nodeSelector: - {{ 'beta.' if kube_version is version('v1.18.0', '<') }}kubernetes.io/arch: amd64 + kubernetes.io/arch: amd64 tolerations: - operator: Exists effect: NoSchedule @@ -556,7 +556,7 @@ spec: hostNetwork: true hostPID: true nodeSelector: - {{ 'beta.' if kube_version is version('v1.18.0', '<') }}kubernetes.io/arch: amd64 + kubernetes.io/arch: amd64 tolerations: - operator: Exists effect: NoSchedule diff --git a/roles/win_nodes/kubernetes_patch/defaults/main.yml b/roles/win_nodes/kubernetes_patch/defaults/main.yml index ad5988830..954cb51c0 100644 --- a/roles/win_nodes/kubernetes_patch/defaults/main.yml +++ b/roles/win_nodes/kubernetes_patch/defaults/main.yml @@ -1,5 +1,4 @@ --- kubernetes_user_manifests_path: "{{ ansible_env.HOME }}/kube-manifests" -# nodeselector for kube-proxy ds is beta until 1.18 -kube_proxy_nodeselector: "{{ 'kubernetes.io/os' if kube_version is version('v1.18.0', '>=') else 'beta.kubernetes.io/os' }}" +kube_proxy_nodeselector: "kubernetes.io/os"