Skip to content

Commit

Permalink
Re-add net.bridge settings for flannel
Browse files Browse the repository at this point in the history
This was originally only set on Centos 7 / RHEL 7 but we're experiencing similar issues on Amazon Linux 2
  • Loading branch information
rifelpet committed Apr 28, 2022
1 parent b6e0c5f commit 569180f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nodeup/pkg/model/sysctls.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,19 @@ func (b *SysctlBuilder) Build(c *fi.ModelBuilderContext) error {
"")
}

// Running Flannel on Amazon Linux 2 needs custom settings
if b.Cluster.Spec.Networking.Flannel != nil && b.Distribution == distributions.DistributionAmazonLinux2 {
proxyMode := b.Cluster.Spec.KubeProxy.ProxyMode
if proxyMode == "" || proxyMode == "iptables" {
sysctls = append(sysctls,
"# Flannel settings on Amazon Linux 2",
"# Issue https://github.com/coreos/flannel/issues/902",
"net.bridge.bridge-nf-call-ip6tables=1",
"net.bridge.bridge-nf-call-iptables=1",
"")
}
}

if b.Cluster.Spec.IsIPv6Only() {
if b.Distribution == distributions.DistributionDebian11 {
// Accepting Router Advertisements must be enabled for each existing network interface to take effect.
Expand Down

0 comments on commit 569180f

Please sign in to comment.