35d65c7c7e
Fixes #14617 Dynamic Node Metadata allows Nomad users, and their jobs, to update Node metadata through an API. Currently Node metadata is only reloaded when a Client agent is restarted. Includes new UI for editing metadata as well. --------- Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
36 lines
834 B
Go
36 lines
834 B
Go
package command
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/mitchellh/cli"
|
|
)
|
|
|
|
type NodeMetaCommand struct {
|
|
Meta
|
|
}
|
|
|
|
func (c *NodeMetaCommand) Help() string {
|
|
helpText := `
|
|
Usage: nomad node meta [subcommand]
|
|
|
|
Interact with a node's metadata. The apply subcommand allows for dynamically
|
|
updating node metadata. The read subcommand allows reading all of the
|
|
metadata set on the client. All commands interact directly with a client and
|
|
allow setting a custom target with the -node-id option.
|
|
|
|
Please see the individual subcommand help for detailed usage information.
|
|
`
|
|
return strings.TrimSpace(helpText)
|
|
}
|
|
|
|
func (c *NodeMetaCommand) Synopsis() string {
|
|
return "Interact with node metadata"
|
|
}
|
|
|
|
func (c *NodeMetaCommand) Name() string { return "node meta" }
|
|
|
|
func (c *NodeMetaCommand) Run(args []string) int {
|
|
return cli.RunResultHelp
|
|
}
|