open-nomad/api
Mahmood Ali 18b581656d oversubscription: adds CLI and API support
This commit updates the API to pass the MemoryMaxMB field, and the CLI to show
the max set for the task.

Also, start parsing the MemoryMaxMB in hcl2, as it's set by tags.

A sample CLI output; note the additional `Max: ` for "task":

```
$ nomad alloc status 96fbeb0b
ID                  = 96fbeb0b-a0b3-aa95-62bf-b8a39492fd5c
[...]

Task "cgroup-fetcher" is "running"
Task Resources
CPU        Memory         Disk     Addresses
0/500 MHz  32 MiB/20 MiB  300 MiB

Task Events:
[...]

Task "task" is "running"
Task Resources
CPU        Memory          Disk     Addresses
0/500 MHz  176 KiB/20 MiB  300 MiB
           Max: 30 MiB

Task Events:
[...]
```
2021-03-30 16:55:58 -04:00
..
contexts api: added scaling_policy context to global search 2021-02-03 21:28:32 +00:00
internal/testutil Fixup uses of sanity (#10187) 2021-03-16 18:05:08 -04:00
acl.go HTTP API support for 'nomad ui -login' 2021-03-10 08:17:56 -05:00
acl_test.go HTTP API support for 'nomad ui -login' 2021-03-10 08:17:56 -05:00
agent.go api: nomad debug new /agent/host (#8325) 2020-07-02 09:51:25 -04:00
agent_test.go fix tests, update changelog 2020-01-29 13:55:39 -05:00
allocations.go oversubscription: adds CLI and API support 2021-03-30 16:55:58 -04:00
allocations_test.go api: add Allocation client and server terminal status funcs. 2021-03-25 08:52:59 +01:00
api.go Revert "Headers -> Header" 2021-01-06 17:12:22 +00:00
api_test.go Revert "Headers -> Header" 2021-01-06 17:12:22 +00:00
compose_test.go test: fix up testing around host networks 2020-06-19 13:53:31 -04:00
constraint.go Tag Job spec with HCLv2 tags 2020-10-21 14:05:46 -04:00
constraint_test.go Parallel 2017-07-21 16:33:04 -07:00
csi.go CSI: remove prefix matching from CSIVolumeByID and fix CLI prefix matching (#10158) 2021-03-18 14:32:40 -04:00
csi_test.go csi: add -force flag to volume deregister (#8295) 2020-07-01 12:17:51 -04:00
deployments.go multiregion CLI: nomad deployment unblock 2020-06-17 11:03:44 -04:00
evaluations.go add create and modify timestamps to evaluations (#5881) 2019-08-07 09:50:35 -07:00
evaluations_test.go non-Existent -> nonexistent 2018-03-12 11:59:33 -07:00
event_stream.go API: Event stream use full name instead of Eval/Alloc (#9509) 2020-12-03 11:48:18 -05:00
event_stream_test.go API: Event stream use full name instead of Eval/Alloc (#9509) 2020-12-03 11:48:18 -05:00
fs.go cli: recover from client ACL lookup failures 2019-10-04 11:23:59 -04:00
fs_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
go.mod Api/event stream payload values (#9277) 2020-11-05 13:04:18 -05:00
go.sum command: remove use of flag impls from consul 2020-12-11 07:58:20 -06:00
ioutil.go Add api/ package function to save snapshot 2020-05-21 20:04:38 -04:00
ioutil_test.go Add api/ package function to save snapshot 2020-05-21 20:04:38 -04:00
jobs.go Don't parse the server-set fields of the job struct 2020-10-22 08:18:57 -04:00
jobs_test.go api: add Resource.Canonicalize test and fix tests to handle ReservedCores field 2021-03-19 22:08:27 -04:00
namespace.go sync 2017-10-13 14:36:02 -07:00
namespace_test.go Fix pro tags 2020-07-17 11:02:00 -04:00
nodes.go api: add new 'cores' field to task resources 2021-03-18 23:13:30 -04:00
nodes_test.go api: add field filters to /v1/{allocations,nodes} 2020-10-14 10:35:22 -07:00
operator.go configuration and oss components for licensing (#10216) 2021-03-23 09:08:14 -04:00
operator_autopilot.go implement MinQuorum 2020-02-16 16:04:59 -06:00
operator_metrics.go Metrics gotemplate support, debug bundle features (#9067) 2020-10-14 15:16:10 -04:00
operator_metrics_test.go agent: return req error if prometheus metrics are disabled. 2021-03-09 15:28:58 +01:00
operator_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
quota.go sync 2017-10-13 14:36:02 -07:00
quota_test.go sync 2017-10-13 14:36:02 -07:00
raw.go Making the client use tls if the node from which migration has to be made has enabled tls 2016-10-31 10:20:04 -07:00
recommendations.go added new policy capabilities for recommendations API 2020-10-28 14:32:16 +00:00
regions.go fix a copy/paste error on api.Regions() comment 2017-01-17 22:48:01 -08:00
regions_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
resources.go oversubscription: adds CLI and API support 2021-03-30 16:55:58 -04:00
resources_test.go api: add Resource.Canonicalize test and fix tests to handle ReservedCores field 2021-03-19 22:08:27 -04:00
scaling.go added new policy capabilities for recommendations API 2020-10-28 14:32:16 +00:00
scaling_test.go add scaling policy type 2020-09-29 17:57:46 -04:00
search.go Search respects QueryOptions and returns QueryMeta 2017-08-27 22:17:51 -07:00
search_test.go Add new reschedule options to API layer and unit tests 2018-03-14 16:10:32 -05:00
sentinel.go sync 2017-09-19 10:08:23 -05:00
sentinel_test.go Fix pro tags 2020-07-17 11:02:00 -04:00
services.go consul/connect: enable setting local_bind_address in upstream 2021-02-26 11:37:31 +00:00
services_test.go consul/connect: enable setting local_bind_address in upstream 2021-02-26 11:37:31 +00:00
status.go display server leaders per region 2016-03-17 16:04:09 -07:00
status_test.go Parallel 2017-07-21 16:33:04 -07:00
system.go Add missing ReconcileSummaries API method 2017-08-24 11:55:10 +02:00
system_test.go Parallel 2017-07-21 16:33:04 -07:00
tasks.go CSI: unique volume per allocation 2021-03-18 15:35:11 -04:00
tasks_test.go jobspec: add support for headers in artifact stanza 2020-11-13 12:03:54 -06:00
util_test.go appease the linter and fix an incorrect test 2021-01-08 19:38:25 +00:00
utils.go more testing for ScalingPolicy, mainly around parsing and canonicalization for Min/Max 2020-03-24 19:43:50 +00:00
utils_test.go api: move formatFloat function 2019-01-18 15:31:31 -05:00