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
2037e917
Unverified
Commit
2037e917
authored
Apr 08, 2022
by
Roberto Bonafiglia
Committed by
GitHub
Apr 08, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5391 from rbrtbnfgl/wireguard-update
Add wireguard native flannel backend
parents
f37e7565
f04c602c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
setup.go
pkg/agent/flannel/setup.go
+8
-0
server.go
pkg/cli/cmds/server.go
+1
-1
types.go
pkg/daemons/config/types.go
+7
-6
No files found.
pkg/agent/flannel/setup.go
View file @
2037e917
...
...
@@ -75,6 +75,11 @@ const (
"SubnetRemoveCommand": "read PUBLICKEY; wg set flannel.1 peer $PUBLICKEY remove"
}`
wireguardNativeBackend
=
`{
"Type": "wireguard",
"PersistentKeepaliveInterval": 25
}`
emptyIPv6Network
=
"::/0"
ipv4
=
iota
...
...
@@ -199,6 +204,9 @@ func createFlannelConf(nodeConfig *config.Node) error {
}
case
config
.
FlannelBackendWireguard
:
backendConf
=
strings
.
ReplaceAll
(
wireguardBackend
,
"%flannelConfDir%"
,
filepath
.
Dir
(
nodeConfig
.
FlannelConfFile
))
logrus
.
Warnf
(
"The wireguard backend is deprecated and will be removed in k3s v1.26, please switch to wireguard-native. Check our docs for information about how to migrate"
)
case
config
.
FlannelBackendWireguardNative
:
backendConf
=
wireguardNativeBackend
default
:
return
fmt
.
Errorf
(
"Cannot configure unknown flannel backend '%s'"
,
nodeConfig
.
FlannelBackend
)
}
...
...
pkg/cli/cmds/server.go
View file @
2037e917
...
...
@@ -204,7 +204,7 @@ var ServerFlags = []cli.Flag{
ClusterDomain
,
cli
.
StringFlag
{
Name
:
"flannel-backend"
,
Usage
:
"(networking) One of 'none', 'vxlan', 'ipsec', 'host-gw',
or 'wireguard'
"
,
Usage
:
"(networking) One of 'none', 'vxlan', 'ipsec', 'host-gw',
'wireguard'(deprecated), or 'wireguard-native' (default: vxlan)
"
,
Destination
:
&
ServerConfig
.
FlannelBackend
,
Value
:
"vxlan"
,
},
...
...
pkg/daemons/config/types.go
View file @
2037e917
...
...
@@ -17,12 +17,13 @@ import (
)
const
(
FlannelBackendNone
=
"none"
FlannelBackendVXLAN
=
"vxlan"
FlannelBackendHostGW
=
"host-gw"
FlannelBackendIPSEC
=
"ipsec"
FlannelBackendWireguard
=
"wireguard"
CertificateRenewDays
=
90
FlannelBackendNone
=
"none"
FlannelBackendVXLAN
=
"vxlan"
FlannelBackendHostGW
=
"host-gw"
FlannelBackendIPSEC
=
"ipsec"
FlannelBackendWireguard
=
"wireguard"
FlannelBackendWireguardNative
=
"wireguard-native"
CertificateRenewDays
=
90
)
type
Node
struct
{
...
...
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