volcano.sh/volcano@v1.9.0/docs/design/resourcequota-plugin.md (about)

     1  # ResourceQuota Plugin
     2  
     3  ## Motivation
     4  
     5  As [issue 1014](https://github.com/volcano-sh/volcano/issues/1014) mentioned, When Kubernetes ResourceQuota is insufficient, podgroup should not be able to enqueue.
     6  
     7  ## Design
     8  
     9  In order to solve this problem, we provide `minQuotas` field which defines the minimal resource quota of tasks to run the pod group, and introduce resourcequota plugin to determine whether the podgroup be able to enqueue according to Kubernetes ResourceQuota.
    10  
    11  1. add `RQStatus` map in namespace collection to cache all resourcequotas of namespace;
    12  
    13  ``` golang
    14  RQStatus map[string]v1.ResourceQuotaStatus
    15  ```
    16  
    17  2. calc minQuotas in job controller, and backfill to podGroup;
    18  
    19  3. add resouceQuota plugin, and register `AddJobEnqueueableFn` function. This plugin will look at pending podgroups and will enqueue them only if there is enough capacity in the namespace according to Kubernetes ResourceQuota. And the plugin also consider podgroups that have already been permitted in the scheduling round to prevent it from enqueueing too many podgroups and exceeding the namespace resource quota.