From 9c48ed23cf28b1c39fec3e5de444ecc2f678b0f0 Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Mon, 22 Jun 2020 11:19:21 -0700 Subject: [PATCH] add rke2Path const and update data-dir flag default (#38) --- pkg/cli/cmds/server.go | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkg/cli/cmds/server.go b/pkg/cli/cmds/server.go index fb102e0037..eb819b7c88 100644 --- a/pkg/cli/cmds/server.go +++ b/pkg/cli/cmds/server.go @@ -6,20 +6,25 @@ import ( "github.com/urfave/cli" ) +const rke2Path = "/var/lib/rancher/rke2" + var ( config rke2.Config k3sServerBase = mustCmdFromK3S(cmds.NewServerCommand(ServerRun), map[string]*K3SFlagOption{ - "v": hide, - "vmodule": hide, - "log": hide, - "alsologtostderr": hide, - "bind-address": copy, - "https-listen-port": drop, - "advertise-address": copy, - "advertise-port": drop, - "tls-san": copy, - "data-dir": copy, + "v": hide, + "vmodule": hide, + "log": hide, + "alsologtostderr": hide, + "bind-address": copy, + "https-listen-port": drop, + "advertise-address": copy, + "advertise-port": drop, + "tls-san": copy, + "data-dir": { + Usage: "(data) Folder to hold state", + Default: rke2Path, + }, "disable-agent": hide, "cluster-cidr": copy, "service-cidr": copy,