docs: update quota docs to include network limits

This commit is contained in:
Lang Martin 2019-11-19 16:52:03 -05:00 committed by Lang Martin
parent f45bebdb66
commit def417a33a
3 changed files with 57 additions and 7 deletions

View File

@ -62,7 +62,17 @@ $ curl \
"CPU": 2500,
"DiskMB": 0,
"MemoryMB": 2000,
"Networks": null
"Networks": [
{
"CIDR": "",
"Device": "",
"DynamicPorts": null,
"IP": "",
"MBits": 50,
"Mode": "",
"ReservedPorts": null
}
]
}
}
],
@ -115,7 +125,17 @@ $ curl \
"CPU": 2500,
"DiskMB": 0,
"MemoryMB": 2000,
"Networks": null
"Networks": [
{
"CIDR": "",
"Device": "",
"DynamicPorts": null,
"IP": "",
"MBits": 50,
"Mode": "",
"ReservedPorts": null
}
]
}
}
],
@ -157,12 +177,17 @@ object](https://github.com/hashicorp/nomad/blob/master/api/quota.go#L100-L131).
"Region": "global",
"RegionLimit": {
"CPU": 2500,
"MemoryMB": 1000
"MemoryMB": 1000,
"Networks": [
{
"Mbits": 50
}
]
}
}
]
}
```
```
### Sample Request
@ -305,7 +330,17 @@ $ curl \
"CPU": 500,
"MemoryMB": 256,
"DiskMB": 0,
"Networks": null
"Networks": [
{
"CIDR": "",
"Device": "",
"DynamicPorts": null,
"IP": "",
"MBits": 50,
"Mode": "",
"ReservedPorts": null
}
]
},
"Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU="
}

View File

@ -68,7 +68,17 @@ $ nomad quota inspect default-quota
"CPU": 500,
"DiskMB": 0,
"MemoryMB": 256,
"Networks": null
"Networks": [
{
"CIDR": "",
"Device": "",
"DynamicPorts": null,
"IP": "",
"MBits": 0,
"Mode": "",
"ReservedPorts": null
}
]
}
}
}

View File

@ -65,13 +65,18 @@ limit {
region_limit {
cpu = 2500
memory = 1000
networks = [
{ mbits = 50 }
]
}
}
```
A quota specification is composed of one or more resource limits. Each limit
applies to a particular Nomad region. Within the limit object, operators can
specify the allowed CPU and memory usage.
specify the allowed CPU, memory usage, and network bandwidth. Network bandwidth
limits may only specify a single limit for all interfaces. Network quotas were
introduced in 0.10.2 and are optional, they will not be enforced if omitted.
To create the particular quota, it is as simple as running: