Load nf_conntrack module if nf_conntrack_ipv4 failed (#3764)
This commit is contained in:
parent
5e84dabb46
commit
dc8a8011be
1 changed files with 20 additions and 1 deletions
|
@ -100,11 +100,26 @@
|
|||
- ip_vs_rr
|
||||
- ip_vs_wrr
|
||||
- ip_vs_sh
|
||||
- nf_conntrack_ipv4
|
||||
when: kube_proxy_mode == 'ipvs'
|
||||
tags:
|
||||
- kube-proxy
|
||||
|
||||
- name: Modprobe nf_conntrack_ipv4 for kernels < 4.19
|
||||
modprobe:
|
||||
name: nf_conntrack_ipv4
|
||||
state: present
|
||||
register: enable_nf_conntrack
|
||||
ignore_errors: yes
|
||||
when: kube_proxy_mode == 'ipvs'
|
||||
|
||||
- name: Modprobe nf_conntrack for kernels >= 4.19
|
||||
modprobe:
|
||||
name: nf_conntrack
|
||||
state: present
|
||||
when:
|
||||
- enable_nf_conntrack is failed
|
||||
- kube_proxy_mode == 'ipvs'
|
||||
|
||||
- name: Persist ip_vs modules
|
||||
copy:
|
||||
dest: /etc/modules-load.d/kube_proxy-ipvs.conf
|
||||
|
@ -113,7 +128,11 @@
|
|||
ip_vs_rr
|
||||
ip_vs_wrr
|
||||
ip_vs_sh
|
||||
{% if enable_nf_conntrack is failed -%}
|
||||
nf_conntrack
|
||||
{%- else -%}
|
||||
nf_conntrack_ipv4
|
||||
{%- endif -%}
|
||||
when: kube_proxy_mode == 'ipvs'
|
||||
tags:
|
||||
- kube-proxy
|
||||
|
|
Loading…
Reference in a new issue