anchor.diff:  --------                      ----    ----
   cpu                           5       20
   memory                        500Mi   1Gi
  -openshift.io/imagesize        0       5Gi   <1>
  -openshift.io/imagestreamsize  0       15Gi  <1>
  -openshift.io/projectsize      8542Mi  40Gi
   pods                          5       10
   replicationcontrollers        5       5
   resourcequotas                1       1
   services                      3       5
   ----
  -<1> Usage will always be zero because the resource is not scoped to a namespace.
   
   [[configuring_quota_sync_period]]
   
  
positive.code: 
  == Overview
  
  A *ResourceQuota* object enumerates hard resource usage limits per project. It
  limits the total number of a particular type of object that may be created in
  a project, and the total amount of
  link:compute_resources.html[compute resources]
  that may be consumed by resources in that project.
  
  == Usage Limits
  
  The following describes the set of limits that may be enforced by a
  *ResourceQuota*.
  
  .Usage limits
  [cols="3a,8a",options="header"]
  |===
  
  |Resource Name |Description
  
  |`cpu`
  |Total requested cpu usage across all containers
  
  |`memory`
  |Total requested memory usage across all containers
  
  |`openshift.io/imagesize` [[imagesize]]<<zero,*>>
  |Maximum size of a single image stored in an internal registry
  
  |`openshift.io/imagestreamsize` [[imagestreamsize]]<<zero,*>>
  |Maximum size of image stream's images stored in an internal registry
  
  |`openshift.io/projectimagessize`
  |Maximum size of all the project's images stored in an internal registry
  
  |`pods`
  |Total number of pods
  
  |`replicationcontrollers`
  |Total number of replication controllers
  
  |`resourcequotas`
  |Total number of resource quotas
  
  |`services`
  |Total number of services
  
  |`secrets`
  |Total number of secrets
  
  |`persistentvolumeclaims`
  |Total number of persistent volume claims
  |===
  
  [[zero]]<<imagesize,*>> The resource is not scoped to a project. Thus it will
  always have usage equal to zero.
  
  == Quota Enforcement
  
  
negative.code: 
  === Compute Resources: Requests vs Limits
  
  When allocating compute resources, each container may specify a request and a limit value
  for either CPU or memory.  The quota can be configured to quota either value.  If the quota
  has a value specified for `requests.cpu` or `requests.memory`, then it will require that 
  every incoming container makes an explicit request for those resources.  If the quota has a 
  value specified for `limits.cpu` or `limits.memory`, then it will require that every incoming
  container specifies an explicit limit for those resources.
  
  == Sample Resource Quota Files
  
  object-counts.yaml
  ====
  ----
  apiVersion: v1
  kind: ResourceQuota
  metadata:
    name: object-counts
  spec:
    hard:
      configmaps: "10" <1>
      persistentvolumeclaims: "4" <2>
      replicationcontrollers: "20" <3>
      secrets: "10" <4>
      services: "10" <5>
  ----
  <1> The total number of config maps that can exist in the project
  <2> The total number of persistent volume claims that can exist in the project
  <3> The total number of replication controllers that can exist in the project
  <4> The total number of secrets that can exist in the project
  <5> The total number of services that can exist in the project
  ====
  
  compute-resources.yaml
  ====
  ----
  apiVersion: v1
  kind: ResourceQuota
  metadata:
    name: compute-resources
  spec:
    hard:
      pods: "4" <1>
      requests.cpu: "1" <2>
      requests.memory: 1Gi <3>
      limits.cpu: "2" <4>
      limits.memory: 2Gi <5>
  ----
  <1> The total number of pods in a non-terminal state that can exist in the project
  <2> Across all pods in a non-terminal state, the sum of cpu requests cannot exceed 1 core
  <3> Across all pods in a non-terminal state, the sum of memory requests cannot exceed 1Gi
  <4> Across all pods in a non-terminal state, the sum of cpu limits cannot exceed 2 cores
  <5> Across all pods in a non-terminal state, the sum of memory limits cannot exceed 2Gi
  ====
  
  besteffort.yaml
  ====
  ----
  apiVersion: v1
  kind: ResourceQuota
  metadata:
    name: besteffort
  spec:
    hard:
      pods: "1" <1>
    scopes:
    - BestEffort <2>
  ----
  <1> The total number of pods in a non-terminal state with `BestEffort` quality of service that can exist in the project
  <2> Restricts the quota to only matching pods that have `BestEffort` quality of service for either memory or cpu.
  ====
  
  == Create a Quota
  