• Kubernetes Submit Queue's avatar
    Merge pull request #54320 from derekwaynecarr/quota-update · 27ef37a3
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 54331, 54655, 54320, 54639, 54288). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Ability to do object count quota for all namespaced resources
    
    **What this PR does / why we need it**:
    - Defines syntax for generic object count quota `count/<resource>.<group>`
    - Migrates existing objects to support new syntax with old syntax
    - Adds support to quota all standard namespace resources 
    - Updates the controller to do discovery and replenishment on those resources
    - Updates unit tests
    - Tweaks admission configuration around quota
    - Add e2e test for replicasets (demonstrate dynamic generic counting)
    
    ```
    $  kubectl create quota test --hard=count/deployments.extensions=2,count/replicasets.extensions=4,count/pods=3,count/secrets=4
    resourcequota "test" created
    $ kubectl run nginx --image=nginx --replicas=2
    $ kubectl describe quota
    Name:                         test
    Namespace:                    default
    Resource                      Used  Hard
    --------                      ----  ----
    count/deployments.extensions  1     2
    count/pods                    2     3
    count/replicasets.extensions  1     4
    count/secrets                 1     4
    ```
    
    **Special notes for your reviewer**:
    - simple object count quotas no longer require writing code
    - deferring support for custom resources pending investigation about how to share caches with garbage collector.  in addition, i would like to see how this integrates with downstream quota usage in openshift.
    
    **Release note**:
    ```release-note
    Object count quotas supported on all standard resources using `count/<resource>.<group>` syntax
    ```
    27ef37a3
Name
Last commit
Last update
..
app Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
apiserver.go Loading commit data...