Skip to content

Commit

Permalink
Merge pull request #13564 from rifelpet/flannel-al2
Browse files Browse the repository at this point in the history
Re-add net.bridge settings for flannel
  • Loading branch information
k8s-ci-robot authored Apr 28, 2022
2 parents b6e0c5f + 569180f commit a093f22
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 a093f22

Please sign in to comment.