Updated wireguard-native options and added log message

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
pull/5391/head
Roberto Bonafiglia 3 years ago
parent 47abaf362e
commit f04c602c07

@ -204,7 +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: 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 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)

@ -204,7 +204,7 @@ var ServerFlags = []cli.Flag{
ClusterDomain, ClusterDomain,
cli.StringFlag{ cli.StringFlag{
Name: "flannel-backend", 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, Destination: &ServerConfig.FlannelBackend,
Value: "vxlan", Value: "vxlan",
}, },

@ -22,7 +22,7 @@ const (
FlannelBackendHostGW = "host-gw" FlannelBackendHostGW = "host-gw"
FlannelBackendIPSEC = "ipsec" FlannelBackendIPSEC = "ipsec"
FlannelBackendWireguard = "wireguard" FlannelBackendWireguard = "wireguard"
FlannelBackendNativeWireguard = "native-wireguard" FlannelBackendWireguardNative = "wireguard-native"
CertificateRenewDays = 90 CertificateRenewDays = 90
) )

Loading…
Cancel
Save