summaryrefslogtreecommitdiff
path: root/interface-definitions/container.xml.in
diff options
context:
space:
mode:
authorNicolas Vollmar <nvo@scaling.ch>2024-05-27 13:12:54 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-05-28 18:16:31 +0000
commit8007b58f1e0ecfad9ed0cca7ecec725287432439 (patch)
tree1224dc7bbc2c95e3504a1c7ce6643ae6b0a9d863 /interface-definitions/container.xml.in
parent10df4ad8a3d7182363460b8043af2cacf128c893 (diff)
downloadvyos-1x-8007b58f1e0ecfad9ed0cca7ecec725287432439.tar.gz
vyos-1x-8007b58f1e0ecfad9ed0cca7ecec725287432439.zip
T6406: add container cpu limit option
(cherry picked from commit 81dea053e7178b8fea836a85aacde2a38ffb9e09)
Diffstat (limited to 'interface-definitions/container.xml.in')
-rw-r--r--interface-definitions/container.xml.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in
index 2296a3e9e..4370f5888 100644
--- a/interface-definitions/container.xml.in
+++ b/interface-definitions/container.xml.in
@@ -192,6 +192,24 @@
</leafNode>
</children>
</tagNode>
+ <leafNode name="cpus">
+ <properties>
+ <help>This limits the number of CPU resources the container can use</help>
+ <valueHelp>
+ <format>u32:0</format>
+ <description>Unlimited</description>
+ </valueHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Amount of CPU time the container can use in amount of cores (up to three decimals)</description>
+ </valueHelp>
+ <constraint>
+ <regex>(0|[1-9]\d*)(\.\d{1,3})?</regex>
+ </constraint>
+ <constraintErrorMessage>Container CPU limit must be a (decimal) number in range 0 to number of threads</constraintErrorMessage>
+ </properties>
+ <defaultValue>0</defaultValue>
+ </leafNode>
<leafNode name="memory">
<properties>
<help>Memory (RAM) available to this container</help>