Browse Source

make better condition for applying nf_conntrack kernel tweak (#6267)

* MINOR: Check kernel version before enable modprobe nf_conntrack

* CLEANUP: no more need to ignore error of this task

* MINOR: Fixing yaml and ansible lint error - remove trailling-space
pull/6157/head
mohsen 4 years ago
committed by GitHub
parent
commit
10e54eca26
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions
  1. 7
      roles/kubernetes/node/tasks/main.yml

7
roles/kubernetes/node/tasks/main.yml

@ -108,8 +108,9 @@
name: nf_conntrack_ipv4 name: nf_conntrack_ipv4
state: present state: present
register: enable_nf_conntrack register: enable_nf_conntrack
ignore_errors: yes
when: kube_proxy_mode == 'ipvs'
when:
- ansible_kernel.split('.')[0:3] | join('.') < '4.19'
- kube_proxy_mode == 'ipvs'
tags: tags:
- kube-proxy - kube-proxy
@ -118,7 +119,7 @@
name: nf_conntrack name: nf_conntrack
state: present state: present
when: when:
- enable_nf_conntrack is failed
- ansible_kernel.split('.')[0:3] | join('.') >= '4.19'
- kube_proxy_mode == 'ipvs' - kube_proxy_mode == 'ipvs'
tags: tags:
- kube-proxy - kube-proxy

Loading…
Cancel
Save