Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4798 from hashicorp/b-nomad-runner-install-resour…
Browse files Browse the repository at this point in the history
…ce-cli-flags

Nomad runner install CPU and memory flags
  • Loading branch information
paladin-devops committed Jun 12, 2023
2 parents 42ffdf0 + 6aed3f4 commit a9207d0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/4798.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
runnerinstall/nomad: Add CLI flags for setting custom CPU and memory resources.
```
12 changes: 12 additions & 0 deletions internal/runnerinstall/nomad.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,18 @@ func (i *NomadRunnerInstaller) InstallFlags(set *flag.Set) {
Default: defaultRunnerImage,
})

set.StringVar(&flag.StringVar{
Name: "nomad-runner-cpu",
Target: &i.Config.RunnerResourcesCPU,
Usage: "CPU required to run the runner task in MHz.",
})

set.StringVar(&flag.StringVar{
Name: "nomad-runner-memory",
Target: &i.Config.RunnerResourcesMemory,
Usage: "MB of Memory to allocate to the runner job task.",
})

set.StringVar(&flag.StringVar{
Name: "nomad-host-volume",
Target: &i.Config.HostVolume,
Expand Down
2 changes: 2 additions & 0 deletions website/content/commands/runner-install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ the install, the command would be:

- `-nomad-dc=<string>` - Datacenters to install to for Nomad. The default is dc1.
- `-nomad-runner-image=<string>` - Docker image for the Waypoint runner. The default is hashicorp/waypoint.
- `-nomad-runner-cpu=<string>` - CPU required to run the runner task in MHz.
- `-nomad-runner-memory=<string>` - MB of Memory to allocate to the runner job task.
- `-nomad-host-volume=<string>` - Nomad host volume name.
- `-nomad-csi-volume-plugin-id=<string>` - The ID of the CSI plugin that manages the volume, required for volume type 'csi'.
- `-nomad-csi-volume-provider=<string>` - Nomad CSI volume provider, required for volume type 'csi'.
Expand Down

0 comments on commit a9207d0

Please sign in to comment.