From f04c602c078935c22ed072c2f75b67df51ddc412 Mon Sep 17 00:00:00 2001 From: Roberto Bonafiglia Date: Thu, 7 Apr 2022 14:15:55 +0200 Subject: [PATCH] Updated wireguard-native options and added log message Signed-off-by: Roberto Bonafiglia --- pkg/agent/flannel/setup.go | 3 ++- pkg/cli/cmds/server.go | 2 +- pkg/daemons/config/types.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/agent/flannel/setup.go b/pkg/agent/flannel/setup.go index 06b38e4afd..802915e2ce 100644 --- a/pkg/agent/flannel/setup.go +++ b/pkg/agent/flannel/setup.go @@ -204,7 +204,8 @@ func createFlannelConf(nodeConfig *config.Node) error { } case config.FlannelBackendWireguard: 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 default: return fmt.Errorf("Cannot configure unknown flannel backend '%s'", nodeConfig.FlannelBackend) diff --git a/pkg/cli/cmds/server.go b/pkg/cli/cmds/server.go index 18cf28495b..8b6b5ae671 100644 --- a/pkg/cli/cmds/server.go +++ b/pkg/cli/cmds/server.go @@ -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", }, diff --git a/pkg/daemons/config/types.go b/pkg/daemons/config/types.go index 077c027563..0ee3861b22 100644 --- a/pkg/daemons/config/types.go +++ b/pkg/daemons/config/types.go @@ -22,7 +22,7 @@ const ( FlannelBackendHostGW = "host-gw" FlannelBackendIPSEC = "ipsec" FlannelBackendWireguard = "wireguard" - FlannelBackendNativeWireguard = "native-wireguard" + FlannelBackendWireguardNative = "wireguard-native" CertificateRenewDays = 90 )