apiVersion: v1
kind: ResourceQuota
metadata:
  name: resource-quota-test
  namespace: quota-test
spec:
  hard:
    # Compute Resource Quota 
    requests.cpu: "500m"
    requests.memory: "500Mi"
    limits.cpu: "1000m"
    limits.memory: "1Gi"

    # Storage Resource Quota
    # pvc request sum, cannot exceed this value
    requests.storage: "10Gi"

    # <storage-class-name>.storageclass.storage.k8s.io/requests.storage
    # local-storage.storageclass.storage.k8s.io/requests.storage: "10Gi"

    # <storage-class-name>.storageclass.storage.k8s.io/persistentvolumeclaims 
    # local-storage.storageclass.storage.k8s.io/persistentvolumeclaims: 1

    # pvc nums
    # count/persistentvolumeclaims: 2

    # Across all pods in the namespace, the sum of local ephemeral storage requests cannot exceed this value.
    requests.ephemeral-storage: "1Mi"

    # Across all pods in the namespace, the sum of local ephemeral storage limits cannot exceed this value.
    limits.ephemeral-storage: "10Gi"

    # Object Count Quota
    count/pods: 2
    count/persistentvolumeclaims: 2
    count/services: 2
    count/secrets: 2
    count/configmaps: 2
    count/replicationcontrollers: 2
    count/deployments.apps: 1
    count/replicasets.apps: 2
    count/statfulsets.apps: 1
    count/jobs.batch: 1
    count/cronjobs.batch: 1
    count/deployments.extensions: 1 
