In API docs, `CPU` and `Memory` were used for resource settings on
services. The actual settings should be `NanoCPUs` and `MemoryBytes`.
This fix address the inconsistent fields between API docs and actual
settings.
This fix fixes #24058.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 0159ee1f5dcd28dad1f621d17b9321f35f171b29)
Signed-off-by: Tibor Vass <tibor@docker.com>
| ... | ... |
@@ -4007,11 +4007,11 @@ JSON Parameters: |
| 4007 | 4007 |
- **Resources** – Resource requirements which apply to each individual container created as part |
| 4008 | 4008 |
of the service. |
| 4009 | 4009 |
- **Limits** – Define resources limits. |
| 4010 |
- - **CPU** – CPU limit |
|
| 4011 |
- - **Memory** – Memory limit |
|
| 4010 |
+ - **NanoCPUs** – CPU limit in units of 10<sup>-9</sup> CPU shares. |
|
| 4011 |
+ - **MemoryBytes** – Memory limit in Bytes. |
|
| 4012 | 4012 |
- **Reservation** – Define resources reservation. |
| 4013 |
- - **CPU** – CPU reservation |
|
| 4014 |
- - **Memory** – Memory reservation |
|
| 4013 |
+ - **NanoCPUs** – CPU reservation in units of 10<sup>-9</sup> CPU shares. |
|
| 4014 |
+ - **MemoryBytes** – Memory reservation in Bytes. |
|
| 4015 | 4015 |
- **RestartPolicy** – Specification for the restart policy which applies to containers created |
| 4016 | 4016 |
as part of this service. |
| 4017 | 4017 |
- **Condition** – Condition for restart (`none`, `on-failure`, or `any`). |