Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
bbd7fecf
Commit
bbd7fecf
authored
Feb 08, 2023
by
Roberto Bonafiglia
Committed by
Roberto Bonafiglia
Feb 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update flannel to v0.21.1
Signed-off-by:
Roberto Bonafiglia
<
roberto.bonafiglia@suse.com
>
parent
52e7a47e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
20 deletions
+21
-20
go.mod
go.mod
+5
-4
go.sum
go.sum
+0
-0
flannel.go
pkg/agent/flannel/flannel.go
+16
-16
No files found.
go.mod
View file @
bbd7fecf
...
...
@@ -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.2
0.2
-k3s1.23
github.com/flannel-io/flannel v0.2
1.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-20220
722155217-630584e8d5aa
golang.org/x/net v0.
3.1-0.20221206200815-1e63c2f08a1
0
golang.org/x/crypto v0.0.0-20220
829220503-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-202
11129173154-2dd424e2d808
// indirect
golang.zx2c4.com/wireguard v0.0.0-202
20117163742-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
...
...
go.sum
View file @
bbd7fecf
This diff is collapsed.
Click to expand it.
pkg/agent/flannel/flannel.go
View file @
bbd7fecf
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment