From 961978869a6c0254a269d73f4da2b41321e6ccb9 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Tue, 23 Jul 2019 11:12:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=BE=E7=BD=AE=E5=86=85=E6=A0=B8?= =?UTF-8?q?=E5=8F=82=E6=95=B095-k8s-sysctl.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/prepare/templates/95-k8s-sysctl.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/prepare/templates/95-k8s-sysctl.conf.j2 b/roles/prepare/templates/95-k8s-sysctl.conf.j2 index ff7fefe..5094c74 100644 --- a/roles/prepare/templates/95-k8s-sysctl.conf.j2 +++ b/roles/prepare/templates/95-k8s-sysctl.conf.j2 @@ -2,7 +2,9 @@ net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-arptables = 1 +{% if ansible_distribution in ["CentOS","RedHat","Amazon"] %} net.ipv4.tcp_tw_recycle=0 +{% endif %} # disable ipv6 net.ipv6.conf.all.disable_ipv6=1 net.netfilter.nf_conntrack_max=1000000