From 72d50b1f7cfb7d396e665fb7a6a316c6721d20f9 Mon Sep 17 00:00:00 2001 From: LeiLei <38358012+zhaileilei123@users.noreply.github.com> Date: Tue, 4 Jul 2023 00:30:04 +0800 Subject: [PATCH] Add `--data-dir` to the `k3s certificate rotate-ca` cli (#7791) 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 27d02a4a71..2bb1652f66 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",