From a65e5c126a5a89f3e503626e30faab47835de0c1 Mon Sep 17 00:00:00 2001 From: James Rasell Date: Mon, 15 Jul 2024 10:07:34 +0100 Subject: [PATCH] docs: update quota docs and changelog to detail new cores feature. (#23592) --- .changelog/23543.txt | 3 + .../content/docs/commands/quota/inspect.mdx | 74 ++++++++++--------- .../content/docs/commands/quota/status.mdx | 25 ++++--- 3 files changed, 58 insertions(+), 44 deletions(-) create mode 100644 .changelog/23543.txt diff --git a/.changelog/23543.txt b/.changelog/23543.txt new file mode 100644 index 000000000..4c6d9f4e1 --- /dev/null +++ b/.changelog/23543.txt @@ -0,0 +1,3 @@ +```release-note:improvement +quota (Enterprise): Allow CPU cores to be configured within a quota +``` diff --git a/website/content/docs/commands/quota/inspect.mdx b/website/content/docs/commands/quota/inspect.mdx index 31798b859..aea7b9ef6 100644 --- a/website/content/docs/commands/quota/inspect.mdx +++ b/website/content/docs/commands/quota/inspect.mdx @@ -40,49 +40,51 @@ Inspect a quota specification: $ nomad quota inspect default-quota { "Spec": { - "CreateIndex": 8, + "CreateIndex": 11, "Description": "Limit the shared default namespace", "Limits": [ { - "Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=", + "Hash": "p7s7A+4mFt+M41NS3nB3APheQS9YaePLguvnNn/c1t4=", "Region": "global", "RegionLimit": { - "CPU": 2500, + "CPU": 1000, + "Cores": 1, + "Devices": null, "DiskMB": 0, - "MemoryMB": 2000, + "IOPS": 0, + "MemoryMB": 1000, + "MemoryMaxMB": 0, + "NUMA": null, "Networks": null - } + }, + "VariablesLimit": 0 } ], - "ModifyIndex": 56, + "ModifyIndex": 11, "Name": "default-quota" }, "UsageLookupErrors": {}, "Usages": { "global": { - "CreateIndex": 8, - "ModifyIndex": 56, - "Name": "default-quota", + "CreateIndex": 11, + "ModifyIndex": 12, + "Name": "default", "Used": { - "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=": { - "Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=", + "p7s7A+4mFt+M41NS3nB3APheQS9YaePLguvnNn/c1t4=": { + "Hash": "p7s7A+4mFt+M41NS3nB3APheQS9YaePLguvnNn/c1t4=", "Region": "global", "RegionLimit": { - "CPU": 500, + "CPU": 0, + "Cores": 0, + "Devices": null, "DiskMB": 0, - "MemoryMB": 256, - "Networks": [ - { - "CIDR": "", - "Device": "", - "DynamicPorts": null, - "IP": "", - "MBits": 0, - "Mode": "", - "ReservedPorts": null - } - ] - } + "IOPS": 0, + "MemoryMB": 0, + "MemoryMaxMB": 0, + "NUMA": null, + "Networks": null + }, + "VariablesLimit": 0 } } } @@ -93,30 +95,34 @@ $ nomad quota inspect default-quota The `-json` flag can be used to get the quota specs in json format: ```shell-session $ nomad quota inspect -json default-quota - { - "CreateIndex": 8, + "CreateIndex": 11, "Description": "Limit the shared default namespace", "Limits": [ { - "Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=", + "Hash": "p7s7A+4mFt+M41NS3nB3APheQS9YaePLguvnNn/c1t4=", "Region": "global", "RegionLimit": { - "CPU": 2500, + "CPU": 1000, + "Cores": 1, + "Devices": null, "DiskMB": 0, - "MemoryMB": 2000, + "IOPS": 0, + "MemoryMB": 1000, + "MemoryMaxMB": 0, + "NUMA": null, "Networks": null - } + }, + "VariablesLimit": 0 } ], - "ModifyIndex": 56, + "ModifyIndex": 11, "Name": "default-quota" } ``` Or use the `-t` flag to format and display the quota specs using a Go template: ```shell-session -$ nomad quota inspect -t {{ .Description }} default-quota - +$ nomad quota inspect -t '{{ .Description }}' default-quota Limit the shared default namespace ``` diff --git a/website/content/docs/commands/quota/status.mdx b/website/content/docs/commands/quota/status.mdx index 4bd6b11c7..a353e155a 100644 --- a/website/content/docs/commands/quota/status.mdx +++ b/website/content/docs/commands/quota/status.mdx @@ -43,28 +43,33 @@ Description = Limit the shared default namespace Limits = 1 Quota Limits -Region CPU Usage Memory Usage Network Usage -global 500 / 2500 256 / 2000 30 / 50 - +Region CPU Usage Core Usage Memory Usage Memory Max Usage Variables Usage +global 0 / 1000 0 / 1 0 / 1000 0 / inf 0 / inf ``` The `-json` flag can be used to get the quota status in json format: ```shell-session -$ nomad quota inspect -json default-quota +$ nomad quota status -json default-quota { "CreateIndex": 8, "Description": "Limit the shared default namespace", "Limits": [ { - "Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=", + "Hash": "p7s7A+4mFt+M41NS3nB3APheQS9YaePLguvnNn/c1t4=", "Region": "global", "RegionLimit": { - "CPU": 2500, + "CPU": 1000, + "Cores": 1, + "Devices": null, "DiskMB": 0, - "MemoryMB": 2000, + "IOPS": 0, + "MemoryMB": 1000, + "MemoryMaxMB": 0, + "NUMA": null, "Networks": null - } + }, + "VariablesLimit": 0 } ], "ModifyIndex": 56, @@ -75,6 +80,6 @@ $ nomad quota inspect -json default-quota Or use the `-t` flag to format and display the quota status using a Go template: ```shell-session -$ nomad quota inspect -t {{ .Description }} default-quota +$ nomad quota status -t {{ .Description }} default-quota Limit the shared default namespace -``` \ No newline at end of file +```