ResourceClaimTemplate v1beta2
apiVersion: resource.k8s.io/v1beta2
import "k8s.io/api/resource/v1beta2"
ResourceClaimTemplate
ResourceClaimTemplate 用于生成 ResourceClaim 对象。
这是一个 Alpha 类型的特性,需要启用 DynamicResourceAllocation 特性门控。
- 
apiVersion: resource.k8s.io/v1beta2 
- 
kind: ResourceClaimTemplate 
- 
metadata (ObjectMeta) 标准的对象元数据。 
- 
spec (ResourceClaimTemplateSpec),必需 描述要生成的 ResourceClaim。 该字段是不可变的。当需要时,控制平面将为 Pod 创建一个 ResourceClaim,然后不再对其进行更新。 
ResourceClaimTemplateSpec
ResourceClaimTemplateSpec 包含针对 ResourceClaim 的元数据和字段。
- 
spec (ResourceClaimSpec),必需 ResourceClaim 的规约。整个内容将不加修改地复制到从模板创建的 ResourceClaim 中。 与 ResourceClaim 中相同的字段在此处也是有效的。 
- 
metadata (ObjectMeta) ObjectMeta 可以包含创建 PVC 时将要复制到其中的标签和注解。 不允许设置其他字段,并且即便设置了也会在验证期间被拒绝。 
ResourceClaimTemplateList
ResourceClaimTemplateList 是申领模板的集合。
- 
apiVersion: resource.k8s.io/v1beta2 
- 
kind: ResourceClaimTemplateList 
- 
metadata (ListMeta) 标准的列表元数据。 
- 
items ([]ResourceClaimTemplate),必需 items 是资源申领模板的列表。 
操作
get 读取指定的 ResourceClaimTemplate
HTTP 请求
GET /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}
参数
- 
name (路径参数): string,必需 ResourceClaimTemplate 的名称。 
- 
namespace (路径参数): string,必需 
- 
pretty (查询参数): string 
响应
200 (ResourceClaimTemplate): OK
401: Unauthorized
list 列举或监视 ResourceClaimTemplate 类别的对象
HTTP 请求
GET /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates
参数
- 
namespace (路径参数): string,必需 
- 
allowWatchBookmarks (查询参数): boolean 
- 
continue (查询参数): string 
- 
fieldSelector (查询参数): string 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
- 
watch (查询参数): boolean 
响应
200 (ResourceClaimTemplateList): OK
401: Unauthorized
list 列举或监视 ResourceClaimTemplate 类别的对象
HTTP 请求
GET /apis/resource.k8s.io/v1beta2/resourceclaimtemplates
参数
- 
allowWatchBookmarks (查询参数): boolean 
- 
continue (查询参数): string 
- 
fieldSelector (查询参数): string 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
- 
watch (查询参数): boolean 
响应
200 (ResourceClaimTemplateList): OK
401: Unauthorized
create 创建 ResourceClaimTemplate
HTTP 请求
POST /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates
参数
- 
namespace (路径参数): string,必需 
- 
body: ResourceClaimTemplate,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (ResourceClaimTemplate): OK
201 (ResourceClaimTemplate): Created
202 (ResourceClaimTemplate): Accepted
401: Unauthorized
update 替换指定的 ResourceClaimTemplate
HTTP 请求
PUT /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}
参数
- 
name (路径参数): string,必需 ResourceClaimTemplate 的名称。 
- 
namespace (路径参数): string,必需 
- 
body: ResourceClaimTemplate,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (ResourceClaimTemplate): OK
201 (ResourceClaimTemplate): Created
401: Unauthorized
patch 部分更新指定的 ResourceClaimTemplate
HTTP 请求
PATCH /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}
参数
- 
name (路径参数): string,必需 ResourceClaimTemplate 的名称。 
- 
namespace (路径参数): string,必需 
- 
body: Patch,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
force (查询参数): boolean 
- 
pretty (查询参数): string 
响应
200 (ResourceClaimTemplate): OK
201 (ResourceClaimTemplate): Created
401: Unauthorized
delete 删除 ResourceClaimTemplate
HTTP 请求
DELETE /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}
参数
- 
name (路径参数): string,必需 ResourceClaimTemplate 的名称。 
- 
namespace (路径参数): string,必需 
- 
body: DeleteOptions 
- 
dryRun (查询参数): string 
- 
gracePeriodSeconds (查询参数): integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
pretty (查询参数): string 
- 
propagationPolicy (查询参数): string 
响应
200 (ResourceClaimTemplate): OK
202 (ResourceClaimTemplate): Accepted
401: Unauthorized
deletecollection 删除 ResourceClaimTemplate 的集合
HTTP 请求
DELETE /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates
参数
- 
namespace (路径参数): string,必需 
- 
body: DeleteOptions 
- 
continue (查询参数): string 
- 
dryRun (查询参数): string 
- 
fieldSelector (查询参数): string 
- 
gracePeriodSeconds (查询参数): integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
propagationPolicy (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
响应
200 (Status): OK
401: Unauthorized