Skip to content

Commit 3a6f83d

Browse files
committed
chore: Add URL parameters to limit resource usage
Signed-off-by: Oleksii Orel <oorel@redhat.com>
1 parent 2c1c2f4 commit 3a6f83d

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

modules/end-user-guide/nav.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
**** xref:url-parameter-for-the-workspace-storage.adoc[]
1313
**** xref:url-parameter-for-additional-remotes.adoc[]
1414
**** xref:url-parameter-for-container-image.adoc[]
15+
**** xref:url-parameter-for-memory-limit.adoc[]
16+
**** xref:url-parameter-for-cpu-limit.adoc[]
1517
** xref:starting-a-workspace-from-a-raw-devfile-url.adoc[]
1618
** xref:basic-actions-you-can-perform-on-a-workspace.adoc[]
1719
** xref:authenticating-to-a-git-server-from-a-workspace.adoc[]

modules/end-user-guide/pages/optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ When you start a new workspace, {prod-short} configures the workspace according
1818
* xref:url-parameter-for-the-workspace-storage.adoc[]
1919
* xref:url-parameter-for-additional-remotes.adoc[]
2020
* xref:url-parameter-for-container-image.adoc[]
21+
* xref:url-parameter-for-memory-limit.adoc[]
22+
* xref:url-parameter-for-cpu-limit.adoc[]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
:_content-type: CONCEPT
2+
:description: URL parameter for a CPU limit
3+
:keywords: parameter, URL, container, CPU limit
4+
:navtitle: URL parameter for a CPU limit
5+
//:page-aliases:
6+
7+
[id="url-parameter-for-cpu-limit"]
8+
= URL parameter for a CPU limit
9+
10+
You can use the `cpuLimit` parameter to specify or override container CPU limit
11+
when starting a new workspace from a devfile URL. This is useful when you want to ensure that the workspace has enough memory allocated for your development tasks.
12+
13+
The URL parameter for the CPU limit is `cpuLimit=`:
14+
15+
[source,subs="+quotes,+attributes,+macros"]
16+
----
17+
pass:c,a,q[{prod-url}]#__<git_repository_url>__?cpuLimit=__<container_cpu_limit>__
18+
----
19+
You can specify the CPU limit in cores.
20+
21+
.Example
22+
23+
====
24+
25+
`pass:c,a,q[{prod-url}]#https://github.com/eclipse-che/che-docs?cpuLimit=2`
26+
27+
====
28+
[IMPORTANT]
29+
30+
When you specify the `cpuLimit` parameter, it will override the CPU limit defined in the devfile for the first container.
31+
32+
The sum of the limits from the target devfile and from the editor-definition will be applied to the workspace pod `spec.containers[0].resources.limits.cpu`.
33+
34+
.Additional resources
35+
36+
* link:https://devfile.io/docs/2.3.0/limiting-resources-usage[Limiting resources usage]
37+
38+
* {editor-definition-samples-link}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
:_content-type: CONCEPT
2+
:description: URL parameter for a memory limit
3+
:keywords: parameter, URL, container, memory limit
4+
:navtitle: URL parameter for a memory limit
5+
//:page-aliases:
6+
7+
[id="url-parameter-for-memory-limit"]
8+
= URL parameter for a memory limit
9+
10+
You can use the `memoryLimit` parameter to specify or override container memory limit
11+
when starting a new workspace from a devfile URL. This is useful when you want to ensure that the workspace has enough memory allocated for your development tasks.
12+
13+
The URL parameter for the memory limit is `memoryLimit=`:
14+
15+
[source,subs="+quotes,+attributes,+macros"]
16+
----
17+
pass:c,a,q[{prod-url}]#__<git_repository_url>__?memoryLimit=__<container_memory_limit>__
18+
----
19+
You can specify the memory limit in bytes, or use a suffix such as `Mi` for mebibytes or `Gi` for gibibytes.
20+
21+
.Example
22+
23+
====
24+
25+
`pass:c,a,q[{prod-url}]#https://github.com/eclipse-che/che-docs?memoryLimit=4Gi`
26+
27+
====
28+
[IMPORTANT]
29+
30+
When you specify the `memoryLimit` parameter, it will override the memory limit defined in the devfile for the first container.
31+
32+
The sum of the limits from the target devfile and from the editor-definition will be applied to the workspace pod `spec.containers[0].resources.limits.memory`.
33+
34+
.Additional resources
35+
36+
* link:https://devfile.io/docs/2.3.0/limiting-resources-usage[Limiting resources usage]
37+
38+
* {editor-definition-samples-link}

0 commit comments

Comments
 (0)