Skip to content

Commit

Permalink
rename bucket flag into bucket-prefix (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdewinne authored Apr 19, 2024
1 parent 03c7449 commit fb86acf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/cmd/cluster_addon_create_objectstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ const (
clusterAddonCreateObjectStoreShort = "Create an object store bucket for a cluster"
clusterAddonCreateObjectStoreLong = `Create an object store bucket for a cluster.
Requires a bucket name prefix (using flag "--bucket") that will be used to create a unique bucket name with format "[BUCKET_PREFIX]-[ADDON_ID]-cmx".`
clusterAddonCreateObjectStoreExample = ` $ replicated cluster addon create object-store 05929b24 --bucket mybucket
Requires a bucket name prefix (using flag "--bucket-prefix") that will be used to create a unique bucket name with format "[BUCKET_PREFIX]-[ADDON_ID]-cmx".`
clusterAddonCreateObjectStoreExample = ` $ replicated cluster addon create object-store 05929b24 --bucket-prefix mybucket
05929b24 Object Store pending {"bucket_prefix":"mybucket"}`
)

func (r *runners) InitClusterAddonCreateObjectStore(parent *cobra.Command) *cobra.Command {
args := clusterAddonCreateObjectStoreArgs{}

cmd := &cobra.Command{
Use: "object-store CLUSTER_ID --bucket BUCKET_PREFIX",
Use: "object-store CLUSTER_ID --bucket-prefix BUCKET_PREFIX",
Short: clusterAddonCreateObjectStoreShort,
Long: clusterAddonCreateObjectStoreLong,
Example: clusterAddonCreateObjectStoreExample,
Expand All @@ -52,7 +52,7 @@ func (r *runners) InitClusterAddonCreateObjectStore(parent *cobra.Command) *cobr
}

func clusterAddonCreateObjectStoreFlags(cmd *cobra.Command, args *clusterAddonCreateObjectStoreArgs) error {
cmd.Flags().StringVar(&args.objectStoreBucket, "bucket", "", "A prefix for the bucket name to be created (required)")
cmd.Flags().StringVar(&args.objectStoreBucket, "bucket-prefix", "", "A prefix for the bucket name to be created (required)")
err := cmd.MarkFlagRequired("bucket")
if err != nil {
return err
Expand Down

0 comments on commit fb86acf

Please sign in to comment.