Commit bbd7fecf authored by Roberto Bonafiglia's avatar Roberto Bonafiglia Committed by Roberto Bonafiglia

Update flannel to v0.21.1

parent 52e7a47e
......@@ -81,7 +81,7 @@ require (
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
github.com/docker/docker v20.10.16+incompatible
github.com/erikdubbelboer/gspt v0.0.0-20190125194910-e68493906b83
github.com/flannel-io/flannel v0.20.2-k3s1.23
github.com/flannel-io/flannel v0.21.1-k3s1.23
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/go-sql-driver/mysql v1.6.0
github.com/go-test/deep v1.0.7
......@@ -124,8 +124,8 @@ require (
go.etcd.io/etcd/etcdutl/v3 v3.5.4
go.etcd.io/etcd/server/v3 v3.5.4
go.uber.org/zap v1.19.0
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
golang.org/x/net v0.4.0
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
golang.org/x/sys v0.3.0
google.golang.org/grpc v1.50.1
......@@ -176,6 +176,7 @@ require (
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/avast/retry-go/v4 v4.3.2 // indirect
github.com/aws/aws-sdk-go v1.44.24 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
......@@ -371,7 +372,7 @@ require (
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/tools v0.1.12 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
golang.zx2c4.com/wireguard v0.0.0-20211129173154-2dd424e2d808 // indirect
golang.zx2c4.com/wireguard v0.0.0-20220117163742-e0b8f11489c5 // indirect
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211230205640-daad0b7ba671 // indirect
gonum.org/v1/gonum v0.6.2 // indirect
google.golang.org/api v0.57.0 // indirect
......
......@@ -21,19 +21,19 @@ import (
"path/filepath"
"sync"
"github.com/flannel-io/flannel/backend"
"github.com/flannel-io/flannel/network"
"github.com/flannel-io/flannel/pkg/backend"
"github.com/flannel-io/flannel/pkg/ip"
"github.com/flannel-io/flannel/subnet/kube"
"github.com/flannel-io/flannel/pkg/iptables"
"github.com/flannel-io/flannel/pkg/subnet/kube"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
// Backends need to be imported for their init() to get executed and them to register
_ "github.com/flannel-io/flannel/backend/extension"
_ "github.com/flannel-io/flannel/backend/hostgw"
_ "github.com/flannel-io/flannel/backend/ipsec"
_ "github.com/flannel-io/flannel/backend/vxlan"
_ "github.com/flannel-io/flannel/backend/wireguard"
_ "github.com/flannel-io/flannel/pkg/backend/extension"
_ "github.com/flannel-io/flannel/pkg/backend/hostgw"
_ "github.com/flannel-io/flannel/pkg/backend/ipsec"
_ "github.com/flannel-io/flannel/pkg/backend/vxlan"
_ "github.com/flannel-io/flannel/pkg/backend/wireguard"
)
const (
......@@ -76,18 +76,18 @@ func flannel(ctx context.Context, flannelIface *net.Interface, flannelConf, kube
}
if netMode == (ipv4+ipv6) || netMode == ipv4 {
network.CreateIP4Chain("nat", "FLANNEL-POSTRTG")
network.CreateIP4Chain("filter", "FLANNEL-FWD")
go network.SetupAndEnsureIP4Tables(network.MasqRules(config.Network, bn.Lease()), 60)
go network.SetupAndEnsureIP4Tables(network.ForwardRules(config.Network.String()), 50)
iptables.CreateIP4Chain("nat", "FLANNEL-POSTRTG")
iptables.CreateIP4Chain("filter", "FLANNEL-FWD")
go iptables.SetupAndEnsureIP4Tables(iptables.MasqRules(config.Network, bn.Lease()), 60)
go iptables.SetupAndEnsureIP4Tables(iptables.ForwardRules(config.Network.String()), 50)
}
if flannelIPv6Masq && config.IPv6Network.String() != emptyIPv6Network {
logrus.Debugf("Creating IPv6 masquerading iptables rules for %s network", config.IPv6Network.String())
network.CreateIP6Chain("nat", "FLANNEL-POSTRTG")
network.CreateIP6Chain("filter", "FLANNEL-FWD")
go network.SetupAndEnsureIP6Tables(network.MasqIP6Rules(config.IPv6Network, bn.Lease()), 60)
go network.SetupAndEnsureIP6Tables(network.ForwardRules(config.IPv6Network.String()), 50)
iptables.CreateIP6Chain("nat", "FLANNEL-POSTRTG")
iptables.CreateIP6Chain("filter", "FLANNEL-FWD")
go iptables.SetupAndEnsureIP6Tables(iptables.MasqIP6Rules(config.IPv6Network, bn.Lease()), 60)
go iptables.SetupAndEnsureIP6Tables(iptables.ForwardRules(config.IPv6Network.String()), 50)
}
if err := WriteSubnetFile(subnetFile, config.Network, config.IPv6Network, true, bn, netMode); err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment