You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update labeling interface to be consistent with others
This moves the labeling interface to match that of similar ones, e.g. "annotations." - `pgo create cluster`, `pgo label`, and `pgo delete label` all now have a single `--label` flag. `--label` can be specified multiple times. - The API call itself takes a mapping of key/value pairs. - The API endpoint parameter for `pgo label` and `pgo delete label` is now called `Labels` Issue: [ch10202]
Copy file name to clipboardExpand all lines: cmd/pgo/cmd/create.go
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ var (
39
39
Passwordstring
40
40
SecretFromstring
41
41
PoliciesFlag, PolicyFilestring
42
-
UserLabelsstring
42
+
UserLabels[]string
43
43
Tablespaces []string
44
44
ServiceTypestring
45
45
ServiceTypePgBouncerstring
@@ -392,7 +392,8 @@ func init() {
392
392
createClusterCmd.Flags().StringVarP(&CustomConfig, "custom-config", "", "", "The name of a configMap that holds custom PostgreSQL configuration files used to override defaults.")
393
393
createClusterCmd.Flags().StringVarP(&Database, "database", "d", "", "If specified, sets the name of the initial database that is created for the user. Defaults to the value set in the PostgreSQL Operator configuration, or if that is not present, the name of the cluster")
394
394
createClusterCmd.Flags().BoolVarP(&DisableAutofailFlag, "disable-autofail", "", false, "Disables autofail capabitilies in the cluster following cluster initialization.")
395
-
createClusterCmd.Flags().StringVarP(&UserLabels, "labels", "l", "", "The labels to apply to this cluster.")
395
+
createClusterCmd.Flags().StringSliceVar(&UserLabels, "label", []string{}, "Add labels to apply to the PostgreSQL cluster, "+
396
+
"e.g. \"key=value\", \"prefix/key=value\". Can specify flag multiple times.")
396
397
createClusterCmd.Flags().StringVar(&MemoryRequest, "memory", "", "Set the amount of RAM to request, e.g. "+
397
398
"1GiB. Overrides the default server value.")
398
399
createClusterCmd.Flags().StringVar(&MemoryLimit, "memory-limit", "", "Set the amount of RAM to limit, e.g. "+
0 commit comments