cli: add help message for -consul-namespace (#18081)

Add missing help entry for the `-consul-namespace` flag in `nomad job
run`.
This commit is contained in:
Luiz Aoqui
2023-07-28 10:22:59 -04:00
committed by GitHub
parent 0a32d7ff5b
commit ee31916c3b
3 changed files with 29 additions and 17 deletions

View File

@@ -121,6 +121,14 @@ Run Options:
the job file. This overrides the token found in $CONSUL_HTTP_TOKEN environment
variable and that found in the job.
-consul-namespace
(Enterprise only) If set, any services in the job will be registered into
the specified Consul namespace. Any template block reading from Consul KV
will be scoped to the specified Consul namespace. If Consul ACLs are
enabled and the "consul" block "allow_unauthenticated" is disabled in the
Nomad server configuration, then a Consul token must be supplied with
appropriate service and KV Consul ACL policy permissions.
-vault-token
Used to validate if the user submitting the job has permission to run the job
according to its Vault policies. A Vault token must be supplied if the vault
@@ -156,21 +164,22 @@ func (c *JobRunCommand) Synopsis() string {
func (c *JobRunCommand) AutocompleteFlags() complete.Flags {
return mergeAutocompleteFlags(c.Meta.AutocompleteFlags(FlagSetClient),
complete.Flags{
"-check-index": complete.PredictNothing,
"-detach": complete.PredictNothing,
"-verbose": complete.PredictNothing,
"-consul-token": complete.PredictNothing,
"-vault-token": complete.PredictAnything,
"-vault-namespace": complete.PredictAnything,
"-output": complete.PredictNothing,
"-policy-override": complete.PredictNothing,
"-preserve-counts": complete.PredictNothing,
"-json": complete.PredictNothing,
"-hcl1": complete.PredictNothing,
"-hcl2-strict": complete.PredictNothing,
"-var": complete.PredictAnything,
"-var-file": complete.PredictFiles("*.var"),
"-eval-priority": complete.PredictNothing,
"-check-index": complete.PredictNothing,
"-detach": complete.PredictNothing,
"-verbose": complete.PredictNothing,
"-consul-token": complete.PredictNothing,
"-consul-namespace": complete.PredictAnything,
"-vault-token": complete.PredictAnything,
"-vault-namespace": complete.PredictAnything,
"-output": complete.PredictNothing,
"-policy-override": complete.PredictNothing,
"-preserve-counts": complete.PredictNothing,
"-json": complete.PredictNothing,
"-hcl1": complete.PredictNothing,
"-hcl2-strict": complete.PredictNothing,
"-var": complete.PredictAnything,
"-var-file": complete.PredictFiles("*.var"),
"-eval-priority": complete.PredictNothing,
})
}