14 Commits

Author SHA1 Message Date
James Rasell
2ef837f02f cli: Ensure all no argument console messages are the same. (#26331)
Use a constant to ensure consistency across the CLI when displaying
a console message indicating the command was passed arguments when
it takes none.
2025-07-25 07:05:10 +01:00
Piotr Kazmierczak
73a193f6d9 stateful deployments: task group host volume claims CLI (#25116)
CLI for interacting with task group host volume claims.
2025-02-27 17:04:48 +01:00
James Rasell
32c25d3935 cli: Remove warning notes from Vault and Consul setup commands. (#25153) 2025-02-19 09:18:42 +00:00
Charlie Voiselle
30ab8897d2 deps: Switch from mitchellh/cli to hashicorp/cli (#19321)
Co-authored-by: James Rasell <jrasell@hashicorp.com>
2024-12-19 15:41:11 +00:00
Tim Gross
f9dd120d29 cli: add -jwks-ca-file to Vault/Consul setup commands (#20518)
When setting up auth methods for Consul and Vault in production environments, we
can typically assume that the CA certificate for the JWKS endpoint will be in
the host certificate store (as part of the usual configuration management
cluster admins needs to do). But for quick demos with `-dev` agents, this won't
be the case.

Add a `-jwks-ca-file` parameter to the setup commands so that we can use this
tool to quickly setup WI with `-dev` agents running TLS.
2024-05-03 08:26:29 -04:00
Piotr Kazmierczak
11ca21ca3c cli: correct typos in setup consul (#19754) 2024-01-17 14:13:07 +01:00
Piotr Kazmierczak
0a783d0046 wi: change setup cmds -cleanup flag to -destroy (#19295) 2023-12-04 15:28:17 +01:00
Luiz Aoqui
d12dc36c3b cli: add Consul namespace selector (#19251)
Update the `nomad setup consul` command to include a `Selector` for the
`NamespaceRule` so the logic is only applied when the token has a claim
for `consul_namespace`.

Jobs without an explicit `consul.namespace` value receive a JWT without
the `consul_namespace` claim because Nomad is unable to determine which
Consul namespace should be used.

By using `NamespaceRules`, cluster operators are able to set a default
value for these jobs.
2023-12-01 09:29:08 -05:00
Piotr Kazmierczak
67bbcc4a4f cli: setup consul proper ns handling (#19237)
In order to correctly handle Consul namespaces, auth methods and binding rules
must always be created in the default namespace only.

---------

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-11-30 20:09:19 +01:00
Piotr Kazmierczak
248b2ba5cd WI: use single auth method for Consul by default (#19169)
This simplifies the default setup of Nomad workloads WI-based
authentication for Consul by using a single auth method with 2 binding rules.

Users can still specify separate auth methods for services and tasks.
2023-11-28 12:22:27 +01:00
Luiz Aoqui
85d923b759 cli: fix Consul env var URL reference (#19041) 2023-11-09 10:58:03 -05:00
Piotr Kazmierczak
128c71b579 cli: simplify conditionals in setup commands (#19011) 2023-11-08 19:41:15 -05:00
Luiz Aoqui
6761f1f98c cli: fix setup consul binding rule config (#19033)
When creating the binding rule, `BindName` must match the pattern used
for the role name, otherwise the task will not be able to login to
Consul.

Also update the equality check for the binding rule to ensure this
property is held even if the auth method already has existing binding
rules attached.
2023-11-08 15:13:16 -05:00
Piotr Kazmierczak
d69a1238cd cli: consul setup command (#18820)
An interactive setup helper for configuring Consul to accept Nomad WI-enabled workloads.

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-11-02 09:02:07 +01:00