Skip to content

Commit 56a3b1a

Browse files
olexii4deerskindolldkwon17
authored
chore: Add URL parameters to limit resource usage (#2914)
* chore: Add URL parameters to limit resource usage Signed-off-by: Oleksii Orel <[email protected]> * Update modules/end-user-guide/pages/url-parameter-for-cpu-limit.adoc Co-authored-by: Jana Vrbkova <[email protected]> * Update modules/end-user-guide/pages/url-parameter-for-memory-limit.adoc Co-authored-by: Jana Vrbkova <[email protected]> * Update modules/end-user-guide/pages/url-parameter-for-cpu-limit.adoc Co-authored-by: David Kwon <[email protected]> * Update modules/end-user-guide/pages/url-parameter-for-memory-limit.adoc Co-authored-by: David Kwon <[email protected]> * Update modules/end-user-guide/pages/url-parameter-for-memory-limit.adoc Co-authored-by: David Kwon <[email protected]> * Update modules/end-user-guide/pages/url-parameter-for-cpu-limit.adoc Co-authored-by: David Kwon <[email protected]> * Update modules/end-user-guide/pages/url-parameter-for-cpu-limit.adoc Co-authored-by: David Kwon <[email protected]> * Update modules/end-user-guide/pages/url-parameter-for-memory-limit.adoc Co-authored-by: David Kwon <[email protected]> --------- Signed-off-by: Oleksii Orel <[email protected]> Co-authored-by: Jana Vrbkova <[email protected]> Co-authored-by: David Kwon <[email protected]>
1 parent 4bbd483 commit 56a3b1a

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-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: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 the 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 overrides the CPU limit defined for the first container of the devfile.
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+
35+
.Additional resources
36+
37+
* link:https://devfile.io/docs/2.3.0/limiting-resources-usage[Limiting resources usage]
38+
39+
* {editor-definition-samples-link}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 the 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 overrides the memory limit defined for the first container of the devfile.
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+
35+
.Additional resources
36+
37+
* link:https://devfile.io/docs/2.3.0/limiting-resources-usage[Limiting resources usage]
38+
39+
* {editor-definition-samples-link}

0 commit comments

Comments
 (0)