mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Merge pull request #124075 from pohly/dra-api-comments
DRA: API cleanup + fix
This commit is contained in:
commit
6289589509
7
api/openapi-spec/swagger.json
generated
7
api/openapi-spec/swagger.json
generated
@ -9349,7 +9349,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"resourceClaimName": {
|
"resourceClaimName": {
|
||||||
"description": "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. It this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.",
|
"description": "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. If this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -15026,7 +15026,7 @@
|
|||||||
"description": "NamedResourcesFilter is used in ResourceFilterModel.",
|
"description": "NamedResourcesFilter is used in ResourceFilterModel.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"selector": {
|
"selector": {
|
||||||
"description": "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()",
|
"description": "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type in NamedResourcesAttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -15792,6 +15792,9 @@
|
|||||||
"description": "If StructuredData is set, then it needs to be used instead of Data."
|
"description": "If StructuredData is set, then it needs to be used instead of Data."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"required": [
|
||||||
|
"driverName"
|
||||||
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"io.k8s.api.resource.v1alpha2.ResourceRequest": {
|
"io.k8s.api.resource.v1alpha2.ResourceRequest": {
|
||||||
|
@ -5221,7 +5221,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"resourceClaimName": {
|
"resourceClaimName": {
|
||||||
"description": "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. It this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.",
|
"description": "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. If this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -244,7 +244,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"selector": {
|
"selector": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()",
|
"description": "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type in NamedResourcesAttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1205,6 +1205,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"driverName": {
|
"driverName": {
|
||||||
|
"default": "",
|
||||||
"description": "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.",
|
"description": "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -1217,6 +1218,9 @@
|
|||||||
"description": "If StructuredData is set, then it needs to be used instead of Data."
|
"description": "If StructuredData is set, then it needs to be used instead of Data."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"required": [
|
||||||
|
"driverName"
|
||||||
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"io.k8s.api.resource.v1alpha2.ResourceRequest": {
|
"io.k8s.api.resource.v1alpha2.ResourceRequest": {
|
||||||
|
@ -3479,7 +3479,7 @@ type PodResourceClaimStatus struct {
|
|||||||
Name string
|
Name string
|
||||||
|
|
||||||
// ResourceClaimName is the name of the ResourceClaim that was
|
// ResourceClaimName is the name of the ResourceClaim that was
|
||||||
// generated for the Pod in the namespace of the Pod. It this is
|
// generated for the Pod in the namespace of the Pod. If this is
|
||||||
// unset, then generating a ResourceClaim was not necessary. The
|
// unset, then generating a ResourceClaim was not necessary. The
|
||||||
// pod.spec.resourceClaims entry can be ignored in this case.
|
// pod.spec.resourceClaims entry can be ignored in this case.
|
||||||
ResourceClaimName *string
|
ResourceClaimName *string
|
||||||
|
@ -92,8 +92,16 @@ type NamedResourcesRequest struct {
|
|||||||
|
|
||||||
// NamedResourcesFilter is used in ResourceFilterModel.
|
// NamedResourcesFilter is used in ResourceFilterModel.
|
||||||
type NamedResourcesFilter struct {
|
type NamedResourcesFilter struct {
|
||||||
// Selector is a selector like the one in Request. It must be true for
|
// Selector is a CEL expression which must evaluate to true if a
|
||||||
// a resource instance to be suitable for a claim using the class.
|
// resource instance is suitable. The language is as defined in
|
||||||
|
// https://kubernetes.io/docs/reference/using-api/cel/
|
||||||
|
//
|
||||||
|
// In addition, for each type in NamedResourcesAttributeValue there is a map that
|
||||||
|
// resolves to the corresponding value of the instance under evaluation.
|
||||||
|
// For example:
|
||||||
|
//
|
||||||
|
// attributes.quantity["a"].isGreaterThan(quantity("0")) &&
|
||||||
|
// attributes.stringslice["b"].isSorted()
|
||||||
Selector string
|
Selector string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
pkg/generated/openapi/zz_generated.openapi.go
generated
6
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -26996,7 +26996,7 @@ func schema_k8sio_api_core_v1_PodResourceClaimStatus(ref common.ReferenceCallbac
|
|||||||
},
|
},
|
||||||
"resourceClaimName": {
|
"resourceClaimName": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. It this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.",
|
Description: "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. If this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
@ -45215,7 +45215,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesFilter(ref common.Referenc
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"selector": {
|
"selector": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()",
|
Description: "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type in NamedResourcesAttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -46488,6 +46488,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref common.ReferenceCallb
|
|||||||
"driverName": {
|
"driverName": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.",
|
Description: "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.",
|
||||||
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
@ -46506,6 +46507,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref common.ReferenceCallb
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Required: []string{"driverName"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Dependencies: []string{
|
Dependencies: []string{
|
||||||
|
@ -3813,7 +3813,7 @@ message PodResourceClaimStatus {
|
|||||||
optional string name = 1;
|
optional string name = 1;
|
||||||
|
|
||||||
// ResourceClaimName is the name of the ResourceClaim that was
|
// ResourceClaimName is the name of the ResourceClaim that was
|
||||||
// generated for the Pod in the namespace of the Pod. It this is
|
// generated for the Pod in the namespace of the Pod. If this is
|
||||||
// unset, then generating a ResourceClaim was not necessary. The
|
// unset, then generating a ResourceClaim was not necessary. The
|
||||||
// pod.spec.resourceClaims entry can be ignored in this case.
|
// pod.spec.resourceClaims entry can be ignored in this case.
|
||||||
//
|
//
|
||||||
|
@ -3931,7 +3931,7 @@ type PodResourceClaimStatus struct {
|
|||||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// ResourceClaimName is the name of the ResourceClaim that was
|
// ResourceClaimName is the name of the ResourceClaim that was
|
||||||
// generated for the Pod in the namespace of the Pod. It this is
|
// generated for the Pod in the namespace of the Pod. If this is
|
||||||
// unset, then generating a ResourceClaim was not necessary. The
|
// unset, then generating a ResourceClaim was not necessary. The
|
||||||
// pod.spec.resourceClaims entry can be ignored in this case.
|
// pod.spec.resourceClaims entry can be ignored in this case.
|
||||||
//
|
//
|
||||||
|
@ -1708,7 +1708,7 @@ func (PodResourceClaim) SwaggerDoc() map[string]string {
|
|||||||
var map_PodResourceClaimStatus = map[string]string{
|
var map_PodResourceClaimStatus = map[string]string{
|
||||||
"": "PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim.",
|
"": "PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim.",
|
||||||
"name": "Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL.",
|
"name": "Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL.",
|
||||||
"resourceClaimName": "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. It this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.",
|
"resourceClaimName": "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. If this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (PodResourceClaimStatus) SwaggerDoc() map[string]string {
|
func (PodResourceClaimStatus) SwaggerDoc() map[string]string {
|
||||||
|
@ -145,7 +145,7 @@ message NamedResourcesFilter {
|
|||||||
// resource instance is suitable. The language is as defined in
|
// resource instance is suitable. The language is as defined in
|
||||||
// https://kubernetes.io/docs/reference/using-api/cel/
|
// https://kubernetes.io/docs/reference/using-api/cel/
|
||||||
//
|
//
|
||||||
// In addition, for each type NamedResourcesin AttributeValue there is a map that
|
// In addition, for each type in NamedResourcesAttributeValue there is a map that
|
||||||
// resolves to the corresponding value of the instance under evaluation.
|
// resolves to the corresponding value of the instance under evaluation.
|
||||||
// For example:
|
// For example:
|
||||||
//
|
//
|
||||||
|
@ -111,7 +111,7 @@ type NamedResourcesFilter struct {
|
|||||||
// resource instance is suitable. The language is as defined in
|
// resource instance is suitable. The language is as defined in
|
||||||
// https://kubernetes.io/docs/reference/using-api/cel/
|
// https://kubernetes.io/docs/reference/using-api/cel/
|
||||||
//
|
//
|
||||||
// In addition, for each type NamedResourcesin AttributeValue there is a map that
|
// In addition, for each type in NamedResourcesAttributeValue there is a map that
|
||||||
// resolves to the corresponding value of the instance under evaluation.
|
// resolves to the corresponding value of the instance under evaluation.
|
||||||
// For example:
|
// For example:
|
||||||
//
|
//
|
||||||
|
@ -26,6 +26,8 @@ import (
|
|||||||
const (
|
const (
|
||||||
// Finalizer is the finalizer that gets set for claims
|
// Finalizer is the finalizer that gets set for claims
|
||||||
// which were allocated through a builtin controller.
|
// which were allocated through a builtin controller.
|
||||||
|
// Reserved for use by Kubernetes, DRA driver controllers must
|
||||||
|
// use their own finalizer.
|
||||||
Finalizer = "dra.k8s.io/delete-protection"
|
Finalizer = "dra.k8s.io/delete-protection"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -186,7 +188,7 @@ type ResourceHandle struct {
|
|||||||
// plugin should be invoked to process this ResourceHandle's data once it
|
// plugin should be invoked to process this ResourceHandle's data once it
|
||||||
// lands on a node. This may differ from the DriverName set in
|
// lands on a node. This may differ from the DriverName set in
|
||||||
// ResourceClaimStatus this ResourceHandle is embedded in.
|
// ResourceClaimStatus this ResourceHandle is embedded in.
|
||||||
DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"`
|
DriverName string `json:"driverName" protobuf:"bytes,1,name=driverName"`
|
||||||
|
|
||||||
// Data contains the opaque data associated with this ResourceHandle. It is
|
// Data contains the opaque data associated with this ResourceHandle. It is
|
||||||
// set by the controller component of the resource driver whose name
|
// set by the controller component of the resource driver whose name
|
||||||
|
@ -12413,6 +12413,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: driverName
|
- name: driverName
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
|
default: ""
|
||||||
- name: structuredData
|
- name: structuredData
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.resource.v1alpha2.StructuredResourceHandle
|
namedType: io.k8s.api.resource.v1alpha2.StructuredResourceHandle
|
||||||
|
Loading…
Reference in New Issue
Block a user