Search

Chapter 3. ClusterResourceQuota [quota.openshift.io/v1]

download PDF
Description
ClusterResourceQuota mirrors ResourceQuota at a cluster scope. This object is easily convertible to synthetic ResourceQuota object to allow quota evaluation re-use. Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
Type
object
Required
  • metadata
  • spec

3.1. Specification

PropertyTypeDescription

apiVersion

string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata

ObjectMeta

Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

object

Spec defines the desired quota

status

object

Status defines the actual enforced quota and its current usage

3.1.1. .spec

Description
Spec defines the desired quota
Type
object
Required
  • quota
  • selector
PropertyTypeDescription

quota

object

Quota defines the desired quota

selector

object

Selector is the selector used to match projects. It should only select active projects on the scale of dozens (though it can select many more less active projects). These projects will contend on object creation through this resource.

3.1.2. .spec.quota

Description
Quota defines the desired quota
Type
object
PropertyTypeDescription

hard

integer-or-string

hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/

scopeSelector

object

scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.

scopes

array (string)

A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.

3.1.3. .spec.quota.scopeSelector

Description
scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
Type
object
PropertyTypeDescription

matchExpressions

array

A list of scope selector requirements by scope of the resources.

matchExpressions[]

object

A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.

3.1.4. .spec.quota.scopeSelector.matchExpressions

Description
A list of scope selector requirements by scope of the resources.
Type
array

3.1.5. .spec.quota.scopeSelector.matchExpressions[]

Description
A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.
Type
object
Required
  • operator
  • scopeName
PropertyTypeDescription

operator

string

Represents a scope’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.

scopeName

string

The name of the scope that the selector applies to.

values

array (string)

An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

3.1.6. .spec.selector

Description
Selector is the selector used to match projects. It should only select active projects on the scale of dozens (though it can select many more less active projects). These projects will contend on object creation through this resource.
Type
object
PropertyTypeDescription

annotations

undefined (string)

AnnotationSelector is used to select projects by annotation.

labels

``

LabelSelector is used to select projects by label.

3.1.7. .status

Description
Status defines the actual enforced quota and its current usage
Type
object
Required
  • total
PropertyTypeDescription

namespaces

``

Namespaces slices the usage by project. This division allows for quick resolution of deletion reconciliation inside of a single project without requiring a recalculation across all projects. This can be used to pull the deltas for a given project.

total

object

Total defines the actual enforced quota and its current usage across all projects

3.1.8. .status.total

Description
Total defines the actual enforced quota and its current usage across all projects
Type
object
PropertyTypeDescription

hard

integer-or-string

Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/

used

integer-or-string

Used is the current observed total usage of the resource in the namespace.

3.2. API endpoints

The following API endpoints are available:

  • /apis/quota.openshift.io/v1/clusterresourcequotas

    • DELETE: delete collection of ClusterResourceQuota
    • GET: list objects of kind ClusterResourceQuota
    • POST: create a ClusterResourceQuota
  • /apis/quota.openshift.io/v1/watch/clusterresourcequotas

    • GET: watch individual changes to a list of ClusterResourceQuota. deprecated: use the 'watch' parameter with a list operation instead.
  • /apis/quota.openshift.io/v1/clusterresourcequotas/{name}

    • DELETE: delete a ClusterResourceQuota
    • GET: read the specified ClusterResourceQuota
    • PATCH: partially update the specified ClusterResourceQuota
    • PUT: replace the specified ClusterResourceQuota
  • /apis/quota.openshift.io/v1/watch/clusterresourcequotas/{name}

    • GET: watch changes to an object of kind ClusterResourceQuota. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
  • /apis/quota.openshift.io/v1/clusterresourcequotas/{name}/status

    • GET: read status of the specified ClusterResourceQuota
    • PATCH: partially update status of the specified ClusterResourceQuota
    • PUT: replace status of the specified ClusterResourceQuota

3.2.1. /apis/quota.openshift.io/v1/clusterresourcequotas

