• k8s-merge-robot's avatar
    Merge pull request #28636 from derekwaynecarr/quota_pvc_storage · 6ae6450a
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    Add support to quota pvc storage requests
    
    Adds support to quota cumulative `PersistentVolumeClaim` storage requests in a namespace.
    
    Per our chat today @markturansky @abhgupta - this is not done (lacks unit testing), but is functional.
    
    This lets quota enforcement for `PersistentVolumeClaim` to occur at creation time.  Supporting bind time enforcement would require substantial more work.  It's possible this is sufficient for many, so I am opening it up for feedback.
    
    In the future, I suspect we may want to treat local disk in a special manner, but that would have to be a different resource altogether (i.e. `requests.disk`) or something.
    
    Example quota:
    
    ```
    apiVersion: v1
    kind: ResourceQuota
    metadata:
      name: quota
    spec:
      hard:
        persistentvolumeclaims: "10"
        requests.storage: "40Gi"
    ```
    
    /cc @kubernetes/rh-cluster-infra @deads2k 
    6ae6450a
types.go 130 KB