mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Added iptables masquerade rules for ipv6 on flannel
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@gmail.com>
This commit is contained in:
parent
e7464a17f7
commit
2253f64b2a
@ -71,6 +71,11 @@ func flannel(ctx context.Context, flannelIface *net.Interface, flannelConf, kube
|
|||||||
go network.SetupAndEnsureIPTables(network.MasqRules(config.Network, bn.Lease()), 60)
|
go network.SetupAndEnsureIPTables(network.MasqRules(config.Network, bn.Lease()), 60)
|
||||||
go network.SetupAndEnsureIPTables(network.ForwardRules(config.Network.String()), 50)
|
go network.SetupAndEnsureIPTables(network.ForwardRules(config.Network.String()), 50)
|
||||||
|
|
||||||
|
if config.IPv6Network.String() != emptyIPv6Network {
|
||||||
|
go network.SetupAndEnsureIP6Tables(network.MasqIP6Rules(config.IPv6Network, bn.Lease()), 60)
|
||||||
|
go network.SetupAndEnsureIP6Tables(network.ForwardRules(config.IPv6Network.String()), 50)
|
||||||
|
}
|
||||||
|
|
||||||
if err := WriteSubnetFile(subnetFile, config.Network, config.IPv6Network, true, bn); err != nil {
|
if err := WriteSubnetFile(subnetFile, config.Network, config.IPv6Network, true, bn); err != nil {
|
||||||
// Continue, even though it failed.
|
// Continue, even though it failed.
|
||||||
logrus.Warningf("Failed to write flannel subnet file: %s", err)
|
logrus.Warningf("Failed to write flannel subnet file: %s", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user