Skip to content

Commit

Permalink
[release/v1.4] Enable nf_conntrack module by default (#2283)
Browse files Browse the repository at this point in the history
* Enable nf_conntrack module by default

Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>

* Update fixtures

Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>

Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
  • Loading branch information
xmudrii authored Aug 16, 2022
1 parent f8f5dbc commit a21d71e
Show file tree
Hide file tree
Showing 39 changed files with 195 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/scripts/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ var (
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmAmazonLinux-proxy.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmAmazonLinux-simple.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmAmazonLinux-v1.16.1.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmCentOS-cilium_cluster.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmCentOS-force.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmCentOS-nutanix_cluster.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmCentOS-proxy.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmCentOS-simple.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmCentOS-v1.16.1.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmCentOS-with_containerd.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmDebian-cilium_cluster.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmDebian-nutanix_cluster.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmDebian-simple.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmDebian-with_containerd.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmFlatcar-force.golden
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmFlatcar-simple.golden
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
5 changes: 5 additions & 0 deletions pkg/scripts/testdata/TestKubeadmFlatcar-with_cilium.golden
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ EOF
sudo modprobe overlay
sudo modprobe br_netfilter
sudo modprobe ip_tables
if modinfo nf_conntrack_ipv4 &> /dev/null; then
sudo modprobe nf_conntrack_ipv4
else
sudo modprobe nf_conntrack
fi
sudo mkdir -p /etc/sysctl.d
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
fs.inotify.max_user_watches = 1048576
Expand Down
Loading

0 comments on commit a21d71e

Please sign in to comment.