From e812a7660ce75b644c50b3c263d93e42aa1b1b06 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Thu, 11 Apr 2024 19:28:12 +0000 Subject: [PATCH] Update CLI to sync with k3s Signed-off-by: Brad Davidson --- pkg/cli/cmds/cert.go | 13 ++++++++++++- pkg/cli/cmds/etcd_snapshot.go | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pkg/cli/cmds/cert.go b/pkg/cli/cmds/cert.go index 6102a9f2377..6dfb60d6c1c 100644 --- a/pkg/cli/cmds/cert.go +++ b/pkg/cli/cmds/cert.go @@ -35,9 +35,20 @@ func NewCertCommand() cli.Command { Default: rke2Path, }, }, + "check": { + "alsologtostderr": copyFlag, + "config": copyFlag, + "debug": copyFlag, + "log": copyFlag, + "service": copyFlag, + "data-dir": { + Usage: "(data) Folder to hold state", + Default: rke2Path, + }, + }, } - command := cmds.NewCertCommands(Rotate, cert.RotateCA) + command := cmds.NewCertCommands(Rotate, cert.RotateCA, cert.Check) command.Usage = "Manage RKE2 certificates" configfilearg.DefaultParser.ValidFlags[command.Name] = command.Flags for i, subcommand := range command.Subcommands { diff --git a/pkg/cli/cmds/etcd_snapshot.go b/pkg/cli/cmds/etcd_snapshot.go index beba78ae2c4..387031224d1 100644 --- a/pkg/cli/cmds/etcd_snapshot.go +++ b/pkg/cli/cmds/etcd_snapshot.go @@ -21,6 +21,10 @@ func NewEtcdSnapshotCommand() cli.Command { Usage: "(data) Folder to hold state", Default: rke2Path, }, + "server": { + Default: "https://127.0.0.1:9345", + }, + "token": copyFlag, "name": copyFlag, "dir": copyFlag, "snapshot-compress": copyFlag,