From b6919adf62dcbb69d0d66749ea6a4aecdfd3d90a Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Wed, 6 Oct 2021 14:20:22 -0700 Subject: [PATCH] Add "etcd-" prefix to etcd-snapshot commands as aliases (#4161) * Add "etcd-" prefix to etcd-snapshot commands as alias Signed-off-by: dereknola --- pkg/cli/cmds/etcd_snapshot.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/cli/cmds/etcd_snapshot.go b/pkg/cli/cmds/etcd_snapshot.go index d96ff00ab4..d36423baa1 100644 --- a/pkg/cli/cmds/etcd_snapshot.go +++ b/pkg/cli/cmds/etcd_snapshot.go @@ -23,62 +23,62 @@ var EtcdSnapshotFlags = []cli.Flag{ Destination: &ServerConfig.DataDir, }, &cli.StringFlag{ - Name: "name", + Name: "name,etcd-snapshot-name", Usage: "(db) Set the base name of the etcd on-demand snapshot (appended with UNIX timestamp).", Destination: &ServerConfig.EtcdSnapshotName, Value: "on-demand", }, &cli.BoolFlag{ - Name: "s3", + Name: "s3,etcd-s3", Usage: "(db) Enable backup to S3", Destination: &ServerConfig.EtcdS3, }, &cli.StringFlag{ - Name: "s3-endpoint", + Name: "s3-endpoint,etcd-s3-endpoint", Usage: "(db) S3 endpoint url", Destination: &ServerConfig.EtcdS3Endpoint, Value: "s3.amazonaws.com", }, &cli.StringFlag{ - Name: "s3-endpoint-ca", + Name: "s3-endpoint-ca,etcd-s3-endpoint-ca", Usage: "(db) S3 custom CA cert to connect to S3 endpoint", Destination: &ServerConfig.EtcdS3EndpointCA, }, &cli.BoolFlag{ - Name: "s3-skip-ssl-verify", + Name: "s3-skip-ssl-verify,etcd-s3-skip-ssl-verify", Usage: "(db) Disables S3 SSL certificate validation", Destination: &ServerConfig.EtcdS3SkipSSLVerify, }, &cli.StringFlag{ - Name: "s3-access-key", + Name: "s3-access-key,etcd-s3-access-key", Usage: "(db) S3 access key", EnvVar: "AWS_ACCESS_KEY_ID", Destination: &ServerConfig.EtcdS3AccessKey, }, &cli.StringFlag{ - Name: "s3-secret-key", + Name: "s3-secret-key,etcd-s3-secret-key", Usage: "(db) S3 secret key", EnvVar: "AWS_SECRET_ACCESS_KEY", Destination: &ServerConfig.EtcdS3SecretKey, }, &cli.StringFlag{ - Name: "s3-bucket", + Name: "s3-bucket,etcd-s3-bucket", Usage: "(db) S3 bucket name", Destination: &ServerConfig.EtcdS3BucketName, }, &cli.StringFlag{ - Name: "s3-region", + Name: "s3-region,etcd-s3-region", Usage: "(db) S3 region / bucket location (optional)", Destination: &ServerConfig.EtcdS3Region, Value: "us-east-1", }, &cli.StringFlag{ - Name: "s3-folder", + Name: "s3-folder,etcd-s3-folder", Usage: "(db) S3 folder", Destination: &ServerConfig.EtcdS3Folder, }, &cli.BoolFlag{ - Name: "s3-insecure", + Name: "s3-insecure,etcd-s3-insecure", Usage: "(db) Disables S3 over HTTPS", Destination: &ServerConfig.EtcdS3Insecure, }, @@ -93,7 +93,7 @@ func NewEtcdSnapshotCommand(action func(*cli.Context) error, subcommands []cli.C Action: action, Subcommands: subcommands, Flags: append(EtcdSnapshotFlags, &cli.StringFlag{ - Name: "dir", + Name: "dir,etcd-snapshot-dir", Usage: "(db) Directory to save etcd on-demand snapshot. (default: ${data-dir}/db/snapshots)", Destination: &ServerConfig.EtcdSnapshotDir, }),