607 lines
14 KiB
Markdown
607 lines
14 KiB
Markdown
---
|
|
api_metadata:
|
|
apiVersion: "v1"
|
|
import: "k8s.io/api/core/v1"
|
|
kind: "LimitRange"
|
|
content_type: "api_reference"
|
|
description: "LimitRange sets resource usage limits for each kind of resource in a Namespace."
|
|
title: "LimitRange"
|
|
weight: 1
|
|
auto_generated: true
|
|
---
|
|
|
|
<!--
|
|
The file is auto-generated from the Go source code of the component using a generic
|
|
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
|
|
to generate the reference documentation, please read
|
|
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
|
|
To update the reference content, please follow the
|
|
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
|
|
guide. You can file document formatting bugs against the
|
|
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
|
|
-->
|
|
|
|
`apiVersion: v1`
|
|
|
|
`import "k8s.io/api/core/v1"`
|
|
|
|
|
|
## LimitRange {#LimitRange}
|
|
|
|
LimitRange sets resource usage limits for each kind of resource in a Namespace.
|
|
|
|
<hr>
|
|
|
|
- **apiVersion**: v1
|
|
|
|
|
|
- **kind**: LimitRange
|
|
|
|
|
|
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
|
|
|
|
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
|
|
- **spec** (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRangeSpec" >}}">LimitRangeSpec</a>)
|
|
|
|
Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
|
|
|
|
|
|
|
|
|
|
|
## LimitRangeSpec {#LimitRangeSpec}
|
|
|
|
LimitRangeSpec defines a min/max usage limit for resources that match on kind.
|
|
|
|
<hr>
|
|
|
|
- **limits** ([]LimitRangeItem), required
|
|
|
|
Limits is the list of LimitRangeItem objects that are enforced.
|
|
|
|
<a name="LimitRangeItem"></a>
|
|
*LimitRangeItem defines a min/max usage limit for any resource that matches on kind.*
|
|
|
|
- **limits.type** (string), required
|
|
|
|
Type of resource that this limit applies to.
|
|
|
|
- **limits.default** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
|
|
|
|
Default resource requirement limit value by resource name if resource limit is omitted.
|
|
|
|
- **limits.defaultRequest** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
|
|
|
|
DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
|
|
|
|
- **limits.max** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
|
|
|
|
Max usage constraints on this kind by resource name.
|
|
|
|
- **limits.maxLimitRequestRatio** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
|
|
|
|
MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
|
|
|
|
- **limits.min** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
|
|
|
|
Min usage constraints on this kind by resource name.
|
|
|
|
|
|
|
|
|
|
|
|
## LimitRangeList {#LimitRangeList}
|
|
|
|
LimitRangeList is a list of LimitRange items.
|
|
|
|
<hr>
|
|
|
|
- **apiVersion**: v1
|
|
|
|
|
|
- **kind**: LimitRangeList
|
|
|
|
|
|
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)
|
|
|
|
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
|
|
- **items** ([]<a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>), required
|
|
|
|
Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
|
|
|
|
|
|
|
|
|
|
|
## Operations {#Operations}
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### `get` read the specified LimitRange
|
|
|
|
#### HTTP Request
|
|
|
|
GET /api/v1/namespaces/{namespace}/limitranges/{name}
|
|
|
|
#### Parameters
|
|
|
|
|
|
- **name** (*in path*): string, required
|
|
|
|
name of the LimitRange
|
|
|
|
|
|
- **namespace** (*in path*): string, required
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
|
|
|
|
|
|
- **pretty** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
200 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>): OK
|
|
|
|
401: Unauthorized
|
|
|
|
|
|
### `list` list or watch objects of kind LimitRange
|
|
|
|
#### HTTP Request
|
|
|
|
GET /api/v1/namespaces/{namespace}/limitranges
|
|
|
|
#### Parameters
|
|
|
|
|
|
- **namespace** (*in path*): string, required
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
|
|
|
|
|
|
- **allowWatchBookmarks** (*in query*): boolean
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks</a>
|
|
|
|
|
|
- **continue** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a>
|
|
|
|
|
|
- **fieldSelector** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a>
|
|
|
|
|
|
- **labelSelector** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a>
|
|
|
|
|
|
- **limit** (*in query*): integer
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a>
|
|
|
|
|
|
- **pretty** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
|
|
|
|
|
- **resourceVersion** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion</a>
|
|
|
|
|
|
- **resourceVersionMatch** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
|
|
|
|
|
|
- **timeoutSeconds** (*in query*): integer
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
|
|
|
|
|
|
- **watch** (*in query*): boolean
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch</a>
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
200 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRangeList" >}}">LimitRangeList</a>): OK
|
|
|
|
401: Unauthorized
|
|
|
|
|
|
### `list` list or watch objects of kind LimitRange
|
|
|
|
#### HTTP Request
|
|
|
|
GET /api/v1/limitranges
|
|
|
|
#### Parameters
|
|
|
|
|
|
- **allowWatchBookmarks** (*in query*): boolean
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks</a>
|
|
|
|
|
|
- **continue** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a>
|
|
|
|
|
|
- **fieldSelector** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a>
|
|
|
|
|
|
- **labelSelector** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a>
|
|
|
|
|
|
- **limit** (*in query*): integer
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a>
|
|
|
|
|
|
- **pretty** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
|
|
|
|
|
- **resourceVersion** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion</a>
|
|
|
|
|
|
- **resourceVersionMatch** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
|
|
|
|
|
|
- **timeoutSeconds** (*in query*): integer
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
|
|
|
|
|
|
- **watch** (*in query*): boolean
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch</a>
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
200 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRangeList" >}}">LimitRangeList</a>): OK
|
|
|
|
401: Unauthorized
|
|
|
|
|
|
### `create` create a LimitRange
|
|
|
|
#### HTTP Request
|
|
|
|
POST /api/v1/namespaces/{namespace}/limitranges
|
|
|
|
#### Parameters
|
|
|
|
|
|
- **namespace** (*in path*): string, required
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
|
|
|
|
|
|
- **body**: <a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>, required
|
|
|
|
|
|
|
|
|
|
- **dryRun** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
|
|
|
|
|
- **fieldManager** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a>
|
|
|
|
|
|
- **fieldValidation** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a>
|
|
|
|
|
|
- **pretty** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
200 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>): OK
|
|
|
|
201 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>): Created
|
|
|
|
202 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>): Accepted
|
|
|
|
401: Unauthorized
|
|
|
|
|
|
### `update` replace the specified LimitRange
|
|
|
|
#### HTTP Request
|
|
|
|
PUT /api/v1/namespaces/{namespace}/limitranges/{name}
|
|
|
|
#### Parameters
|
|
|
|
|
|
- **name** (*in path*): string, required
|
|
|
|
name of the LimitRange
|
|
|
|
|
|
- **namespace** (*in path*): string, required
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
|
|
|
|
|
|
- **body**: <a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>, required
|
|
|
|
|
|
|
|
|
|
- **dryRun** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
|
|
|
|
|
- **fieldManager** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a>
|
|
|
|
|
|
- **fieldValidation** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a>
|
|
|
|
|
|
- **pretty** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
200 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>): OK
|
|
|
|
201 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>): Created
|
|
|
|
401: Unauthorized
|
|
|
|
|
|
### `patch` partially update the specified LimitRange
|
|
|
|
#### HTTP Request
|
|
|
|
PATCH /api/v1/namespaces/{namespace}/limitranges/{name}
|
|
|
|
#### Parameters
|
|
|
|
|
|
- **name** (*in path*): string, required
|
|
|
|
name of the LimitRange
|
|
|
|
|
|
- **namespace** (*in path*): string, required
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
|
|
|
|
|
|
- **body**: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a>, required
|
|
|
|
|
|
|
|
|
|
- **dryRun** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
|
|
|
|
|
- **fieldManager** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a>
|
|
|
|
|
|
- **fieldValidation** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a>
|
|
|
|
|
|
- **force** (*in query*): boolean
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#force" >}}">force</a>
|
|
|
|
|
|
- **pretty** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
200 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>): OK
|
|
|
|
201 (<a href="{{< ref "../policy-resources/limit-range-v1#LimitRange" >}}">LimitRange</a>): Created
|
|
|
|
401: Unauthorized
|
|
|
|
|
|
### `delete` delete a LimitRange
|
|
|
|
#### HTTP Request
|
|
|
|
DELETE /api/v1/namespaces/{namespace}/limitranges/{name}
|
|
|
|
#### Parameters
|
|
|
|
|
|
- **name** (*in path*): string, required
|
|
|
|
name of the LimitRange
|
|
|
|
|
|
- **namespace** (*in path*): string, required
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
|
|
|
|
|
|
- **body**: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a>
|
|
|
|
|
|
|
|
|
|
- **dryRun** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
|
|
|
|
|
- **gracePeriodSeconds** (*in query*): integer
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds</a>
|
|
|
|
|
|
- **pretty** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
|
|
|
|
|
- **propagationPolicy** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy</a>
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): OK
|
|
|
|
202 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): Accepted
|
|
|
|
401: Unauthorized
|
|
|
|
|
|
### `deletecollection` delete collection of LimitRange
|
|
|
|
#### HTTP Request
|
|
|
|
DELETE /api/v1/namespaces/{namespace}/limitranges
|
|
|
|
#### Parameters
|
|
|
|
|
|
- **namespace** (*in path*): string, required
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
|
|
|
|
|
|
- **body**: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a>
|
|
|
|
|
|
|
|
|
|
- **continue** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a>
|
|
|
|
|
|
- **dryRun** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
|
|
|
|
|
- **fieldSelector** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a>
|
|
|
|
|
|
- **gracePeriodSeconds** (*in query*): integer
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds</a>
|
|
|
|
|
|
- **labelSelector** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a>
|
|
|
|
|
|
- **limit** (*in query*): integer
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a>
|
|
|
|
|
|
- **pretty** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
|
|
|
|
|
- **propagationPolicy** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy</a>
|
|
|
|
|
|
- **resourceVersion** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion</a>
|
|
|
|
|
|
- **resourceVersionMatch** (*in query*): string
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
|
|
|
|
|
|
- **timeoutSeconds** (*in query*): integer
|
|
|
|
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): OK
|
|
|
|
401: Unauthorized
|
|
|