mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-06 23:10:09 +00:00
Revert "Add ability to pass configuration options to flannel backend"
This reverts commit 8643576985.
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
This commit is contained in:
committed by
Roberto Bonafiglia
parent
b86a69470c
commit
52323cba07
@@ -48,8 +48,7 @@ const (
|
||||
|
||||
wireguardNativeBackend = `{
|
||||
"Type": "wireguard",
|
||||
"PersistentKeepaliveInterval": %PersistentKeepaliveInterval%,
|
||||
"Mode": "%Mode%"
|
||||
"PersistentKeepaliveInterval": 25
|
||||
}`
|
||||
|
||||
emptyIPv6Network = "::/0"
|
||||
@@ -210,7 +209,6 @@ func createFlannelConf(nodeConfig *config.Node) error {
|
||||
}
|
||||
|
||||
var backendConf string
|
||||
backendOptions := make(map[string]string)
|
||||
|
||||
// precheck and error out unsupported flannel backends.
|
||||
switch nodeConfig.FlannelBackend {
|
||||
@@ -241,16 +239,7 @@ func createFlannelConf(nodeConfig *config.Node) error {
|
||||
}
|
||||
backendConf = strings.ReplaceAll(tailscaledBackend, "%Routes%", routes)
|
||||
case config.FlannelBackendWireguardNative:
|
||||
mode, ok := backendOptions["Mode"]
|
||||
if !ok {
|
||||
mode = "separate"
|
||||
}
|
||||
keepalive, ok := backendOptions["PersistentKeepaliveInterval"]
|
||||
if !ok {
|
||||
keepalive = "25"
|
||||
}
|
||||
backendConf = strings.ReplaceAll(wireguardNativeBackend, "%Mode%", mode)
|
||||
backendConf = strings.ReplaceAll(backendConf, "%PersistentKeepaliveInterval%", keepalive)
|
||||
backendConf = wireguardNativeBackend
|
||||
default:
|
||||
return fmt.Errorf("Cannot configure unknown flannel backend '%s'", nodeConfig.FlannelBackend)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user