|
| 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 | +---- |
0 commit comments