HTTP method
DELETE
Description
delete collection of ClusterResourceQuota
Table 3.1. HTTP responses
HTTP codeReponse body

200 - OK

Status schema

401 - Unauthorized

Empty

HTTP method
GET
Description
list objects of kind ClusterResourceQuota
Table 3.2. HTTP responses
HTTP codeReponse body

200 - OK

ClusterResourceQuotaList schema

401 - Unauthorized

Empty

HTTP method
POST
Description
create a ClusterResourceQuota
Table 3.3. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.4. Body parameters
ParameterTypeDescription

body

ClusterResourceQuota schema

 
Table 3.5. HTTP responses
HTTP codeReponse body

200 - OK

ClusterResourceQuota schema

201 - Created

ClusterResourceQuota schema

202 - Accepted

ClusterResourceQuota schema

401 - Unauthorized

Empty

3.2.2. /apis/quota.openshift.io/v1/watch/clusterresourcequotas

HTTP method
GET
Description
watch individual changes to a list of ClusterResourceQuota. deprecated: use the 'watch' parameter with a list operation instead.
Table 3.6. HTTP responses
HTTP codeReponse body

200 - OK

WatchEvent schema

401 - Unauthorized

Empty

3.2.3. /apis/quota.openshift.io/v1/clusterresourcequotas/{name}

Table 3.7. Global path parameters
ParameterTypeDescription

name

string

name of the ClusterResourceQuota

HTTP method
DELETE
Description
delete a ClusterResourceQuota
Table 3.8. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

Table 3.9. HTTP responses
HTTP codeReponse body

200 - OK

Status schema

202 - Accepted

Status schema

401 - Unauthorized

Empty

HTTP method
GET
Description
read the specified ClusterResourceQuota
Table 3.10. HTTP responses
HTTP codeReponse body

200 - OK

ClusterResourceQuota schema

401 - Unauthorized

Empty

HTTP method
PATCH
Description
partially update the specified ClusterResourceQuota
Table 3.11. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.12. HTTP responses
HTTP codeReponse body

200 - OK

ClusterResourceQuota schema

401 - Unauthorized

Empty

HTTP method
PUT
Description
replace the specified ClusterResourceQuota
Table 3.13. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.14. Body parameters
ParameterTypeDescription

body

ClusterResourceQuota schema

 
Table 3.15. HTTP responses
HTTP codeReponse body

200 - OK

ClusterResourceQuota schema

201 - Created

ClusterResourceQuota schema

401 - Unauthorized

Empty

3.2.4. /apis/quota.openshift.io/v1/watch/clusterresourcequotas/{name}

Table 3.16. Global path parameters
ParameterTypeDescription

name

string

name of the ClusterResourceQuota

HTTP method
GET
Description
watch changes to an object of kind ClusterResourceQuota. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
Table 3.17. HTTP responses
HTTP codeReponse body

200 - OK

WatchEvent schema

401 - Unauthorized

Empty

3.2.5. /apis/quota.openshift.io/v1/clusterresourcequotas/{name}/status

Table 3.18. Global path parameters
ParameterTypeDescription

name

string

name of the ClusterResourceQuota

HTTP method
GET
Description
read status of the specified ClusterResourceQuota
Table 3.19. HTTP responses
HTTP codeReponse body

200 - OK

ClusterResourceQuota schema

401 - Unauthorized

Empty

HTTP method
PATCH
Description
partially update status of the specified ClusterResourceQuota
Table 3.20. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.21. HTTP responses
HTTP codeReponse body

200 - OK

ClusterResourceQuota schema

401 - Unauthorized

Empty

HTTP method
PUT
Description
replace status of the specified ClusterResourceQuota
Table 3.22. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.23. Body parameters
ParameterTypeDescription

body

ClusterResourceQuota schema

 
Table 3.24. HTTP responses
HTTP codeReponse body

200 - OK

ClusterResourceQuota schema

201 - Created

ClusterResourceQuota schema

401 - Unauthorized

Empty

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.