This feature is tech preview and subject to change in future releases.
If a resource is not managed by quota, a user has no restriction
on the amount of resource that can be consumed. For example,
if there is no quota on storage related to the gold storage class,
the amount of gold storage a project can create is unbounded.
For high-cost compute or storage resources, administrators may
want to require an explicit quota be granted in order to consume
a resource. For example, if a project was not explicitly given quota
for storage related to the gold storage class, users of that project
would not be able to create any storage of that type.
In order to require explicit quota to consume a particular resource,
the following stanza should be added to the master-config.yaml.
- resource: persistentvolumeclaims (1)
- gold.storageclass.storage.k8s.io/requests.storage (2)
||The group/resource to whose consumption is limited by default.
||The name of the resource tracked by quota associated with the group/resource to limit by default.
In the above example, the quota system will intercept every operation that
creates or updates a
PersistentVolumeClaim. It checks what resources understood
by quota would be consumed, and if there is no covering quota for those resources
in the project, the request is denied. In this example, if a user creates a
PersistentVolumeClaim that uses storage associated with the gold storage class,
and there is no matching quota in the project, the request is denied.