mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
oversubscription: add memory_max to hclv1
Allow specifying the `memory_max` field in HCL under the resources block. Though HCLv1 is deprecated, I've updated them to ease our testing.
This commit is contained in:
@@ -548,6 +548,7 @@ func parseResources(result *api.Resources, list *ast.ObjectList) error {
|
||||
"iops", // COMPAT(0.10): Remove after one release to allow it to be removed from jobspecs
|
||||
"disk",
|
||||
"memory",
|
||||
"memory_max",
|
||||
"network",
|
||||
"device",
|
||||
}
|
||||
|
||||
@@ -285,8 +285,9 @@ func TestParse(t *testing.T) {
|
||||
"LOREM": "ipsum",
|
||||
},
|
||||
Resources: &api.Resources{
|
||||
CPU: intToPtr(500),
|
||||
MemoryMB: intToPtr(128),
|
||||
CPU: intToPtr(500),
|
||||
MemoryMB: intToPtr(128),
|
||||
MemoryMaxMB: intToPtr(256),
|
||||
Networks: []*api.NetworkResource{
|
||||
{
|
||||
MBits: intToPtr(100),
|
||||
|
||||
@@ -227,8 +227,9 @@ job "binstore-storagelocker" {
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 500
|
||||
memory = 128
|
||||
cpu = 500
|
||||
memory = 128
|
||||
memory_max = 256
|
||||
|
||||
network {
|
||||
mbits = "100"
|
||||
|
||||
Reference in New Issue
Block a user