Revert "Remove unneeded network related sysctls"

This reverts commit ce08ec68df.
This commit is contained in:
Ole Markus With 2021-09-25 08:24:47 +02:00
parent 92ea7d58cb
commit fed0c16085
1 changed files with 12 additions and 0 deletions

View File

@ -150,6 +150,18 @@ func (b *SysctlBuilder) Build(c *fi.ModelBuilderContext) error {
"")
}
if b.Cluster.Spec.IsIPv6Only() {
sysctls = append(sysctls,
"net.ipv6.conf.all.forwarding=1",
"net.ipv6.conf.all.accept_ra=2",
"")
} else {
sysctls = append(sysctls,
"# Prevent docker from changing iptables: https://github.com/kubernetes/kubernetes/issues/40182",
"net.ipv4.ip_forward=1",
"")
}
if params := b.NodeupConfig.SysctlParameters; len(params) > 0 {
sysctls = append(sysctls,
"# Custom sysctl parameters from instance group spec",