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
47abaf36
Commit
47abaf36
authored
Apr 04, 2022
by
Roberto Bonafiglia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new flannel backend to use wireguard from flannel
Signed-off-by:
Roberto Bonafiglia
<
roberto.bonafiglia@suse.com
>
parent
2a429aac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
setup.go
pkg/agent/flannel/setup.go
+7
-0
types.go
pkg/daemons/config/types.go
+1
-0
No files found.
pkg/agent/flannel/setup.go
View file @
47abaf36
...
@@ -75,6 +75,11 @@ const (
...
@@ -75,6 +75,11 @@ const (
"SubnetRemoveCommand": "read PUBLICKEY; wg set flannel.1 peer $PUBLICKEY remove"
"SubnetRemoveCommand": "read PUBLICKEY; wg set flannel.1 peer $PUBLICKEY remove"
}`
}`
wireguardNativeBackend
=
`{
"Type": "wireguard",
"PersistentKeepaliveInterval": 25
}`
emptyIPv6Network
=
"::/0"
emptyIPv6Network
=
"::/0"
ipv4
=
iota
ipv4
=
iota
...
@@ -199,6 +204,8 @@ func createFlannelConf(nodeConfig *config.Node) error {
...
@@ -199,6 +204,8 @@ func createFlannelConf(nodeConfig *config.Node) error {
}
}
case
config
.
FlannelBackendWireguard
:
case
config
.
FlannelBackendWireguard
:
backendConf
=
strings
.
ReplaceAll
(
wireguardBackend
,
"%flannelConfDir%"
,
filepath
.
Dir
(
nodeConfig
.
FlannelConfFile
))
backendConf
=
strings
.
ReplaceAll
(
wireguardBackend
,
"%flannelConfDir%"
,
filepath
.
Dir
(
nodeConfig
.
FlannelConfFile
))
case
config
.
FlannelBackendNativeWireguard
:
backendConf
=
wireguardNativeBackend
default
:
default
:
return
fmt
.
Errorf
(
"Cannot configure unknown flannel backend '%s'"
,
nodeConfig
.
FlannelBackend
)
return
fmt
.
Errorf
(
"Cannot configure unknown flannel backend '%s'"
,
nodeConfig
.
FlannelBackend
)
}
}
...
...
pkg/daemons/config/types.go
View file @
47abaf36
...
@@ -22,6 +22,7 @@ const (
...
@@ -22,6 +22,7 @@ const (
FlannelBackendHostGW
=
"host-gw"
FlannelBackendHostGW
=
"host-gw"
FlannelBackendIPSEC
=
"ipsec"
FlannelBackendIPSEC
=
"ipsec"
FlannelBackendWireguard
=
"wireguard"
FlannelBackendWireguard
=
"wireguard"
FlannelBackendNativeWireguard
=
"native-wireguard"
CertificateRenewDays
=
90
CertificateRenewDays
=
90
)
)
...
...
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