mirror of https://github.com/k3s-io/k3s
Merge pull request #5391 from rbrtbnfgl/wireguard-update
Add wireguard native flannel backendpull/5398/head
commit
2037e9179a
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue