Skip to content

Commit

Permalink
add count jobs in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zelihacagip committed Dec 13, 2024
1 parent deeecc2 commit 38e5a8b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ ex: a namespace cannot claim more that a 1/3 of the cluster
is claimable compared to the actual resources.
ex: In a development environment you could choose to allow reserving more resources than what is actually usable in reality.


In order to facilitate the adaption of _ResourceQuotaClaims_ it is possible to enforce a default claim for namespaces.
The feature will be activated on namespace that contains the label __quota=managed__.

Expand All @@ -83,7 +84,7 @@ kubectl apply -f https://raw.githubusercontent.com/ca-gip/kotary/master/artifact

| Name | Description | Mandatory | Type | Default |
| :-------------- | :--------------------------------------------------------: | :---------: | :-------------: |:---------------------- |
| **defaultClaimSpec** | *Default claim that will be added to a watched Namespace* | `no` | `ResourceList` | cpu:2 <br /> memory: 6Gi |
| **defaultClaimSpec** | *Default claim that will be added to a watched Namespace* | `no` | `ResourceList` | cpu:2 <br /> memory: 6Gi <br /> count/jobs.batch: 5 |
| **ratioMaxAllocationMemory** | *Maximum amount of Memory claimable by a Namespace* | `no` | `Float` | 1 |
| **ratioMaxAllocationCPU** | *Maximum amount of CPU claimable by a Namespace* | `no` | `Float` | 1 |
| **ratioOverCommitMemory** | *Memory over-commitment* | `no` | `Float` | 1 |
Expand All @@ -92,7 +93,7 @@ kubectl apply -f https://raw.githubusercontent.com/ca-gip/kotary/master/artifact
##### Example

In the following sample configuration we set :
* A default claim of 2 CPU and 10Gi of Memory
* A default claim of 2 CPU , 10Gi of Memory and 5 jobs
* 33% of total amount of resource can be claim by a namespace
* An over-commit of 130%

Expand All @@ -104,6 +105,7 @@ data:
defaultClaimSpec: |
cpu: "2"
memory: "10Gi"
count/jobs.batch: 5
ratioMaxAllocationMemory: "0.33"
ratioMaxAllocationCPU: "0.33"
ratioOverCommitMemory: "1.3"
Expand Down Expand Up @@ -131,7 +133,7 @@ kubectl apply -f https://raw.githubusercontent.com/ca-gip/kotary/master/artifact

### Update a ResourceQuota

To update a _ResourceQuotas_ you will have to create a _ResourceQuotaClaims_ with specification for CPU and Memory.
To update a _ResourceQuotas_ you will have to create a _ResourceQuotaClaims_ with specification for CPU ,Memory and job count.
You can use the same units as the one available in Kubernetes,
please refer to the [official documentation](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)

Expand Down Expand Up @@ -168,8 +170,8 @@ demo 5 20Gi REJECTED Exceeded Memory allocation limit claiming 20Gi bu

```bash
$ kubectl get quotaclaim
NAME CPU RAM STATUS DETAILS
demo 5 16Gi PENDING Awaiting lower CPU consumption claiming 16Gi but current total of CPU request is 18Gi
NAME CPU RAM MAX JOB COUNT STATUS DETAILS
demo 5 16Gi 5 PENDING Awaiting lower CPU consumption claiming 16Gi but current total of CPU request is 18Gi
```

### Default claim
Expand Down

0 comments on commit 38e5a8b

Please sign in to comment.