From 4c168ad419f63d89a659c241ea8b8eebe215419d Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Thu, 21 Sep 2023 20:02:47 +0000 Subject: [PATCH] Replace datastore endpoint override with cluster-init Ref: k3s-io/k3s#8392 Signed-off-by: Brad Davidson --- pkg/cli/cmds/etcd_snapshot.go | 2 +- pkg/cli/defaults/defaults.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cli/cmds/etcd_snapshot.go b/pkg/cli/cmds/etcd_snapshot.go index b35460f15bd..09c2d503832 100644 --- a/pkg/cli/cmds/etcd_snapshot.go +++ b/pkg/cli/cmds/etcd_snapshot.go @@ -10,7 +10,7 @@ import ( const defaultSnapshotRentention = 5 func NewEtcdSnapshotCommand() cli.Command { - cmds.ServerConfig.DatastoreEndpoint = "etcd" + cmds.ServerConfig.ClusterInit = true k3sOpts := K3SFlagSet{ "config": copyFlag, "debug": copyFlag, diff --git a/pkg/cli/defaults/defaults.go b/pkg/cli/defaults/defaults.go index bcdb1ebc905..1db87c2ec98 100644 --- a/pkg/cli/defaults/defaults.go +++ b/pkg/cli/defaults/defaults.go @@ -17,7 +17,7 @@ func Set(_ *cli.Context, dataDir string) error { return errors.Wrapf(err, "failed to create directory %s", logsDir) } - cmds.ServerConfig.DatastoreEndpoint = "etcd" + cmds.ServerConfig.ClusterInit = true cmds.ServerConfig.DisableNPC = true cmds.ServerConfig.FlannelBackend = "none" cmds.ServerConfig.AdvertisePort = 6443