Skip to content

Commit 87dd5c2

Browse files
committed
added docs about configuring quotas
1 parent 27f9cea commit 87dd5c2

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed

configure/configuring-quotas.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Users can then submit their workloads to the local queue.
1919

2020
include::modules/configuring-clusterqueues.adoc[leveloffset=+1]
2121

22+
include::modules/configuring-quota-limits.adoc[leveloffset=+1]
23+
2224
[role="_next-steps"]
2325
[id="clusterqueues-next-steps_{context}"]
2426
.Next steps

modules/configuring-quota-limits.adoc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * configure/configuring-quotas.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="configuring-quota-limits_{context}"]
7+
= Configuring quota limits
8+
9+
When you create a cluster queue that is part of a cohort, you can configure quota limits to define the maximum amount of resources that the cluster queue can borrow, as well as the maximum amount of unused resources that other cluster queues can borrow from this cluster queue.
10+
11+
You can configure these limits by specifying values for the `borrowingLimit` and `lendingLimit`, respectively.
12+
13+
.Prerequisites
14+
15+
include::snippets/prereqs-snippet-yaml.adoc[]
16+
17+
.Procedure
18+
19+
. Create a `ClusterQueue` object as a YAML file:
20+
+
21+
.Example of a basic `ClusterQueue` object using quota limits
22+
[source,yaml]
23+
----
24+
apiVersion: kueue.x-k8s.io/v1beta1
25+
kind: ClusterQueue
26+
metadata:
27+
name: "example-q"
28+
spec:
29+
namespaceSelector: {}
30+
cohort: "example-cohort"
31+
resourceGroups:
32+
- coveredResources: ["cpu", "memory"]
33+
flavors:
34+
- name: "default-flavor"
35+
resources:
36+
- name: "cpu"
37+
nominalQuota: 9
38+
borrowingLimit: 1 # <1>
39+
lendingLimit: 3 # <2>
40+
# ...
41+
----
42+
<1> In this example, the borrowing limit is set to `1`, and there is a nominal quota of `9`, so assuming that there is 1 CPU of borrowable resources available in the cohort, the `example-q` cluster queue could admit workloads with resources totaling 10 CPUs.
43+
+
44+
If the borrowing limit is empty or omitted for a cluster queue, the cluster queue can borrow up to the sum of nominal quotas from all the cluster queues in the cohort.
45+
<2> In this example, the lending limit is set to `3`, which means that if all admitted workloads in the cluster queue have a total quota usage below the `nominalQuota` value of `9` CPUs, then cluster queue `example-q` can admit workloads with resources totaling 12 CPUs.
46+
47+
. Apply the `ClusterQueue` object by running the following command:
48+
+
49+
[source,terminal]
50+
----
51+
$ oc apply -f <filename>.yaml
52+
----

modules/configuring-resourceflavors.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
[id="configuring-resourceflavors_{context}"]
77
= Configuring a resource flavor
88

9-
After you have configured a `ClusterQueue` object, you can configure a `ResourceFlavor` object.
9+
Resource flavors, represented as `ResourceFlavor` objects, define how a flavor maps to a group of nodes. Flavors represent different variations of a resource, for example, different GPU models.
1010

11-
You can use a custom `ResourceFlavor` object to represent different resource types that are associated with cluster nodes through labels, taints, and tolerations. You can then associate workloads with specific node types to enable fine-grained resource management.
11+
After you have configured a `ClusterQueue` object, you can configure a `ResourceFlavor` object. You can define quotas in a cluster queue for multiple different flavors that provide certain compute resources.
1212

1313
Resources in a cluster are typically not homogeneous. If the resources in your cluster are homogeneous, you can use an empty `ResourceFlavor` instead of adding labels to custom resource flavors.
1414

0 commit comments

Comments
 (0)