diff --git a/pkg/cli/cmds/etcd_snapshot.go b/pkg/cli/cmds/etcd_snapshot.go index e97228d1e2..378b394f0a 100644 --- a/pkg/cli/cmds/etcd_snapshot.go +++ b/pkg/cli/cmds/etcd_snapshot.go @@ -21,11 +21,14 @@ var EtcdSnapshotFlags = []cli.Flag{ Destination: &AgentConfig.NodeName, }, DataDirFlag, - ServerToken, &cli.StringFlag{ - Name: "server, s", - Usage: "(cluster) Server to connect to", - EnvVar: version.ProgramUpper + "_URL", + Name: "etcd-token,t", + Usage: "(cluster) Shared secret used to authenticate to etcd server", + Destination: &ServerConfig.Token, + }, + &cli.StringFlag{ + Name: "etcd-server, s", + Usage: "(cluster) Server with etcd role to connect to for snapshot management operations", Value: "https://127.0.0.1:6443", Destination: &ServerConfig.ServerURL, }, diff --git a/pkg/configfilearg/defaultparser_test.go b/pkg/configfilearg/defaultparser_test.go index e43a0c1545..8ae8decc26 100644 --- a/pkg/configfilearg/defaultparser_test.go +++ b/pkg/configfilearg/defaultparser_test.go @@ -48,7 +48,7 @@ func Test_UnitMustParse(t *testing.T) { name: "Etcd-snapshot with config with known and unknown flags", args: []string{"k3s", "etcd-snapshot", "save"}, config: "./testdata/defaultdata.yaml", - want: []string{"k3s", "etcd-snapshot", "save", "--token=12345", "--etcd-s3=true", "--etcd-s3-bucket=my-backup"}, + want: []string{"k3s", "etcd-snapshot", "save", "--etcd-s3=true", "--etcd-s3-bucket=my-backup"}, }, { name: "Agent with known flags",