Add agent reload to the nomad cli.
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
### Proposal
API was updated to allow an api driven agent reload in the following pull request:
#27106
Proposal is update the cli and add a command to trigger an agent reload.
This is more of me just thinking, but...
Previously thought/discussed of putting it under `nomad agent`, but I feel like it is an odd place to do it for one small, maybe simple reason.
If I typed in `nomad tls`, it comes back with usage and subcommands like so.
```
➜ ~ nomad tls
Usage: nomad tls [options]
This command groups subcommands for creating certificates for Nomad TLS configuration.
The TLS command allows operators to generate self signed certificates to use
when securing your Nomad cluster.
Some simple examples for creating certificates can be found here.
More detailed examples are available in the subcommands or the documentation.
Create a CA
$ nomad tls ca create
Create a server certificate
$ nomad tls cert create -server
Create a client certificate
$ nomad tls cert create -client
Subcommands:
ca Helpers for managing certificate authorities
cert Helpers for managing certificates
```
Doing it for `nomad agent` does not provide usage at that level for the command.
```
➜ ~ nomad agent
==> Must specify either server, client or dev mode for the agent.
```
So thoughts are -
1. `nomad agent reload`
Seems the most suitable as this action is directly involving the agent. Might need to tweak the message a bit to be suitable with the subcommand.
2. `nomad agent-reload`
There is already a command for `nomad agent-info`, so maybe a `nomad agent-reload` is fine?
Either are fine with me, but if anyone has a strong opinion, let it out.
### Use-cases
Parity with the API. No option currently exists.
### Attempted Solutions
Currently does not exist. Reload is a newer API endpoint.
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the API changes in pull request #27106 and the existing `nomad agent` and `nomad agent-info` command entry points. Decide whether reload belongs under `nomad agent` or as `nomad agent-reload`, then trace the API parity needed for the selected command. Done means the CLI exposes a reload action that triggers the agent reload endpoint and has coverage for the new command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100