Skip to content

Commit

Permalink
Merge pull request #12415 from olemarkus/revert-sysctl
Browse files Browse the repository at this point in the history
Revert "Remove unneeded network related sysctls"
  • Loading branch information
k8s-ci-robot committed Sep 25, 2021
2 parents 92ea7d5 + fed0c16 commit 8225c78
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nodeup/pkg/model/sysctls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8225c78

Please sign in to comment.