DRA: include v1beta1 API references

As suggested in
https://github.com/kubernetes/website/pull/48330#discussion_r1799302946, the
front matter gets extended to reference the API types. To make this work,
the necessary API reference files get created manually. They still need to be
updated via the usual automatic API generation.
This commit is contained in:
Patrick Ohly 2024-11-19 11:15:22 +01:00
parent 977df6e638
commit 26b5da0885
8 changed files with 3088 additions and 6 deletions

View File

@ -5,6 +5,15 @@ reviewers:
title: Dynamic Resource Allocation
content_type: concept
weight: 65
api_metadata:
- apiVersion: "resource.k8s.io/v1beta1"
kind: "ResourceClaim"
- apiVersion: "resource.k8s.io/v1beta1"
kind: "ResourceClaimTemplate"
- apiVersion: "resource.k8s.io/v1beta1"
kind: "DeviceClass"
- apiVersion: "resource.k8s.io/v1beta1"
kind: "ResourceSlice"
---
<!-- overview -->
@ -204,7 +213,8 @@ the `.spec.nodeName` field and to use a node selector instead.
{{< feature-state feature_gate_name="DRAAdminAccess" >}}
A ResourceClaim with admin access grants access to devices which are in use and
You can mark a request in a ResourceClaim or ResourceClaimTemplate as having privileged features.
A request with admin access grants access to devices which are in use and
may enable additional permissions when making the device available in a
container:
@ -227,9 +237,75 @@ automatically when creating such a ResourceClaim.
Admin access is a privileged mode which should not be made available to normal
users in a multi-tenant cluster. Cluster administrators can restrict usage of
this features by installing a validating admission policy similar to
[the in-tree example](https://github.com/kubernetes/kubernetes/blob/33ea278/test/e2e/dra/test-driver/deploy/example/admin-access-policy.yaml)
when enabling this feature.
this feature by installing a validating admission policy similar to the following
example. Cluster administrators need to adapt at least the names and replace
"dra.example.com".
```yaml
# Permission to use admin access is granted only in namespaces which have the
# "admin-access.dra.example.com" label. Other ways of making that decision are
# also possible.
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicy
metadata:
name: resourceclaim-policy.dra.example.com
spec:
failurePolicy: Fail
matchConstraints:
resourceRules:
- apiGroups: ["resource.k8s.io"]
apiVersions: ["v1alpha3", "v1beta1"]
operations: ["CREATE", "UPDATE"]
resources: ["resourceclaims"]
validations:
- expression: '! object.spec.devices.requests.exists(e, has(e.adminAccess) && e.adminAccess)'
reason: Forbidden
messageExpression: '"admin access to devices not enabled"'
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicyBinding
metadata:
name: resourceclaim-binding.dra.example.com
spec:
policyName: resourceclaim-policy.dra.example.com
validationActions: [Deny]
matchResources:
namespaceSelector:
matchExpressions:
- key: admin-access.dra.example.com
operator: DoesNotExist
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicy
metadata:
name: resourceclaimtemplate-policy.dra.example.com
spec:
failurePolicy: Fail
matchConstraints:
resourceRules:
- apiGroups: ["resource.k8s.io"]
apiVersions: ["v1alpha3", "v1beta1"]
operations: ["CREATE", "UPDATE"]
resources: ["resourceclaimtemplates"]
validations:
- expression: '! object.spec.spec.devices.requests.exists(e, has(e.adminAccess) && e.adminAccess)'
reason: Forbidden
messageExpression: '"admin access to devices not enabled"'
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicyBinding
metadata:
name: resourceclaimtemplate-binding.dra.example.com
spec:
policyName: resourceclaimtemplate-policy.dra.example.com
validationActions: [Deny]
matchResources:
namespaceSelector:
matchExpressions:
- key: admin-access.dra.example.com
operator: DoesNotExist
```
## ResourceClaim Device Status
@ -291,7 +367,7 @@ be installed. Please refer to the driver's documentation for details.
### Enabling admin access
Admin access is an *alpha feature* and only enabled when the
[Admin access](#admin-access) is an *alpha feature* and only enabled when the
`DRAAdminAccess` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
is enabled in the kube-apiserver and kube-scheduler.

View File

@ -15,4 +15,4 @@ in a ResourceClaim. A ResourceClaim
with admin access grants access to devices which are in use and may enable
additional access permissions when making the device available in a container.
Has no effect unless DynamicResourceAllocation is also enabled.
This feature gate has no effect unless you also enable the `DynamicResourceAllocation` feature gate.

View File

@ -13,6 +13,11 @@ stages:
- stage: beta
defaultValue: false
fromVersion: "1.32"
# TODO: as soon as this is locked to "true" (= GA), comments about other DRA
# feature gate(s) like "unless you also enable the `DynamicResourceAllocation` feature gate"
# can be removed (for example, in dra-admin-access.md).
---
Enables support for resources with custom parameters and a lifecycle
that is independent of a Pod. Allocation of resources is handled

View File

@ -19,6 +19,8 @@ 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.
TODO: this file should be under "workload-resources".
-->
`apiVersion: resource.k8s.io/v1alpha3`

View File

@ -0,0 +1,629 @@
---
api_metadata:
apiVersion: "resource.k8s.io/v1beta1"
import: "k8s.io/api/resource/v1beta1"
kind: "DeviceClass"
content_type: "api_reference"
description: "DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors."
title: "DeviceClass v1beta1"
weight: 2
auto_generated: true
---
<!--
The file was copied and updated manually from the v1alpha3 API.
-->
`apiVersion: resource.k8s.io/v1beta1`
`import "k8s.io/api/resource/v1beta1"`
## DeviceClass {#DeviceClass}
DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
<hr>
- **apiVersion**: resource.k8s.io/v1beta1
- **kind**: DeviceClass
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
Standard object metadata
- **spec** (<a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClassSpec" >}}">DeviceClassSpec</a>), required
Spec defines what can be allocated and how to configure it.
This is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.
Changing the spec automatically increments the metadata.generation number.
## DeviceClassSpec {#DeviceClassSpec}
DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.
<hr>
- **config** ([]DeviceClassConfiguration)
*Atomic: will be replaced during a merge*
Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
They are passed to the driver, but are not considered while allocating the claim.
<a name="DeviceClassConfiguration"></a>
*DeviceClassConfiguration is used in DeviceClass.*
- **config.opaque** (OpaqueDeviceConfiguration)
Opaque provides driver-specific configuration parameters.
<a name="OpaqueDeviceConfiguration"></a>
*OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.*
- **config.opaque.driver** (string), required
Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.
An admission policy provided by the driver developer could use this to decide whether it needs to validate them.
Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
- **config.opaque.parameters** (RawExtension), required
Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version ("kind" + "apiVersion" for Kubernetes types), with conversion between different versions.
<a name="RawExtension"></a>
*RawExtension is used to hold extensions in external versions.
To use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.
// Internal package:
type MyAPIObject struct {
runtime.TypeMeta `json:",inline"`
MyPlugin runtime.Object `json:"myPlugin"`
}
type PluginA struct {
AOption string `json:"aOption"`
}
// External package:
type MyAPIObject struct {
runtime.TypeMeta `json:",inline"`
MyPlugin runtime.RawExtension `json:"myPlugin"`
}
type PluginA struct {
AOption string `json:"aOption"`
}
// On the wire, the JSON will look something like this:
{
"kind":"MyAPIObject",
"apiVersion":"v1",
"myPlugin": {
"kind":"PluginA",
"aOption":"foo",
},
}
So what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)*
- **selectors** ([]DeviceSelector)
*Atomic: will be replaced during a merge*
Each selector must be satisfied by a device which is claimed via this class.
<a name="DeviceSelector"></a>
*DeviceSelector must have exactly one field set.*
- **selectors.cel** (CELDeviceSelector)
CEL contains a CEL expression for selecting a device.
<a name="CELDeviceSelector"></a>
*CELDeviceSelector contains a CEL expression for selecting a device.*
- **selectors.cel.expression** (string), required
Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.
The expression's input is an object named "device", which carries the following properties:
- driver (string): the name of the driver which defines this device.
- attributes (map[string]object): the device's attributes, grouped by prefix
(e.g. device.attributes["dra.example.com"] evaluates to an object with all
of the attributes which were prefixed by "dra.example.com".
- capacity (map[string]object): the device's capacities, grouped by prefix.
Example: Consider a device with driver="dra.example.com", which exposes two attributes named "model" and "ext.example.com/family" and which exposes one capacity named "modules". This input to this expression would have the following fields:
device.driver
device.attributes["dra.example.com"].model
device.attributes["ext.example.com"].family
device.capacity["dra.example.com"].modules
The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.
The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.
If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.
A robust expression should check for the existence of attributes before referencing them.
For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:
cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
- **suitableNodes** (NodeSelector)
Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.
Setting this field is optional. If unset, all Nodes are candidates.
This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
<a name="NodeSelector"></a>
*A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.*
- **suitableNodes.nodeSelectorTerms** ([]NodeSelectorTerm), required
*Atomic: will be replaced during a merge*
Required. A list of node selector terms. The terms are ORed.
<a name="NodeSelectorTerm"></a>
*A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.*
- **suitableNodes.nodeSelectorTerms.matchExpressions** ([]<a href="{{< ref "../common-definitions/node-selector-requirement#NodeSelectorRequirement" >}}">NodeSelectorRequirement</a>)
*Atomic: will be replaced during a merge*
A list of node selector requirements by node's labels.
- **suitableNodes.nodeSelectorTerms.matchFields** ([]<a href="{{< ref "../common-definitions/node-selector-requirement#NodeSelectorRequirement" >}}">NodeSelectorRequirement</a>)
*Atomic: will be replaced during a merge*
A list of node selector requirements by node's fields.
## DeviceClassList {#DeviceClassList}
DeviceClassList is a collection of classes.
<hr>
- **apiVersion**: resource.k8s.io/v1beta1
- **kind**: DeviceClassList
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)
Standard list metadata
- **items** ([]<a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>), required
Items is the list of resource classes.
## Operations {#Operations}
<hr>
### `get` read the specified DeviceClass
#### HTTP Request
GET /apis/resource.k8s.io/v1beta1/deviceclasses/{name}
#### Parameters
- **name** (*in path*): string, required
name of the DeviceClass
- **pretty** (*in query*): string
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
#### Response
200 (<a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): OK
401: Unauthorized
### `list` list or watch objects of kind DeviceClass
#### HTTP Request
GET /apis/resource.k8s.io/v1beta1/deviceclasses
#### 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>
- **sendInitialEvents** (*in query*): boolean
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</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 "../extend-resources/device-class-v1beta1#DeviceClassList" >}}">DeviceClassList</a>): OK
401: Unauthorized
### `create` create a DeviceClass
#### HTTP Request
POST /apis/resource.k8s.io/v1beta1/deviceclasses
#### Parameters
- **body**: <a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</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 "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): OK
201 (<a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): Created
202 (<a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): Accepted
401: Unauthorized
### `update` replace the specified DeviceClass
#### HTTP Request
PUT /apis/resource.k8s.io/v1beta1/deviceclasses/{name}
#### Parameters
- **name** (*in path*): string, required
name of the DeviceClass
- **body**: <a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</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 "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): OK
201 (<a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): Created
401: Unauthorized
### `patch` partially update the specified DeviceClass
#### HTTP Request
PATCH /apis/resource.k8s.io/v1beta1/deviceclasses/{name}
#### Parameters
- **name** (*in path*): string, required
name of the DeviceClass
- **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 "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): OK
201 (<a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): Created
401: Unauthorized
### `delete` delete a DeviceClass
#### HTTP Request
DELETE /apis/resource.k8s.io/v1beta1/deviceclasses/{name}
#### Parameters
- **name** (*in path*): string, required
name of the DeviceClass
- **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 "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): OK
202 (<a href="{{< ref "../extend-resources/device-class-v1beta1#DeviceClass" >}}">DeviceClass</a>): Accepted
401: Unauthorized
### `deletecollection` delete collection of DeviceClass
#### HTTP Request
DELETE /apis/resource.k8s.io/v1beta1/deviceclasses
#### Parameters
- **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>
- **sendInitialEvents** (*in query*): boolean
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</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

View File

@ -0,0 +1,597 @@
---
api_metadata:
apiVersion: "resource.k8s.io/v1beta1"
import: "k8s.io/api/resource/v1beta1"
kind: "ResourceClaimTemplate"
content_type: "api_reference"
description: "ResourceClaimTemplate is used to produce ResourceClaim objects."
title: "ResourceClaimTemplate v1beta1"
weight: 17
auto_generated: true
---
<!--
The file was copied and updated manually from the v1alpha3 API.
The content is not quite up-to-date, which needs to be fixed
by generating the file automatically.
-->
`apiVersion: resource.k8s.io/v1beta1`
`import "k8s.io/api/resource/v1beta1"`
## ResourceClaimTemplate {#ResourceClaimTemplate}
ResourceClaimTemplate is used to produce ResourceClaim objects.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
<hr>
- **apiVersion**: resource.k8s.io/v1beta1
- **kind**: ResourceClaimTemplate
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
Standard object metadata
- **spec** (<a href="{{< ref "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplateSpec" >}}">ResourceClaimTemplateSpec</a>), required
Describes the ResourceClaim that is to be generated.
This field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.
## ResourceClaimTemplateSpec {#ResourceClaimTemplateSpec}
ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
<hr>
- **spec** (<a href="{{< ref "../workload-resources/resource-claim-v1beta1#ResourceClaimSpec" >}}">ResourceClaimSpec</a>), required
Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.
## ResourceClaimTemplateList {#ResourceClaimTemplateList}
ResourceClaimTemplateList is a collection of claim templates.
<hr>
- **apiVersion**: resource.k8s.io/v1beta1
- **kind**: ResourceClaimTemplateList
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)
Standard list metadata
- **items** ([]<a href="{{< ref "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>), required
Items is the list of resource claim templates.
## Operations {#Operations}
<hr>
### `get` read the specified ResourceClaimTemplate
#### HTTP Request
GET /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}
#### Parameters
- **name** (*in path*): string, required
name of the ResourceClaimTemplate
- **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 "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): OK
401: Unauthorized
### `list` list or watch objects of kind ResourceClaimTemplate
#### HTTP Request
GET /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates
#### 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>
- **sendInitialEvents** (*in query*): boolean
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</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 "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplateList" >}}">ResourceClaimTemplateList</a>): OK
401: Unauthorized
### `list` list or watch objects of kind ResourceClaimTemplate
#### HTTP Request
GET /apis/resource.k8s.io/v1beta1/resourceclaimtemplates
#### 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>
- **sendInitialEvents** (*in query*): boolean
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</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 "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplateList" >}}">ResourceClaimTemplateList</a>): OK
401: Unauthorized
### `create` create a ResourceClaimTemplate
#### HTTP Request
POST /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates
#### Parameters
- **namespace** (*in path*): string, required
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
- **body**: <a href="{{< ref "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</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 "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): OK
201 (<a href="{{< ref "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): Created
202 (<a href="{{< ref "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): Accepted
401: Unauthorized
### `update` replace the specified ResourceClaimTemplate
#### HTTP Request
PUT /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}
#### Parameters
- **name** (*in path*): string, required
name of the ResourceClaimTemplate
- **namespace** (*in path*): string, required
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
- **body**: <a href="{{< ref "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</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 "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): OK
201 (<a href="{{< ref "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): Created
401: Unauthorized
### `patch` partially update the specified ResourceClaimTemplate
#### HTTP Request
PATCH /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}
#### Parameters
- **name** (*in path*): string, required
name of the ResourceClaimTemplate
- **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 "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): OK
201 (<a href="{{< ref "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): Created
401: Unauthorized
### `delete` delete a ResourceClaimTemplate
#### HTTP Request
DELETE /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}
#### Parameters
- **name** (*in path*): string, required
name of the ResourceClaimTemplate
- **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 "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): OK
202 (<a href="{{< ref "../workload-resources/resource-claim-template-v1beta1#ResourceClaimTemplate" >}}">ResourceClaimTemplate</a>): Accepted
401: Unauthorized
### `deletecollection` delete collection of ResourceClaimTemplate
#### HTTP Request
DELETE /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates
#### 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>
- **sendInitialEvents** (*in query*): boolean
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</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

View File

@ -0,0 +1,617 @@
---
api_metadata:
apiVersion: "resource.k8s.io/v1beta1"
import: "k8s.io/api/resource/v1beta1"
kind: "ResourceSlice"
content_type: "api_reference"
description: "ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver."
title: "ResourceSlice v1beta1"
weight: 18
auto_generated: true
---
<!--
The file was copied and updated manually from the v1alpha3 API.
-->
`apiVersion: resource.k8s.io/v1beta1`
`import "k8s.io/api/resource/v1beta1"`
## ResourceSlice {#ResourceSlice}
ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.
At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple \<driver name>, \<pool name>, \<device name>.
Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.
When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.
For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
<hr>
- **apiVersion**: resource.k8s.io/v1beta1
- **kind**: ResourceSlice
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
Standard object metadata
- **spec** (<a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSliceSpec" >}}">ResourceSliceSpec</a>), required
Contains the information published by the driver.
Changing the spec automatically increments the metadata.generation number.
## ResourceSliceSpec {#ResourceSliceSpec}
ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
<hr>
- **driver** (string), required
Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.
Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
- **pool** (ResourcePool), required
Pool describes the pool that this ResourceSlice belongs to.
<a name="ResourcePool"></a>
*ResourcePool describes the pool that ResourceSlices belong to.*
- **pool.generation** (int64), required
Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.
Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.
- **pool.name** (string), required
Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.
It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.
- **pool.resourceSliceCount** (int64), required
ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.
Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.
- **allNodes** (boolean)
AllNodes indicates that all nodes have access to the resources in the pool.
Exactly one of NodeName, NodeSelector and AllNodes must be set.
- **devices** ([]Device)
*Atomic: will be replaced during a merge*
Devices lists some or all of the devices in this pool.
Must not have more than 128 entries.
<a name="Device"></a>
*Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.*
- **devices.name** (string), required
Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.
- **devices.basic** (BasicDevice)
Basic defines one device instance.
<a name="BasicDevice"></a>
*BasicDevice defines one device instance.*
- **devices.basic.attributes** (map[string]DeviceAttribute)
Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.
The maximum number of attributes and capacities combined is 32.
<a name="DeviceAttribute"></a>
*DeviceAttribute must have exactly one field set.*
- **devices.basic.attributes.bool** (boolean)
BoolValue is a true/false value.
- **devices.basic.attributes.int** (int64)
IntValue is a number.
- **devices.basic.attributes.string** (string)
StringValue is a string. Must not be longer than 64 characters.
- **devices.basic.attributes.version** (string)
VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.
- **devices.basic.capacity** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.
The maximum number of attributes and capacities combined is 32.
- **nodeName** (string)
NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.
This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.
Exactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.
- **nodeSelector** (NodeSelector)
NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.
Must use exactly one term.
Exactly one of NodeName, NodeSelector and AllNodes must be set.
<a name="NodeSelector"></a>
*A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.*
- **nodeSelector.nodeSelectorTerms** ([]NodeSelectorTerm), required
*Atomic: will be replaced during a merge*
Required. A list of node selector terms. The terms are ORed.
<a name="NodeSelectorTerm"></a>
*A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.*
- **nodeSelector.nodeSelectorTerms.matchExpressions** ([]<a href="{{< ref "../common-definitions/node-selector-requirement#NodeSelectorRequirement" >}}">NodeSelectorRequirement</a>)
*Atomic: will be replaced during a merge*
A list of node selector requirements by node's labels.
- **nodeSelector.nodeSelectorTerms.matchFields** ([]<a href="{{< ref "../common-definitions/node-selector-requirement#NodeSelectorRequirement" >}}">NodeSelectorRequirement</a>)
*Atomic: will be replaced during a merge*
A list of node selector requirements by node's fields.
## ResourceSliceList {#ResourceSliceList}
ResourceSliceList is a collection of ResourceSlices.
<hr>
- **apiVersion**: resource.k8s.io/v1beta1
- **kind**: ResourceSliceList
- **items** ([]<a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>), required
Items is the list of resource ResourceSlices.
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)
Standard list metadata
## Operations {#Operations}
<hr>
### `get` read the specified ResourceSlice
#### HTTP Request
GET /apis/resource.k8s.io/v1beta1/resourceslices/{name}
#### Parameters
- **name** (*in path*): string, required
name of the ResourceSlice
- **pretty** (*in query*): string
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
#### Response
200 (<a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): OK
401: Unauthorized
### `list` list or watch objects of kind ResourceSlice
#### HTTP Request
GET /apis/resource.k8s.io/v1beta1/resourceslices
#### 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>
- **sendInitialEvents** (*in query*): boolean
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</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 "../workload-resources/resource-slice-v1beta1#ResourceSliceList" >}}">ResourceSliceList</a>): OK
401: Unauthorized
### `create` create a ResourceSlice
#### HTTP Request
POST /apis/resource.k8s.io/v1beta1/resourceslices
#### Parameters
- **body**: <a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</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 "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): OK
201 (<a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): Created
202 (<a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): Accepted
401: Unauthorized
### `update` replace the specified ResourceSlice
#### HTTP Request
PUT /apis/resource.k8s.io/v1beta1/resourceslices/{name}
#### Parameters
- **name** (*in path*): string, required
name of the ResourceSlice
- **body**: <a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</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 "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): OK
201 (<a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): Created
401: Unauthorized
### `patch` partially update the specified ResourceSlice
#### HTTP Request
PATCH /apis/resource.k8s.io/v1beta1/resourceslices/{name}
#### Parameters
- **name** (*in path*): string, required
name of the ResourceSlice
- **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 "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): OK
201 (<a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): Created
401: Unauthorized
### `delete` delete a ResourceSlice
#### HTTP Request
DELETE /apis/resource.k8s.io/v1beta1/resourceslices/{name}
#### Parameters
- **name** (*in path*): string, required
name of the ResourceSlice
- **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 "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): OK
202 (<a href="{{< ref "../workload-resources/resource-slice-v1beta1#ResourceSlice" >}}">ResourceSlice</a>): Accepted
401: Unauthorized
### `deletecollection` delete collection of ResourceSlice
#### HTTP Request
DELETE /apis/resource.k8s.io/v1beta1/resourceslices
#### Parameters
- **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>
- **sendInitialEvents** (*in query*): boolean
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</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