Update Resource Limits of a Project
This guide describes how to change the resource limits of a single Project in a APPUiO Zone.
Change Resource Quota of a Namespace
By default in a namespace there are three different ResourceQuotas
.
organization-compute
-
Limits for pods and their resource usage.
organization-compute-terminating
-
Limits for terminating resources, such as jobs.
organization-objects
-
Limits the number of objects, such as
configmaps
orservices
.
You can update the defaults of any of these ResourceQuotas
by setting an annotation on the Namespace
.
The annotation need to have the following structure
resourcequota.appuio.io/<resourceQuotaName>.<resource>
The resourceQuotaName
is the name of one of the three ResourceQuotas
and resource
is the specific field of the quota you want to update.
For resources containing a forward slash, you will need to substitute it for an underline.
For example: |
Based on how Kyverno implements policies which generate resources, it may take a few minutes for overrides to be applied in the actual |
Examples
restless-wave
to 100
kubectl --as=cluster-admin annotate namespace restless-wave \
resourcequota.appuio.io/organization-compute.pods=100
7
kubectl --as=cluster-admin annotate namespace restless-wave \
resourcequota.appuio.io/organization-compute-terminating.requests.cpu=7
configmaps
to 300
kubectl --as=cluster-admin annotate namespace restless-wave \
resourcequota.appuio.io/organization-objects.count_configmaps=300
50Gi
kubectl --as=cluster-admin annotate namespace restless-wave \
resourcequota.appuio.io/organization-objects.storageclasses='{"cephfs-fspool-cluster.storageclass.storage.k8s.io/requests.storage": "50Gi"}'
Please make sure to extend the existing annotation value (for example with |