From cd311178c765c32d1c27e8a6f2c24e1cde932e04 Mon Sep 17 00:00:00 2001 From: LeiLei <38358012+zhaileilei123@users.noreply.github.com> Date: Fri, 16 Jun 2023 15:14:06 +0800 Subject: [PATCH] Add a k3s data directory location specified by the cli Need to add a cli flag for this. Also, should probably have config file loading support for the certificate commands. Signed-off-by: leilei.zhai --- pkg/cli/cmds/certs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/cli/cmds/certs.go b/pkg/cli/cmds/certs.go index 27d02a4a7185..2bb1652f6680 100644 --- a/pkg/cli/cmds/certs.go +++ b/pkg/cli/cmds/certs.go @@ -35,6 +35,11 @@ var ( Value: "https://127.0.0.1:6443", Destination: &ServerConfig.ServerURL, }, + cli.StringFlag{ + Name: "data-dir,d", + Usage: "(data) Folder to hold state default /var/lib/rancher/" + version.Program + " or ${HOME}/.rancher/" + version.Program + " if not root", + Destination: &ServerConfig.DataDir, + }, cli.StringFlag{ Name: "path", Usage: "Path to directory containing new CA certificates",