diff --git a/api/discovery/aggregated_v2beta1.json b/api/discovery/aggregated_v2beta1.json index 84a3efc6ca2..dcada7821e6 100644 --- a/api/discovery/aggregated_v2beta1.json +++ b/api/discovery/aggregated_v2beta1.json @@ -1891,6 +1891,26 @@ { "freshness": "Current", "resources": [ + { + "resource": "noderesourceslices", + "responseKind": { + "group": "", + "kind": "NodeResourceSlice", + "version": "" + }, + "scope": "Cluster", + "singularResource": "noderesourceslice", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, { "resource": "podschedulingcontexts", "responseKind": { @@ -1926,6 +1946,26 @@ "watch" ] }, + { + "resource": "resourceclaimparameters", + "responseKind": { + "group": "", + "kind": "ResourceClaimParameters", + "version": "" + }, + "scope": "Namespaced", + "singularResource": "resourceclaimparameters", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, { "resource": "resourceclaims", "responseKind": { @@ -2000,6 +2040,26 @@ "update", "watch" ] + }, + { + "resource": "resourceclassparameters", + "responseKind": { + "group": "", + "kind": "ResourceClassParameters", + "version": "" + }, + "scope": "Namespaced", + "singularResource": "resourceclassparameters", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] } ], "version": "v1alpha2" diff --git a/api/discovery/apis__resource.k8s.io__v1alpha2.json b/api/discovery/apis__resource.k8s.io__v1alpha2.json index c5981a2a1c9..4538e4d685a 100644 --- a/api/discovery/apis__resource.k8s.io__v1alpha2.json +++ b/api/discovery/apis__resource.k8s.io__v1alpha2.json @@ -3,6 +3,23 @@ "groupVersion": "resource.k8s.io/v1alpha2", "kind": "APIResourceList", "resources": [ + { + "kind": "NodeResourceSlice", + "name": "noderesourceslices", + "namespaced": false, + "singularName": "noderesourceslice", + "storageVersionHash": "KmjmPdo2jrQ=", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, { "kind": "PodSchedulingContext", "name": "podschedulingcontexts", @@ -31,6 +48,23 @@ "update" ] }, + { + "kind": "ResourceClaimParameters", + "name": "resourceclaimparameters", + "namespaced": true, + "singularName": "resourceclaimparameters", + "storageVersionHash": "DWM408h+ZHE=", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, { "kind": "ResourceClaim", "name": "resourceclaims", @@ -92,6 +126,23 @@ "update", "watch" ] + }, + { + "kind": "ResourceClassParameters", + "name": "resourceclassparameters", + "namespaced": true, + "singularName": "resourceclassparameters", + "storageVersionHash": "MDq5XoTnXWQ=", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] } ] } diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 6cb537d6157..acf7b480b1f 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -14820,6 +14820,110 @@ }, "type": "object" }, + "io.k8s.api.resource.v1alpha2.DriverAllocationResult": { + "description": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", + "properties": { + "vendorRequestParameters": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.DriverRequests": { + "description": "DriverRequests describes all resources that are needed from one particular driver.", + "properties": { + "driverName": { + "description": "DriverName is the name used by the DRA driver kubelet plugin.", + "type": "string" + }, + "requests": { + "description": "Requests describes all resources that are needed from the driver.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceRequest" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "vendorParameters": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.NodeResourceSlice": { + "description": "NodeResourceSlice provides information about available resources on individual nodes.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "driverName": { + "description": "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only NodeResourceSlice objects with a certain driver name.", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object metadata" + }, + "nodeName": { + "description": "NodeName identifies the node where the capacity is available. A field selector can be used to list only NodeResourceSlice objects with a certain node name.", + "type": "string" + } + }, + "required": [ + "nodeName", + "driverName" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + ] + }, + "io.k8s.api.resource.v1alpha2.NodeResourceSliceList": { + "description": "NodeResourceSliceList is a collection of NodeResourceSlices.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of node resource capacity objects.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard list metadata" + } + }, + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "NodeResourceSliceList", + "version": "v1alpha2" + } + ] + }, "io.k8s.api.resource.v1alpha2.PodSchedulingContext": { "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { @@ -15024,6 +15128,82 @@ } ] }, + "io.k8s.api.resource.v1alpha2.ResourceClaimParameters": { + "description": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "driverRequests": { + "description": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.DriverRequests" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "generatedFrom": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference", + "description": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the claim parameters when the parameter reference of the claim refers to some unknown type." + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object metadata" + }, + "shareable": { + "description": "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", + "type": "boolean" + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + ] + }, + "io.k8s.api.resource.v1alpha2.ResourceClaimParametersList": { + "description": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of node resource capacity objects.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard list metadata" + } + }, + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "ResourceClaimParametersList", + "version": "v1alpha2" + } + ] + }, "io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference": { "description": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", "properties": { @@ -15223,6 +15403,10 @@ "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersReference", "description": "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec." }, + "structuredParameters": { + "description": "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", + "type": "boolean" + }, "suitableNodes": { "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector", "description": "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 ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates." @@ -15275,6 +15459,86 @@ } ] }, + "io.k8s.api.resource.v1alpha2.ResourceClassParameters": { + "description": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "filters": { + "description": "Filters describes additional contraints that must be met when using the class.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceFilter" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "generatedFrom": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersReference", + "description": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the class parameters when the parameter reference of the class refers to some unknown type." + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object metadata" + }, + "vendorParameters": { + "description": "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.VendorParameters" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + ] + }, + "io.k8s.api.resource.v1alpha2.ResourceClassParametersList": { + "description": "ResourceClassParametersList is a collection of ResourceClassParameters.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of node resource capacity objects.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard list metadata" + } + }, + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "ResourceClassParametersList", + "version": "v1alpha2" + } + ] + }, "io.k8s.api.resource.v1alpha2.ResourceClassParametersReference": { "description": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", "properties": { @@ -15301,6 +15565,16 @@ ], "type": "object" }, + "io.k8s.api.resource.v1alpha2.ResourceFilter": { + "description": "ResourceFilter is a filter for resources from one particular driver.", + "properties": { + "driverName": { + "description": "DriverName is the name used by the DRA driver kubelet plugin.", + "type": "string" + } + }, + "type": "object" + }, "io.k8s.api.resource.v1alpha2.ResourceHandle": { "description": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", "properties": { @@ -15311,6 +15585,64 @@ "driverName": { "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" + }, + "structuredData": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.StructuredResourceHandle", + "description": "If StructuredData is set, then it needs to be used instead of Data." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.ResourceRequest": { + "description": "ResourceRequest is a request for resources from one particular driver.", + "properties": { + "vendorParameters": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.StructuredResourceHandle": { + "description": "StructuredResourceHandle is the in-tree representation of the allocation result.", + "properties": { + "nodeName": { + "description": "NodeName is the name of the node providing the necessary resources.", + "type": "string" + }, + "results": { + "description": "Results lists all allocated driver resources.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.DriverAllocationResult" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "vendorClaimParameters": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated." + }, + "vendorClassParameters": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated." + } + }, + "required": [ + "nodeName", + "results" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.VendorParameters": { + "description": "VendorParameters are opaque parameters for one particular driver.", + "properties": { + "driverName": { + "description": "DriverName is the name used by the DRA driver kubelet plugin.", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim." } }, "type": "object" @@ -70306,6 +70638,491 @@ } } }, + "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete collection of ResourceClaimParameters", + "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaimParameters", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClaimParameters", + "operationId": "listResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create ResourceClaimParameters", + "operationId": "createResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + } + }, + "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete ResourceClaimParameters", + "operationId": "deleteResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified ResourceClaimParameters", + "operationId": "readResourceV1alpha2NamespacedResourceClaimParameters", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "name of the ResourceClaimParameters", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml" + ], + "description": "partially update the specified ResourceClaimParameters", + "operationId": "patchResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified ResourceClaimParameters", + "operationId": "replaceResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + } + }, "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims": { "delete": { "consumes": [ @@ -71466,6 +72283,970 @@ } } }, + "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete collection of ResourceClassParameters", + "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClassParameters", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClassParameters", + "operationId": "listResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create ResourceClassParameters", + "operationId": "createResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + } + }, + "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete ResourceClassParameters", + "operationId": "deleteResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified ResourceClassParameters", + "operationId": "readResourceV1alpha2NamespacedResourceClassParameters", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "name of the ResourceClassParameters", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml" + ], + "description": "partially update the specified ResourceClassParameters", + "operationId": "patchResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified ResourceClassParameters", + "operationId": "replaceResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + } + }, + "/apis/resource.k8s.io/v1alpha2/noderesourceslices": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete collection of NodeResourceSlice", + "operationId": "deleteResourceV1alpha2CollectionNodeResourceSlice", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind NodeResourceSlice", + "operationId": "listResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSliceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a NodeResourceSlice", + "operationId": "createResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + } + }, + "/apis/resource.k8s.io/v1alpha2/noderesourceslices/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete a NodeResourceSlice", + "operationId": "deleteResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified NodeResourceSlice", + "operationId": "readResourceV1alpha2NodeResourceSlice", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "name of the NodeResourceSlice", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml" + ], + "description": "partially update the specified NodeResourceSlice", + "operationId": "patchResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified NodeResourceSlice", + "operationId": "replaceResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + } + }, "/apis/resource.k8s.io/v1alpha2/podschedulingcontexts": { "get": { "consumes": [ @@ -71540,6 +73321,80 @@ } ] }, + "/apis/resource.k8s.io/v1alpha2/resourceclaimparameters": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClaimParameters", + "operationId": "listResourceV1alpha2ResourceClaimParametersForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, "/apis/resource.k8s.io/v1alpha2/resourceclaims": { "get": { "consumes": [ @@ -72167,6 +74022,80 @@ } } }, + "/apis/resource.k8s.io/v1alpha2/resourceclassparameters": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClassParameters", + "operationId": "listResourceV1alpha2ResourceClassParametersForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts": { "get": { "consumes": [ @@ -72329,6 +74258,168 @@ } ] }, + "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimparameters": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2NamespacedResourceClaimParametersList", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimparameters/{name}": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch changes to an object of kind ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha2NamespacedResourceClaimParameters", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the ResourceClaimParameters", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaims": { "get": { "consumes": [ @@ -72653,6 +74744,324 @@ } ] }, + "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclassparameters": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2NamespacedResourceClassParametersList", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclassparameters/{name}": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch changes to an object of kind ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha2NamespacedResourceClassParameters", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the ResourceClassParameters", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1alpha2/watch/noderesourceslices": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of NodeResourceSlice. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2NodeResourceSliceList", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1alpha2/watch/noderesourceslices/{name}": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch changes to an object of kind NodeResourceSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha2NodeResourceSlice", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the NodeResourceSlice", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, "/apis/resource.k8s.io/v1alpha2/watch/podschedulingcontexts": { "get": { "consumes": [ @@ -72727,6 +75136,80 @@ } ] }, + "/apis/resource.k8s.io/v1alpha2/watch/resourceclaimparameters": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2ResourceClaimParametersListForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, "/apis/resource.k8s.io/v1alpha2/watch/resourceclaims": { "get": { "consumes": [ @@ -73031,6 +75514,80 @@ } ] }, + "/apis/resource.k8s.io/v1alpha2/watch/resourceclassparameters": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2ResourceClassParametersListForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, "/apis/scheduling.k8s.io/": { "get": { "consumes": [ diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json index 42cf776b86f..63fd58bc24a 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json @@ -117,6 +117,140 @@ }, "type": "object" }, + "io.k8s.api.resource.v1alpha2.DriverAllocationResult": { + "description": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", + "properties": { + "vendorRequestParameters": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" + } + ], + "description": "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.DriverRequests": { + "description": "DriverRequests describes all resources that are needed from one particular driver.", + "properties": { + "driverName": { + "description": "DriverName is the name used by the DRA driver kubelet plugin.", + "type": "string" + }, + "requests": { + "description": "Requests describes all resources that are needed from the driver.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceRequest" + } + ], + "default": {} + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "vendorParameters": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" + } + ], + "description": "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.NodeResourceSlice": { + "description": "NodeResourceSlice provides information about available resources on individual nodes.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "driverName": { + "default": "", + "description": "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only NodeResourceSlice objects with a certain driver name.", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } + ], + "default": {}, + "description": "Standard object metadata" + }, + "nodeName": { + "default": "", + "description": "NodeName identifies the node where the capacity is available. A field selector can be used to list only NodeResourceSlice objects with a certain node name.", + "type": "string" + } + }, + "required": [ + "nodeName", + "driverName" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + ] + }, + "io.k8s.api.resource.v1alpha2.NodeResourceSliceList": { + "description": "NodeResourceSliceList is a collection of NodeResourceSlices.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of node resource capacity objects.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + ], + "default": {} + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + ], + "default": {}, + "description": "Standard list metadata" + } + }, + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "NodeResourceSliceList", + "version": "v1alpha2" + } + ] + }, "io.k8s.api.resource.v1alpha2.PodSchedulingContext": { "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { @@ -380,6 +514,106 @@ } ] }, + "io.k8s.api.resource.v1alpha2.ResourceClaimParameters": { + "description": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "driverRequests": { + "description": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.DriverRequests" + } + ], + "default": {} + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "generatedFrom": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference" + } + ], + "description": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the claim parameters when the parameter reference of the claim refers to some unknown type." + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } + ], + "default": {}, + "description": "Standard object metadata" + }, + "shareable": { + "description": "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", + "type": "boolean" + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + ] + }, + "io.k8s.api.resource.v1alpha2.ResourceClaimParametersList": { + "description": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of node resource capacity objects.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + ], + "default": {} + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + ], + "default": {}, + "description": "Standard list metadata" + } + }, + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "ResourceClaimParametersList", + "version": "v1alpha2" + } + ] + }, "io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference": { "description": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", "properties": { @@ -636,6 +870,10 @@ ], "description": "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec." }, + "structuredParameters": { + "description": "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", + "type": "boolean" + }, "suitableNodes": { "allOf": [ { @@ -702,6 +940,115 @@ } ] }, + "io.k8s.api.resource.v1alpha2.ResourceClassParameters": { + "description": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "filters": { + "description": "Filters describes additional contraints that must be met when using the class.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceFilter" + } + ], + "default": {} + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "generatedFrom": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersReference" + } + ], + "description": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the class parameters when the parameter reference of the class refers to some unknown type." + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } + ], + "default": {}, + "description": "Standard object metadata" + }, + "vendorParameters": { + "description": "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.VendorParameters" + } + ], + "default": {} + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + ] + }, + "io.k8s.api.resource.v1alpha2.ResourceClassParametersList": { + "description": "ResourceClassParametersList is a collection of ResourceClassParameters.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of node resource capacity objects.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + ], + "default": {} + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + ], + "default": {}, + "description": "Standard list metadata" + } + }, + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "ResourceClassParametersList", + "version": "v1alpha2" + } + ] + }, "io.k8s.api.resource.v1alpha2.ResourceClassParametersReference": { "description": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", "properties": { @@ -730,6 +1077,16 @@ ], "type": "object" }, + "io.k8s.api.resource.v1alpha2.ResourceFilter": { + "description": "ResourceFilter is a filter for resources from one particular driver.", + "properties": { + "driverName": { + "description": "DriverName is the name used by the DRA driver kubelet plugin.", + "type": "string" + } + }, + "type": "object" + }, "io.k8s.api.resource.v1alpha2.ResourceHandle": { "description": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", "properties": { @@ -740,6 +1097,90 @@ "driverName": { "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" + }, + "structuredData": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.StructuredResourceHandle" + } + ], + "description": "If StructuredData is set, then it needs to be used instead of Data." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.ResourceRequest": { + "description": "ResourceRequest is a request for resources from one particular driver.", + "properties": { + "vendorParameters": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" + } + ], + "description": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.StructuredResourceHandle": { + "description": "StructuredResourceHandle is the in-tree representation of the allocation result.", + "properties": { + "nodeName": { + "default": "", + "description": "NodeName is the name of the node providing the necessary resources.", + "type": "string" + }, + "results": { + "description": "Results lists all allocated driver resources.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.DriverAllocationResult" + } + ], + "default": {} + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "vendorClaimParameters": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" + } + ], + "description": "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated." + }, + "vendorClassParameters": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" + } + ], + "description": "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated." + } + }, + "required": [ + "nodeName", + "results" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha2.VendorParameters": { + "description": "VendorParameters are opaque parameters for one particular driver.", + "properties": { + "driverName": { + "description": "DriverName is the name used by the DRA driver kubelet plugin.", + "type": "string" + }, + "parameters": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" + } + ], + "description": "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim." } }, "type": "object" @@ -3047,6 +3488,837 @@ } } }, + "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters": { + "delete": { + "description": "delete collection of ResourceClaimParameters", + "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaimParameters", + "parameters": [ + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "get": { + "description": "list or watch objects of kind ResourceClaimParameters", + "operationId": "listResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "post": { + "description": "create ResourceClaimParameters", + "operationId": "createResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "Created" + }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "Accepted" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + } + }, + "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}": { + "delete": { + "description": "delete ResourceClaimParameters", + "operationId": "deleteResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "OK" + }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "Accepted" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "get": { + "description": "read the specified ResourceClaimParameters", + "operationId": "readResourceV1alpha2NamespacedResourceClaimParameters", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "name of the ResourceClaimParameters", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "patch": { + "description": "partially update the specified ResourceClaimParameters", + "operationId": "patchResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "application/apply-patch+yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/strategic-merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "Created" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "put": { + "description": "replace the specified ResourceClaimParameters", + "operationId": "replaceResourceV1alpha2NamespacedResourceClaimParameters", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + } + } + }, + "description": "Created" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + } + }, "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims": { "delete": { "description": "delete collection of ResourceClaim", @@ -4998,6 +6270,1648 @@ } } }, + "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters": { + "delete": { + "description": "delete collection of ResourceClassParameters", + "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClassParameters", + "parameters": [ + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "get": { + "description": "list or watch objects of kind ResourceClassParameters", + "operationId": "listResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "post": { + "description": "create ResourceClassParameters", + "operationId": "createResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "Created" + }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "Accepted" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + } + }, + "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}": { + "delete": { + "description": "delete ResourceClassParameters", + "operationId": "deleteResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "OK" + }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "Accepted" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "get": { + "description": "read the specified ResourceClassParameters", + "operationId": "readResourceV1alpha2NamespacedResourceClassParameters", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "name of the ResourceClassParameters", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "patch": { + "description": "partially update the specified ResourceClassParameters", + "operationId": "patchResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "application/apply-patch+yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/strategic-merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "Created" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "put": { + "description": "replace the specified ResourceClassParameters", + "operationId": "replaceResourceV1alpha2NamespacedResourceClassParameters", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + } + } + }, + "description": "Created" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + } + }, + "/apis/resource.k8s.io/v1alpha2/noderesourceslices": { + "delete": { + "description": "delete collection of NodeResourceSlice", + "operationId": "deleteResourceV1alpha2CollectionNodeResourceSlice", + "parameters": [ + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "get": { + "description": "list or watch objects of kind NodeResourceSlice", + "operationId": "listResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSliceList" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSliceList" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSliceList" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSliceList" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSliceList" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "post": { + "description": "create a NodeResourceSlice", + "operationId": "createResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "Created" + }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "Accepted" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + } + }, + "/apis/resource.k8s.io/v1alpha2/noderesourceslices/{name}": { + "delete": { + "description": "delete a NodeResourceSlice", + "operationId": "deleteResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "OK" + }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "Accepted" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "get": { + "description": "read the specified NodeResourceSlice", + "operationId": "readResourceV1alpha2NodeResourceSlice", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "name of the NodeResourceSlice", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "patch": { + "description": "partially update the specified NodeResourceSlice", + "operationId": "patchResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "application/apply-patch+yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/strategic-merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "Created" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "put": { + "description": "replace the specified NodeResourceSlice", + "operationId": "replaceResourceV1alpha2NodeResourceSlice", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NodeResourceSlice" + } + } + }, + "description": "Created" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + } + }, "/apis/resource.k8s.io/v1alpha2/podschedulingcontexts": { "get": { "description": "list or watch objects of kind PodSchedulingContext", @@ -5149,6 +8063,157 @@ } ] }, + "/apis/resource.k8s.io/v1alpha2/resourceclaimparameters": { + "get": { + "description": "list or watch objects of kind ResourceClaimParameters", + "operationId": "listResourceV1alpha2ResourceClaimParametersForAllNamespaces", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, "/apis/resource.k8s.io/v1alpha2/resourceclaims": { "get": { "description": "list or watch objects of kind ResourceClaim", @@ -6262,6 +9327,157 @@ } } }, + "/apis/resource.k8s.io/v1alpha2/resourceclassparameters": { + "get": { + "description": "list or watch objects of kind ResourceClassParameters", + "operationId": "listResourceV1alpha2ResourceClassParametersForAllNamespaces", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts": { "get": { "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", @@ -6594,6 +9810,338 @@ } ] }, + "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimparameters": { + "get": { + "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2NamespacedResourceClaimParametersList", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, + "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimparameters/{name}": { + "get": { + "description": "watch changes to an object of kind ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha2NamespacedResourceClaimParameters", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "name of the ResourceClaimParameters", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaims": { "get": { "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", @@ -7258,6 +10806,650 @@ } ] }, + "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclassparameters": { + "get": { + "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2NamespacedResourceClassParametersList", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, + "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclassparameters/{name}": { + "get": { + "description": "watch changes to an object of kind ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha2NamespacedResourceClassParameters", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "name of the ResourceClassParameters", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, + "/apis/resource.k8s.io/v1alpha2/watch/noderesourceslices": { + "get": { + "description": "watch individual changes to a list of NodeResourceSlice. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2NodeResourceSliceList", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, + "/apis/resource.k8s.io/v1alpha2/watch/noderesourceslices/{name}": { + "get": { + "description": "watch changes to an object of kind NodeResourceSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha2NodeResourceSlice", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "NodeResourceSlice", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "name of the NodeResourceSlice", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, "/apis/resource.k8s.io/v1alpha2/watch/podschedulingcontexts": { "get": { "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", @@ -7409,6 +11601,157 @@ } ] }, + "/apis/resource.k8s.io/v1alpha2/watch/resourceclaimparameters": { + "get": { + "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2ResourceClaimParametersListForAllNamespaces", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, "/apis/resource.k8s.io/v1alpha2/watch/resourceclaims": { "get": { "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", @@ -8022,6 +12365,157 @@ } } ] + }, + "/apis/resource.k8s.io/v1alpha2/watch/resourceclassparameters": { + "get": { + "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha2ResourceClassParametersListForAllNamespaces", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + } + }, + "description": "OK" + }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClassParameters", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] } } } diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 7b65a50807e..88246510868 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -37,7 +37,7 @@ API_KNOWN_VIOLATIONS_DIR="${API_KNOWN_VIOLATIONS_DIR:-"${KUBE_ROOT}/api/api-rule OUT_DIR="_output" BOILERPLATE_FILENAME="hack/boilerplate/boilerplate.generatego.txt" APPLYCONFIG_PKG="k8s.io/client-go/applyconfigurations" -PLURAL_EXCEPTIONS="Endpoints:Endpoints" +PLURAL_EXCEPTIONS="Endpoints:Endpoints,ResourceClaimParameters:ResourceClaimParameters,ResourceClassParameters:ResourceClassParameters" # Any time we call sort, we want it in the same locale. export LC_ALL="C" diff --git a/pkg/apis/resource/register.go b/pkg/apis/resource/register.go index ba20bf6ccb7..0f1a5b17029 100644 --- a/pkg/apis/resource/register.go +++ b/pkg/apis/resource/register.go @@ -60,6 +60,12 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ResourceClaimTemplateList{}, &PodSchedulingContext{}, &PodSchedulingContextList{}, + &NodeResourceSlice{}, + &NodeResourceSliceList{}, + &ResourceClaimParameters{}, + &ResourceClaimParametersList{}, + &ResourceClassParameters{}, + &ResourceClassParametersList{}, ) return nil diff --git a/pkg/apis/resource/types.go b/pkg/apis/resource/types.go index bfcd1c46662..10ed93bc0a1 100644 --- a/pkg/apis/resource/types.go +++ b/pkg/apis/resource/types.go @@ -18,6 +18,7 @@ package resource import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/apis/core" ) @@ -185,11 +186,47 @@ type ResourceHandle struct { // future, but not reduced. // +optional Data string + + // If StructuredData is set, then it needs to be used instead of Data. + StructuredData *StructuredResourceHandle } // ResourceHandleDataMaxSize represents the maximum size of resourceHandle.data. const ResourceHandleDataMaxSize = 16 * 1024 +// StructuredResourceHandle is the in-tree representation of the allocation result. +type StructuredResourceHandle struct { + // VendorClassParameters are the per-claim configuration parameters + // from the resource class at the time that the claim was allocated. + VendorClassParameters runtime.Object + + // VendorClaimParameters are the per-claim configuration parameters + // from the resource claim parameters at the time that the claim was + // allocated. + VendorClaimParameters runtime.Object + + // NodeName is the name of the node providing the necessary resources. + NodeName string + + // Results lists all allocated driver resources. + Results []DriverAllocationResult +} + +// DriverAllocationResult contains vendor parameters and the allocation result for +// one request. +type DriverAllocationResult struct { + // VendorRequestParameters are the per-request configuration parameters + // from the time that the claim was allocated. + VendorRequestParameters runtime.Object + + AllocationResultModel +} + +// AllocationResultModel must have one and only one field set. +type AllocationResultModel struct { + // TODO: implement one structured parameter model +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ResourceClaimList is a collection of claims. @@ -323,6 +360,10 @@ type ResourceClass struct { // Setting this field is optional. If null, all nodes are candidates. // +optional SuitableNodes *core.NodeSelector + + // If and only if allocation of claims using this class is handled + // via structured parameters, then StructuredParameters must be set to true. + StructuredParameters *bool } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -434,3 +475,168 @@ type ResourceClaimTemplateList struct { // Items is the list of resource claim templates. Items []ResourceClaimTemplate } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeResourceSlice provides information about available +// resources on individual nodes. +type NodeResourceSlice struct { + metav1.TypeMeta + // Standard object metadata + metav1.ObjectMeta + + // NodeName identifies the node where the capacity is available. + // A field selector can be used to list only NodeResourceSlice + // objects with a certain node name. + NodeName string + + // DriverName identifies the DRA driver providing the capacity information. + // A field selector can be used to list only NodeResourceSlice + // objects with a certain driver name. + DriverName string + + NodeResourceModel +} + +// NodeResourceModel must have one and only one field set. +type NodeResourceModel struct { + // TODO: implement one structured parameter model +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeResourceSliceList is a collection of NodeResourceSlices. +type NodeResourceSliceList struct { + metav1.TypeMeta + // Standard list metadata + metav1.ListMeta + + // Items is the list of node resource capacity objects. + Items []NodeResourceSlice +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ResourceClaimParameters defines resource requests for a ResourceClaim in an +// in-tree format understood by Kubernetes. +type ResourceClaimParameters struct { + metav1.TypeMeta + // Standard object metadata + metav1.ObjectMeta + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the claim parameters when the parameter reference of the claim refers + // to some unknown type. + GeneratedFrom *ResourceClaimParametersReference + + // Shareable indicates whether the allocated claim is meant to be shareable + // by multiple consumers at the same time. + Shareable bool + + // DriverRequests describes all resources that are needed for the + // allocated claim. A single claim may use resources coming from + // different drivers. For each driver, this array has at most one + // entry which then may have one or more per-driver requests. + // + // May be empty, in which case the claim can always be allocated. + DriverRequests []DriverRequests +} + +// DriverRequests describes all resources that are needed from one particular driver. +type DriverRequests struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string + + // VendorParameters are arbitrary setup parameters for all requests of the + // claim. They are ignored while allocating the claim. + VendorParameters runtime.Object + + // Requests describes all resources that are needed from the driver. + Requests []ResourceRequest +} + +// ResourceRequest is a request for resources from one particular driver. +type ResourceRequest struct { + // VendorParameters are arbitrary setup parameters for the requested + // resource. They are ignored while allocating a claim. + VendorParameters runtime.Object + + ResourceRequestModel +} + +// ResourceRequestModel must have one and only one field set. +type ResourceRequestModel struct { + // TODO: implement one structured parameter model +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ResourceClaimParametersList is a collection of ResourceClaimParameters. +type ResourceClaimParametersList struct { + metav1.TypeMeta + // Standard list metadata + metav1.ListMeta + + // Items is the list of node resource capacity objects. + Items []ResourceClaimParameters +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ResourceClassParameters defines resource requests for a ResourceClass in an +// in-tree format understood by Kubernetes. +type ResourceClassParameters struct { + metav1.TypeMeta + // Standard object metadata + metav1.ObjectMeta + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the class parameters when the parameter reference of the class refers + // to some unknown type. + GeneratedFrom *ResourceClassParametersReference + + // VendorParameters are arbitrary setup parameters for all claims using + // this class. They are ignored while allocating the claim. There must + // not be more than one entry per driver. + VendorParameters []VendorParameters + + // Filters describes additional contraints that must be met when using the class. + Filters []ResourceFilter +} + +// ResourceFilter is a filter for resources from one particular driver. +type ResourceFilter struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string + + ResourceFilterModel +} + +// ResourceFilterModel must have one and only one field set. +type ResourceFilterModel struct { + // TODO: implement one structured parameter model +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ResourceClassParametersList is a collection of ResourceClassParameters. +type ResourceClassParametersList struct { + metav1.TypeMeta + // Standard list metadata + metav1.ListMeta + + // Items is the list of node resource capacity objects. + Items []ResourceClassParameters +} + +// VendorParameters are opaque parameters for one particular driver. +type VendorParameters struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string + + // Parameters can be arbitrary setup parameters. They are ignored while + // allocating a claim. + Parameters runtime.Object +} diff --git a/pkg/apis/resource/v1alpha2/conversion.go b/pkg/apis/resource/v1alpha2/conversion.go index 397d2a1fb08..5e35ad6dee0 100644 --- a/pkg/apis/resource/v1alpha2/conversion.go +++ b/pkg/apis/resource/v1alpha2/conversion.go @@ -17,9 +17,23 @@ limitations under the License. package v1alpha2 import ( + "fmt" + "k8s.io/apimachinery/pkg/runtime" ) func addConversionFuncs(scheme *runtime.Scheme) error { + if err := scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("NodeResourceSlice"), + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "nodeName", "driverName": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported for %s: %s", SchemeGroupVersion.WithKind("NodeResourceSlice"), label) + } + }); err != nil { + return err + } + return nil } diff --git a/pkg/apis/resource/v1alpha2/zz_generated.conversion.go b/pkg/apis/resource/v1alpha2/zz_generated.conversion.go index c1902ee804e..107da311342 100644 --- a/pkg/apis/resource/v1alpha2/zz_generated.conversion.go +++ b/pkg/apis/resource/v1alpha2/zz_generated.conversion.go @@ -50,6 +50,66 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1alpha2.AllocationResultModel)(nil), (*resource.AllocationResultModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(a.(*v1alpha2.AllocationResultModel), b.(*resource.AllocationResultModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.AllocationResultModel)(nil), (*v1alpha2.AllocationResultModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(a.(*resource.AllocationResultModel), b.(*v1alpha2.AllocationResultModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.DriverAllocationResult)(nil), (*resource.DriverAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(a.(*v1alpha2.DriverAllocationResult), b.(*resource.DriverAllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.DriverAllocationResult)(nil), (*v1alpha2.DriverAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(a.(*resource.DriverAllocationResult), b.(*v1alpha2.DriverAllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.DriverRequests)(nil), (*resource.DriverRequests)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_DriverRequests_To_resource_DriverRequests(a.(*v1alpha2.DriverRequests), b.(*resource.DriverRequests), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.DriverRequests)(nil), (*v1alpha2.DriverRequests)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DriverRequests_To_v1alpha2_DriverRequests(a.(*resource.DriverRequests), b.(*v1alpha2.DriverRequests), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.NodeResourceModel)(nil), (*resource.NodeResourceModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NodeResourceModel_To_resource_NodeResourceModel(a.(*v1alpha2.NodeResourceModel), b.(*resource.NodeResourceModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NodeResourceModel)(nil), (*v1alpha2.NodeResourceModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NodeResourceModel_To_v1alpha2_NodeResourceModel(a.(*resource.NodeResourceModel), b.(*v1alpha2.NodeResourceModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.NodeResourceSlice)(nil), (*resource.NodeResourceSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NodeResourceSlice_To_resource_NodeResourceSlice(a.(*v1alpha2.NodeResourceSlice), b.(*resource.NodeResourceSlice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NodeResourceSlice)(nil), (*v1alpha2.NodeResourceSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NodeResourceSlice_To_v1alpha2_NodeResourceSlice(a.(*resource.NodeResourceSlice), b.(*v1alpha2.NodeResourceSlice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.NodeResourceSliceList)(nil), (*resource.NodeResourceSliceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NodeResourceSliceList_To_resource_NodeResourceSliceList(a.(*v1alpha2.NodeResourceSliceList), b.(*resource.NodeResourceSliceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NodeResourceSliceList)(nil), (*v1alpha2.NodeResourceSliceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NodeResourceSliceList_To_v1alpha2_NodeResourceSliceList(a.(*resource.NodeResourceSliceList), b.(*v1alpha2.NodeResourceSliceList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1alpha2.PodSchedulingContext)(nil), (*resource.PodSchedulingContext)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha2_PodSchedulingContext_To_resource_PodSchedulingContext(a.(*v1alpha2.PodSchedulingContext), b.(*resource.PodSchedulingContext), scope) }); err != nil { @@ -120,6 +180,26 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimParameters)(nil), (*resource.ResourceClaimParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(a.(*v1alpha2.ResourceClaimParameters), b.(*resource.ResourceClaimParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParameters)(nil), (*v1alpha2.ResourceClaimParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(a.(*resource.ResourceClaimParameters), b.(*v1alpha2.ResourceClaimParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimParametersList)(nil), (*resource.ResourceClaimParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(a.(*v1alpha2.ResourceClaimParametersList), b.(*resource.ResourceClaimParametersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersList)(nil), (*v1alpha2.ResourceClaimParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList(a.(*resource.ResourceClaimParametersList), b.(*v1alpha2.ResourceClaimParametersList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimParametersReference)(nil), (*resource.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(a.(*v1alpha2.ResourceClaimParametersReference), b.(*resource.ResourceClaimParametersReference), scope) }); err != nil { @@ -210,6 +290,26 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClassParameters)(nil), (*resource.ResourceClassParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(a.(*v1alpha2.ResourceClassParameters), b.(*resource.ResourceClassParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParameters)(nil), (*v1alpha2.ResourceClassParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(a.(*resource.ResourceClassParameters), b.(*v1alpha2.ResourceClassParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClassParametersList)(nil), (*resource.ResourceClassParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList(a.(*v1alpha2.ResourceClassParametersList), b.(*resource.ResourceClassParametersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersList)(nil), (*v1alpha2.ResourceClassParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList(a.(*resource.ResourceClassParametersList), b.(*v1alpha2.ResourceClassParametersList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClassParametersReference)(nil), (*resource.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(a.(*v1alpha2.ResourceClassParametersReference), b.(*resource.ResourceClassParametersReference), scope) }); err != nil { @@ -220,6 +320,26 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceFilter)(nil), (*resource.ResourceFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_ResourceFilter_To_resource_ResourceFilter(a.(*v1alpha2.ResourceFilter), b.(*resource.ResourceFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceFilter)(nil), (*v1alpha2.ResourceFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceFilter_To_v1alpha2_ResourceFilter(a.(*resource.ResourceFilter), b.(*v1alpha2.ResourceFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceFilterModel)(nil), (*resource.ResourceFilterModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(a.(*v1alpha2.ResourceFilterModel), b.(*resource.ResourceFilterModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceFilterModel)(nil), (*v1alpha2.ResourceFilterModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(a.(*resource.ResourceFilterModel), b.(*v1alpha2.ResourceFilterModel), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceHandle)(nil), (*resource.ResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha2_ResourceHandle_To_resource_ResourceHandle(a.(*v1alpha2.ResourceHandle), b.(*resource.ResourceHandle), scope) }); err != nil { @@ -230,11 +350,61 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceRequest)(nil), (*resource.ResourceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(a.(*v1alpha2.ResourceRequest), b.(*resource.ResourceRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceRequest)(nil), (*v1alpha2.ResourceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(a.(*resource.ResourceRequest), b.(*v1alpha2.ResourceRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceRequestModel)(nil), (*resource.ResourceRequestModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(a.(*v1alpha2.ResourceRequestModel), b.(*resource.ResourceRequestModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceRequestModel)(nil), (*v1alpha2.ResourceRequestModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(a.(*resource.ResourceRequestModel), b.(*v1alpha2.ResourceRequestModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.StructuredResourceHandle)(nil), (*resource.StructuredResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(a.(*v1alpha2.StructuredResourceHandle), b.(*resource.StructuredResourceHandle), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.StructuredResourceHandle)(nil), (*v1alpha2.StructuredResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(a.(*resource.StructuredResourceHandle), b.(*v1alpha2.StructuredResourceHandle), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha2.VendorParameters)(nil), (*resource.VendorParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_VendorParameters_To_resource_VendorParameters(a.(*v1alpha2.VendorParameters), b.(*resource.VendorParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.VendorParameters)(nil), (*v1alpha2.VendorParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_VendorParameters_To_v1alpha2_VendorParameters(a.(*resource.VendorParameters), b.(*v1alpha2.VendorParameters), scope) + }); err != nil { + return err + } return nil } func autoConvert_v1alpha2_AllocationResult_To_resource_AllocationResult(in *v1alpha2.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error { - out.ResourceHandles = *(*[]resource.ResourceHandle)(unsafe.Pointer(&in.ResourceHandles)) + if in.ResourceHandles != nil { + in, out := &in.ResourceHandles, &out.ResourceHandles + *out = make([]resource.ResourceHandle, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_ResourceHandle_To_resource_ResourceHandle(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.ResourceHandles = nil + } out.AvailableOnNodes = (*core.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) out.Shareable = in.Shareable return nil @@ -246,7 +416,17 @@ func Convert_v1alpha2_AllocationResult_To_resource_AllocationResult(in *v1alpha2 } func autoConvert_resource_AllocationResult_To_v1alpha2_AllocationResult(in *resource.AllocationResult, out *v1alpha2.AllocationResult, s conversion.Scope) error { - out.ResourceHandles = *(*[]v1alpha2.ResourceHandle)(unsafe.Pointer(&in.ResourceHandles)) + if in.ResourceHandles != nil { + in, out := &in.ResourceHandles, &out.ResourceHandles + *out = make([]v1alpha2.ResourceHandle, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.ResourceHandles = nil + } out.AvailableOnNodes = (*v1.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) out.Shareable = in.Shareable return nil @@ -257,6 +437,172 @@ func Convert_resource_AllocationResult_To_v1alpha2_AllocationResult(in *resource return autoConvert_resource_AllocationResult_To_v1alpha2_AllocationResult(in, out, s) } +func autoConvert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(in *v1alpha2.AllocationResultModel, out *resource.AllocationResultModel, s conversion.Scope) error { + return nil +} + +// Convert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel is an autogenerated conversion function. +func Convert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(in *v1alpha2.AllocationResultModel, out *resource.AllocationResultModel, s conversion.Scope) error { + return autoConvert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(in, out, s) +} + +func autoConvert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(in *resource.AllocationResultModel, out *v1alpha2.AllocationResultModel, s conversion.Scope) error { + return nil +} + +// Convert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel is an autogenerated conversion function. +func Convert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(in *resource.AllocationResultModel, out *v1alpha2.AllocationResultModel, s conversion.Scope) error { + return autoConvert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(in, out, s) +} + +func autoConvert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(in *v1alpha2.DriverAllocationResult, out *resource.DriverAllocationResult, s conversion.Scope) error { + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorRequestParameters, &out.VendorRequestParameters, s); err != nil { + return err + } + if err := Convert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(&in.AllocationResultModel, &out.AllocationResultModel, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult is an autogenerated conversion function. +func Convert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(in *v1alpha2.DriverAllocationResult, out *resource.DriverAllocationResult, s conversion.Scope) error { + return autoConvert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(in, out, s) +} + +func autoConvert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(in *resource.DriverAllocationResult, out *v1alpha2.DriverAllocationResult, s conversion.Scope) error { + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorRequestParameters, &out.VendorRequestParameters, s); err != nil { + return err + } + if err := Convert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(&in.AllocationResultModel, &out.AllocationResultModel, s); err != nil { + return err + } + return nil +} + +// Convert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult is an autogenerated conversion function. +func Convert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(in *resource.DriverAllocationResult, out *v1alpha2.DriverAllocationResult, s conversion.Scope) error { + return autoConvert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(in, out, s) +} + +func autoConvert_v1alpha2_DriverRequests_To_resource_DriverRequests(in *v1alpha2.DriverRequests, out *resource.DriverRequests, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorParameters, &out.VendorParameters, s); err != nil { + return err + } + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]resource.ResourceRequest, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Requests = nil + } + return nil +} + +// Convert_v1alpha2_DriverRequests_To_resource_DriverRequests is an autogenerated conversion function. +func Convert_v1alpha2_DriverRequests_To_resource_DriverRequests(in *v1alpha2.DriverRequests, out *resource.DriverRequests, s conversion.Scope) error { + return autoConvert_v1alpha2_DriverRequests_To_resource_DriverRequests(in, out, s) +} + +func autoConvert_resource_DriverRequests_To_v1alpha2_DriverRequests(in *resource.DriverRequests, out *v1alpha2.DriverRequests, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorParameters, &out.VendorParameters, s); err != nil { + return err + } + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]v1alpha2.ResourceRequest, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Requests = nil + } + return nil +} + +// Convert_resource_DriverRequests_To_v1alpha2_DriverRequests is an autogenerated conversion function. +func Convert_resource_DriverRequests_To_v1alpha2_DriverRequests(in *resource.DriverRequests, out *v1alpha2.DriverRequests, s conversion.Scope) error { + return autoConvert_resource_DriverRequests_To_v1alpha2_DriverRequests(in, out, s) +} + +func autoConvert_v1alpha2_NodeResourceModel_To_resource_NodeResourceModel(in *v1alpha2.NodeResourceModel, out *resource.NodeResourceModel, s conversion.Scope) error { + return nil +} + +// Convert_v1alpha2_NodeResourceModel_To_resource_NodeResourceModel is an autogenerated conversion function. +func Convert_v1alpha2_NodeResourceModel_To_resource_NodeResourceModel(in *v1alpha2.NodeResourceModel, out *resource.NodeResourceModel, s conversion.Scope) error { + return autoConvert_v1alpha2_NodeResourceModel_To_resource_NodeResourceModel(in, out, s) +} + +func autoConvert_resource_NodeResourceModel_To_v1alpha2_NodeResourceModel(in *resource.NodeResourceModel, out *v1alpha2.NodeResourceModel, s conversion.Scope) error { + return nil +} + +// Convert_resource_NodeResourceModel_To_v1alpha2_NodeResourceModel is an autogenerated conversion function. +func Convert_resource_NodeResourceModel_To_v1alpha2_NodeResourceModel(in *resource.NodeResourceModel, out *v1alpha2.NodeResourceModel, s conversion.Scope) error { + return autoConvert_resource_NodeResourceModel_To_v1alpha2_NodeResourceModel(in, out, s) +} + +func autoConvert_v1alpha2_NodeResourceSlice_To_resource_NodeResourceSlice(in *v1alpha2.NodeResourceSlice, out *resource.NodeResourceSlice, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.NodeName = in.NodeName + out.DriverName = in.DriverName + if err := Convert_v1alpha2_NodeResourceModel_To_resource_NodeResourceModel(&in.NodeResourceModel, &out.NodeResourceModel, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha2_NodeResourceSlice_To_resource_NodeResourceSlice is an autogenerated conversion function. +func Convert_v1alpha2_NodeResourceSlice_To_resource_NodeResourceSlice(in *v1alpha2.NodeResourceSlice, out *resource.NodeResourceSlice, s conversion.Scope) error { + return autoConvert_v1alpha2_NodeResourceSlice_To_resource_NodeResourceSlice(in, out, s) +} + +func autoConvert_resource_NodeResourceSlice_To_v1alpha2_NodeResourceSlice(in *resource.NodeResourceSlice, out *v1alpha2.NodeResourceSlice, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.NodeName = in.NodeName + out.DriverName = in.DriverName + if err := Convert_resource_NodeResourceModel_To_v1alpha2_NodeResourceModel(&in.NodeResourceModel, &out.NodeResourceModel, s); err != nil { + return err + } + return nil +} + +// Convert_resource_NodeResourceSlice_To_v1alpha2_NodeResourceSlice is an autogenerated conversion function. +func Convert_resource_NodeResourceSlice_To_v1alpha2_NodeResourceSlice(in *resource.NodeResourceSlice, out *v1alpha2.NodeResourceSlice, s conversion.Scope) error { + return autoConvert_resource_NodeResourceSlice_To_v1alpha2_NodeResourceSlice(in, out, s) +} + +func autoConvert_v1alpha2_NodeResourceSliceList_To_resource_NodeResourceSliceList(in *v1alpha2.NodeResourceSliceList, out *resource.NodeResourceSliceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]resource.NodeResourceSlice)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha2_NodeResourceSliceList_To_resource_NodeResourceSliceList is an autogenerated conversion function. +func Convert_v1alpha2_NodeResourceSliceList_To_resource_NodeResourceSliceList(in *v1alpha2.NodeResourceSliceList, out *resource.NodeResourceSliceList, s conversion.Scope) error { + return autoConvert_v1alpha2_NodeResourceSliceList_To_resource_NodeResourceSliceList(in, out, s) +} + +func autoConvert_resource_NodeResourceSliceList_To_v1alpha2_NodeResourceSliceList(in *resource.NodeResourceSliceList, out *v1alpha2.NodeResourceSliceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha2.NodeResourceSlice)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_resource_NodeResourceSliceList_To_v1alpha2_NodeResourceSliceList is an autogenerated conversion function. +func Convert_resource_NodeResourceSliceList_To_v1alpha2_NodeResourceSliceList(in *resource.NodeResourceSliceList, out *v1alpha2.NodeResourceSliceList, s conversion.Scope) error { + return autoConvert_resource_NodeResourceSliceList_To_v1alpha2_NodeResourceSliceList(in, out, s) +} + func autoConvert_v1alpha2_PodSchedulingContext_To_resource_PodSchedulingContext(in *v1alpha2.PodSchedulingContext, out *resource.PodSchedulingContext, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1alpha2_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(&in.Spec, &out.Spec, s); err != nil { @@ -413,7 +759,17 @@ func Convert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimCo func autoConvert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha2.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]resource.ResourceClaim)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]resource.ResourceClaim, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } @@ -424,7 +780,17 @@ func Convert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(in *v1alph func autoConvert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha2.ResourceClaimList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha2.ResourceClaim)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha2.ResourceClaim, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } @@ -433,6 +799,94 @@ func Convert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in *resour return autoConvert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in, out, s) } +func autoConvert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(in *v1alpha2.ResourceClaimParameters, out *resource.ResourceClaimParameters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.GeneratedFrom = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) + out.Shareable = in.Shareable + if in.DriverRequests != nil { + in, out := &in.DriverRequests, &out.DriverRequests + *out = make([]resource.DriverRequests, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_DriverRequests_To_resource_DriverRequests(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.DriverRequests = nil + } + return nil +} + +// Convert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters is an autogenerated conversion function. +func Convert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(in *v1alpha2.ResourceClaimParameters, out *resource.ResourceClaimParameters, s conversion.Scope) error { + return autoConvert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(in, out, s) +} + +func autoConvert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(in *resource.ResourceClaimParameters, out *v1alpha2.ResourceClaimParameters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.GeneratedFrom = (*v1alpha2.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) + out.Shareable = in.Shareable + if in.DriverRequests != nil { + in, out := &in.DriverRequests, &out.DriverRequests + *out = make([]v1alpha2.DriverRequests, len(*in)) + for i := range *in { + if err := Convert_resource_DriverRequests_To_v1alpha2_DriverRequests(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.DriverRequests = nil + } + return nil +} + +// Convert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters is an autogenerated conversion function. +func Convert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(in *resource.ResourceClaimParameters, out *v1alpha2.ResourceClaimParameters, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(in, out, s) +} + +func autoConvert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in *v1alpha2.ResourceClaimParametersList, out *resource.ResourceClaimParametersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]resource.ResourceClaimParameters, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList is an autogenerated conversion function. +func Convert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in *v1alpha2.ResourceClaimParametersList, out *resource.ResourceClaimParametersList, s conversion.Scope) error { + return autoConvert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in, out, s) +} + +func autoConvert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList(in *resource.ResourceClaimParametersList, out *v1alpha2.ResourceClaimParametersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha2.ResourceClaimParameters, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList is an autogenerated conversion function. +func Convert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList(in *resource.ResourceClaimParametersList, out *v1alpha2.ResourceClaimParametersList, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList(in, out, s) +} + func autoConvert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha2.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error { out.APIGroup = in.APIGroup out.Kind = in.Kind @@ -505,7 +959,15 @@ func Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(in *resour func autoConvert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha2.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error { out.DriverName = in.DriverName - out.Allocation = (*resource.AllocationResult)(unsafe.Pointer(in.Allocation)) + if in.Allocation != nil { + in, out := &in.Allocation, &out.Allocation + *out = new(resource.AllocationResult) + if err := Convert_v1alpha2_AllocationResult_To_resource_AllocationResult(*in, *out, s); err != nil { + return err + } + } else { + out.Allocation = nil + } out.ReservedFor = *(*[]resource.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor)) out.DeallocationRequested = in.DeallocationRequested return nil @@ -518,7 +980,15 @@ func Convert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1 func autoConvert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha2.ResourceClaimStatus, s conversion.Scope) error { out.DriverName = in.DriverName - out.Allocation = (*v1alpha2.AllocationResult)(unsafe.Pointer(in.Allocation)) + if in.Allocation != nil { + in, out := &in.Allocation, &out.Allocation + *out = new(v1alpha2.AllocationResult) + if err := Convert_resource_AllocationResult_To_v1alpha2_AllocationResult(*in, *out, s); err != nil { + return err + } + } else { + out.Allocation = nil + } out.ReservedFor = *(*[]v1alpha2.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor)) out.DeallocationRequested = in.DeallocationRequested return nil @@ -608,6 +1078,7 @@ func autoConvert_v1alpha2_ResourceClass_To_resource_ResourceClass(in *v1alpha2.R out.DriverName = in.DriverName out.ParametersRef = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef)) out.SuitableNodes = (*core.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) + out.StructuredParameters = (*bool)(unsafe.Pointer(in.StructuredParameters)) return nil } @@ -621,6 +1092,7 @@ func autoConvert_resource_ResourceClass_To_v1alpha2_ResourceClass(in *resource.R out.DriverName = in.DriverName out.ParametersRef = (*v1alpha2.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef)) out.SuitableNodes = (*v1.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) + out.StructuredParameters = (*bool)(unsafe.Pointer(in.StructuredParameters)) return nil } @@ -651,6 +1123,94 @@ func Convert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(in *resour return autoConvert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(in, out, s) } +func autoConvert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(in *v1alpha2.ResourceClassParameters, out *resource.ResourceClassParameters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.GeneratedFrom = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.GeneratedFrom)) + if in.VendorParameters != nil { + in, out := &in.VendorParameters, &out.VendorParameters + *out = make([]resource.VendorParameters, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_VendorParameters_To_resource_VendorParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.VendorParameters = nil + } + out.Filters = *(*[]resource.ResourceFilter)(unsafe.Pointer(&in.Filters)) + return nil +} + +// Convert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters is an autogenerated conversion function. +func Convert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(in *v1alpha2.ResourceClassParameters, out *resource.ResourceClassParameters, s conversion.Scope) error { + return autoConvert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(in, out, s) +} + +func autoConvert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(in *resource.ResourceClassParameters, out *v1alpha2.ResourceClassParameters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.GeneratedFrom = (*v1alpha2.ResourceClassParametersReference)(unsafe.Pointer(in.GeneratedFrom)) + if in.VendorParameters != nil { + in, out := &in.VendorParameters, &out.VendorParameters + *out = make([]v1alpha2.VendorParameters, len(*in)) + for i := range *in { + if err := Convert_resource_VendorParameters_To_v1alpha2_VendorParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.VendorParameters = nil + } + out.Filters = *(*[]v1alpha2.ResourceFilter)(unsafe.Pointer(&in.Filters)) + return nil +} + +// Convert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters is an autogenerated conversion function. +func Convert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(in *resource.ResourceClassParameters, out *v1alpha2.ResourceClassParameters, s conversion.Scope) error { + return autoConvert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(in, out, s) +} + +func autoConvert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList(in *v1alpha2.ResourceClassParametersList, out *resource.ResourceClassParametersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]resource.ResourceClassParameters, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList is an autogenerated conversion function. +func Convert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList(in *v1alpha2.ResourceClassParametersList, out *resource.ResourceClassParametersList, s conversion.Scope) error { + return autoConvert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList(in, out, s) +} + +func autoConvert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList(in *resource.ResourceClassParametersList, out *v1alpha2.ResourceClassParametersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha2.ResourceClassParameters, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList is an autogenerated conversion function. +func Convert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList(in *resource.ResourceClassParametersList, out *v1alpha2.ResourceClassParametersList, s conversion.Scope) error { + return autoConvert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList(in, out, s) +} + func autoConvert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha2.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error { out.APIGroup = in.APIGroup out.Kind = in.Kind @@ -677,9 +1237,62 @@ func Convert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClass return autoConvert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference(in, out, s) } +func autoConvert_v1alpha2_ResourceFilter_To_resource_ResourceFilter(in *v1alpha2.ResourceFilter, out *resource.ResourceFilter, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := Convert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(&in.ResourceFilterModel, &out.ResourceFilterModel, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha2_ResourceFilter_To_resource_ResourceFilter is an autogenerated conversion function. +func Convert_v1alpha2_ResourceFilter_To_resource_ResourceFilter(in *v1alpha2.ResourceFilter, out *resource.ResourceFilter, s conversion.Scope) error { + return autoConvert_v1alpha2_ResourceFilter_To_resource_ResourceFilter(in, out, s) +} + +func autoConvert_resource_ResourceFilter_To_v1alpha2_ResourceFilter(in *resource.ResourceFilter, out *v1alpha2.ResourceFilter, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := Convert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(&in.ResourceFilterModel, &out.ResourceFilterModel, s); err != nil { + return err + } + return nil +} + +// Convert_resource_ResourceFilter_To_v1alpha2_ResourceFilter is an autogenerated conversion function. +func Convert_resource_ResourceFilter_To_v1alpha2_ResourceFilter(in *resource.ResourceFilter, out *v1alpha2.ResourceFilter, s conversion.Scope) error { + return autoConvert_resource_ResourceFilter_To_v1alpha2_ResourceFilter(in, out, s) +} + +func autoConvert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(in *v1alpha2.ResourceFilterModel, out *resource.ResourceFilterModel, s conversion.Scope) error { + return nil +} + +// Convert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel is an autogenerated conversion function. +func Convert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(in *v1alpha2.ResourceFilterModel, out *resource.ResourceFilterModel, s conversion.Scope) error { + return autoConvert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(in, out, s) +} + +func autoConvert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(in *resource.ResourceFilterModel, out *v1alpha2.ResourceFilterModel, s conversion.Scope) error { + return nil +} + +// Convert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel is an autogenerated conversion function. +func Convert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(in *resource.ResourceFilterModel, out *v1alpha2.ResourceFilterModel, s conversion.Scope) error { + return autoConvert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(in, out, s) +} + func autoConvert_v1alpha2_ResourceHandle_To_resource_ResourceHandle(in *v1alpha2.ResourceHandle, out *resource.ResourceHandle, s conversion.Scope) error { out.DriverName = in.DriverName out.Data = in.Data + if in.StructuredData != nil { + in, out := &in.StructuredData, &out.StructuredData + *out = new(resource.StructuredResourceHandle) + if err := Convert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(*in, *out, s); err != nil { + return err + } + } else { + out.StructuredData = nil + } return nil } @@ -691,6 +1304,15 @@ func Convert_v1alpha2_ResourceHandle_To_resource_ResourceHandle(in *v1alpha2.Res func autoConvert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(in *resource.ResourceHandle, out *v1alpha2.ResourceHandle, s conversion.Scope) error { out.DriverName = in.DriverName out.Data = in.Data + if in.StructuredData != nil { + in, out := &in.StructuredData, &out.StructuredData + *out = new(v1alpha2.StructuredResourceHandle) + if err := Convert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(*in, *out, s); err != nil { + return err + } + } else { + out.StructuredData = nil + } return nil } @@ -698,3 +1320,131 @@ func autoConvert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(in *resource func Convert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(in *resource.ResourceHandle, out *v1alpha2.ResourceHandle, s conversion.Scope) error { return autoConvert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(in, out, s) } + +func autoConvert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(in *v1alpha2.ResourceRequest, out *resource.ResourceRequest, s conversion.Scope) error { + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorParameters, &out.VendorParameters, s); err != nil { + return err + } + if err := Convert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(&in.ResourceRequestModel, &out.ResourceRequestModel, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha2_ResourceRequest_To_resource_ResourceRequest is an autogenerated conversion function. +func Convert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(in *v1alpha2.ResourceRequest, out *resource.ResourceRequest, s conversion.Scope) error { + return autoConvert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(in, out, s) +} + +func autoConvert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(in *resource.ResourceRequest, out *v1alpha2.ResourceRequest, s conversion.Scope) error { + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorParameters, &out.VendorParameters, s); err != nil { + return err + } + if err := Convert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(&in.ResourceRequestModel, &out.ResourceRequestModel, s); err != nil { + return err + } + return nil +} + +// Convert_resource_ResourceRequest_To_v1alpha2_ResourceRequest is an autogenerated conversion function. +func Convert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(in *resource.ResourceRequest, out *v1alpha2.ResourceRequest, s conversion.Scope) error { + return autoConvert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(in, out, s) +} + +func autoConvert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(in *v1alpha2.ResourceRequestModel, out *resource.ResourceRequestModel, s conversion.Scope) error { + return nil +} + +// Convert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel is an autogenerated conversion function. +func Convert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(in *v1alpha2.ResourceRequestModel, out *resource.ResourceRequestModel, s conversion.Scope) error { + return autoConvert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(in, out, s) +} + +func autoConvert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(in *resource.ResourceRequestModel, out *v1alpha2.ResourceRequestModel, s conversion.Scope) error { + return nil +} + +// Convert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel is an autogenerated conversion function. +func Convert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(in *resource.ResourceRequestModel, out *v1alpha2.ResourceRequestModel, s conversion.Scope) error { + return autoConvert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(in, out, s) +} + +func autoConvert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(in *v1alpha2.StructuredResourceHandle, out *resource.StructuredResourceHandle, s conversion.Scope) error { + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorClassParameters, &out.VendorClassParameters, s); err != nil { + return err + } + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorClaimParameters, &out.VendorClaimParameters, s); err != nil { + return err + } + out.NodeName = in.NodeName + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]resource.DriverAllocationResult, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Results = nil + } + return nil +} + +// Convert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle is an autogenerated conversion function. +func Convert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(in *v1alpha2.StructuredResourceHandle, out *resource.StructuredResourceHandle, s conversion.Scope) error { + return autoConvert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(in, out, s) +} + +func autoConvert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(in *resource.StructuredResourceHandle, out *v1alpha2.StructuredResourceHandle, s conversion.Scope) error { + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorClassParameters, &out.VendorClassParameters, s); err != nil { + return err + } + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorClaimParameters, &out.VendorClaimParameters, s); err != nil { + return err + } + out.NodeName = in.NodeName + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]v1alpha2.DriverAllocationResult, len(*in)) + for i := range *in { + if err := Convert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Results = nil + } + return nil +} + +// Convert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle is an autogenerated conversion function. +func Convert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(in *resource.StructuredResourceHandle, out *v1alpha2.StructuredResourceHandle, s conversion.Scope) error { + return autoConvert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(in, out, s) +} + +func autoConvert_v1alpha2_VendorParameters_To_resource_VendorParameters(in *v1alpha2.VendorParameters, out *resource.VendorParameters, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Parameters, &out.Parameters, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha2_VendorParameters_To_resource_VendorParameters is an autogenerated conversion function. +func Convert_v1alpha2_VendorParameters_To_resource_VendorParameters(in *v1alpha2.VendorParameters, out *resource.VendorParameters, s conversion.Scope) error { + return autoConvert_v1alpha2_VendorParameters_To_resource_VendorParameters(in, out, s) +} + +func autoConvert_resource_VendorParameters_To_v1alpha2_VendorParameters(in *resource.VendorParameters, out *v1alpha2.VendorParameters, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Parameters, &out.Parameters, s); err != nil { + return err + } + return nil +} + +// Convert_resource_VendorParameters_To_v1alpha2_VendorParameters is an autogenerated conversion function. +func Convert_resource_VendorParameters_To_v1alpha2_VendorParameters(in *resource.VendorParameters, out *v1alpha2.VendorParameters, s conversion.Scope) error { + return autoConvert_resource_VendorParameters_To_v1alpha2_VendorParameters(in, out, s) +} diff --git a/pkg/apis/resource/validation/validation.go b/pkg/apis/resource/validation/validation.go index 17077667393..4e67edbde2f 100644 --- a/pkg/apis/resource/validation/validation.go +++ b/pkg/apis/resource/validation/validation.go @@ -17,6 +17,7 @@ limitations under the License. package validation import ( + apiequality "k8s.io/apimachinery/pkg/api/equality" apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" @@ -41,7 +42,7 @@ func validateResourceClaimSpec(spec *resource.ResourceClaimSpec, fldPath *field. for _, msg := range corevalidation.ValidateClassName(spec.ResourceClassName, false) { allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceClassName"), spec.ResourceClassName, msg)) } - allErrs = append(allErrs, validateResourceClaimParameters(spec.ParametersRef, fldPath.Child("parametersRef"))...) + allErrs = append(allErrs, validateResourceClaimParametersRef(spec.ParametersRef, fldPath.Child("parametersRef"))...) if !supportedAllocationModes.Has(string(spec.AllocationMode)) { allErrs = append(allErrs, field.NotSupported(fldPath.Child("allocationMode"), spec.AllocationMode, supportedAllocationModes.List())) } @@ -54,7 +55,7 @@ var supportedAllocationModes = sets.NewString(string(resource.AllocationModeImme // function for Kind and Name in both types, but generics cannot be used to // access common fields in structs. -func validateResourceClaimParameters(ref *resource.ResourceClaimParametersReference, fldPath *field.Path) field.ErrorList { +func validateResourceClaimParametersRef(ref *resource.ResourceClaimParametersReference, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList if ref != nil { if ref.Kind == "" { @@ -200,6 +201,12 @@ func validateResourceHandles(resourceHandles []resource.ResourceHandle, maxSize if len(resourceHandle.Data) > resource.ResourceHandleDataMaxSize { allErrs = append(allErrs, field.TooLongMaxLength(idxPath.Child("data"), len(resourceHandle.Data), resource.ResourceHandleDataMaxSize)) } + if resourceHandle.StructuredData != nil { + allErrs = append(allErrs, validateStructuredResourceHandle(resourceHandle.StructuredData, idxPath.Child("structuredData"))...) + } + if len(resourceHandle.Data) > 0 && resourceHandle.StructuredData != nil { + allErrs = append(allErrs, field.Invalid(idxPath, nil, "data and structuredData are mutually exclusive")) + } } if len(resourceHandles) > maxSize { // Dumping the entire field into the error message is likely to be too long, @@ -210,6 +217,37 @@ func validateResourceHandles(resourceHandles []resource.ResourceHandle, maxSize return allErrs } +func validateStructuredResourceHandle(handle *resource.StructuredResourceHandle, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + allErrs = append(allErrs, validateNodeName(handle.NodeName, fldPath.Child("nodeName"))...) + allErrs = append(allErrs, validateDriverAllocationResults(handle.Results, fldPath.Child("results"))...) + return allErrs +} + +func validateDriverAllocationResults(results []resource.DriverAllocationResult, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + for index, result := range results { + idxPath := fldPath.Index(index) + allErrs = append(allErrs, validateAllocationResultModel(&result.AllocationResultModel, idxPath)...) + } + return allErrs +} + +func validateAllocationResultModel(model *resource.AllocationResultModel, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + entries := sets.New[string]() + // TODO: implement one structured parameter model + switch len(entries) { + case 0: + // allErrs = append(allErrs, field.Required(fldPath, "exactly one structured model field must be set")) + case 1: + // Okay. + default: + allErrs = append(allErrs, field.Invalid(fldPath, sets.List(entries), "exactly one field must be set, not several")) + } + return allErrs +} + func validateResourceClaimUserReference(ref resource.ResourceClaimConsumerReference, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList if ref.Resource == "" { @@ -345,3 +383,170 @@ func validateNodeName(name string, fldPath *field.Path) field.ErrorList { } return allErrs } + +// ValidateNodeResourceSlice tests if a NodeResourceSlice object is valid. +func ValidateNodeResourceSlice(nodeResourceSlice *resource.NodeResourceSlice) field.ErrorList { + allErrs := corevalidation.ValidateObjectMeta(&nodeResourceSlice.ObjectMeta, false, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) + allErrs = append(allErrs, validateNodeName(nodeResourceSlice.NodeName, field.NewPath("nodeName"))...) + allErrs = append(allErrs, validateResourceDriverName(nodeResourceSlice.DriverName, field.NewPath("driverName"))...) + allErrs = append(allErrs, validateNodeResourceModel(&nodeResourceSlice.NodeResourceModel, nil)...) + return allErrs +} + +func validateNodeResourceModel(model *resource.NodeResourceModel, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + entries := sets.New[string]() + // TODO: implement one structured parameter model + switch len(entries) { + case 0: + // allErrs = append(allErrs, field.Required(fldPath, "exactly one structured model field must be set")) + case 1: + // Okay. + default: + allErrs = append(allErrs, field.Invalid(fldPath, sets.List(entries), "exactly one field must be set, not several")) + } + return allErrs +} + +// ValidateNodeResourceSlice tests if a NodeResourceSlice update is valid. +func ValidateNodeResourceSliceUpdate(nodeResourceSlice, oldNodeResourceSlice *resource.NodeResourceSlice) field.ErrorList { + allErrs := corevalidation.ValidateObjectMetaUpdate(&nodeResourceSlice.ObjectMeta, &oldNodeResourceSlice.ObjectMeta, field.NewPath("metadata")) + allErrs = append(allErrs, ValidateNodeResourceSlice(nodeResourceSlice)...) + allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(nodeResourceSlice.NodeName, oldNodeResourceSlice.NodeName, field.NewPath("nodeName"))...) + allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(nodeResourceSlice.DriverName, oldNodeResourceSlice.DriverName, field.NewPath("driverName"))...) + return allErrs +} + +// ValidateResourceClaimParameters tests if a ResourceClaimParameters object is valid for creation. +func ValidateResourceClaimParameters(parameters *resource.ResourceClaimParameters) field.ErrorList { + return validateResourceClaimParameters(parameters, false) +} + +func validateResourceClaimParameters(parameters *resource.ResourceClaimParameters, requestStored bool) field.ErrorList { + allErrs := corevalidation.ValidateObjectMeta(¶meters.ObjectMeta, true, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) + allErrs = append(allErrs, validateResourceClaimParametersRef(parameters.GeneratedFrom, field.NewPath("generatedFrom"))...) + allErrs = append(allErrs, validateDriverRequests(parameters.DriverRequests, field.NewPath("driverRequests"), requestStored)...) + return allErrs +} + +func validateDriverRequests(requests []resource.DriverRequests, fldPath *field.Path, requestStored bool) field.ErrorList { + var allErrs field.ErrorList + driverNames := sets.New[string]() + for i, request := range requests { + idxPath := fldPath.Index(i) + driverName := request.DriverName + allErrs = append(allErrs, validateResourceDriverName(driverName, idxPath.Child("driverName"))...) + if driverNames.Has(driverName) { + allErrs = append(allErrs, field.Duplicate(idxPath.Child("driverName"), driverName)) + } else { + driverNames.Insert(driverName) + } + allErrs = append(allErrs, validateResourceRequests(request.Requests, idxPath.Child("requests"), requestStored)...) + } + return allErrs +} + +func validateResourceRequests(requests []resource.ResourceRequest, fldPath *field.Path, requestStored bool) field.ErrorList { + var allErrs field.ErrorList + for i, request := range requests { + idxPath := fldPath.Index(i) + allErrs = append(allErrs, validateResourceRequestModel(&request.ResourceRequestModel, idxPath, requestStored)...) + } + if len(requests) == 0 { + // We could allow this, it just doesn't make sense: the entire entry would get ignored and thus + // should have been left out entirely. + allErrs = append(allErrs, field.Required(fldPath, "empty entries with no requests are not allowed")) + } + return allErrs +} + +func validateResourceRequestModel(model *resource.ResourceRequestModel, fldPath *field.Path, requestStored bool) field.ErrorList { + var allErrs field.ErrorList + entries := sets.New[string]() + // TODO: implement one structured parameter model + switch len(entries) { + case 0: + // allErrs = append(allErrs, field.Required(fldPath, "exactly one structured model field must be set")) + case 1: + // Okay. + default: + allErrs = append(allErrs, field.Invalid(fldPath, sets.List(entries), "exactly one field must be set, not several")) + } + return allErrs +} + +// ValidateResourceClaimParameters tests if a ResourceClaimParameters update is valid. +func ValidateResourceClaimParametersUpdate(resourceClaimParameters, oldResourceClaimParameters *resource.ResourceClaimParameters) field.ErrorList { + allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClaimParameters.ObjectMeta, &oldResourceClaimParameters.ObjectMeta, field.NewPath("metadata")) + requestStored := apiequality.Semantic.DeepEqual(oldResourceClaimParameters.DriverRequests, resourceClaimParameters.DriverRequests) + allErrs = append(allErrs, validateResourceClaimParameters(resourceClaimParameters, requestStored)...) + return allErrs +} + +// ValidateResourceClassParameters tests if a ResourceClassParameters object is valid for creation. +func ValidateResourceClassParameters(parameters *resource.ResourceClassParameters) field.ErrorList { + return validateResourceClassParameters(parameters, false) +} + +func validateResourceClassParameters(parameters *resource.ResourceClassParameters, filtersStored bool) field.ErrorList { + allErrs := corevalidation.ValidateObjectMeta(¶meters.ObjectMeta, true, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) + allErrs = append(allErrs, validateClassParameters(parameters.GeneratedFrom, field.NewPath("generatedFrom"))...) + allErrs = append(allErrs, validateResourceFilters(parameters.Filters, field.NewPath("filters"), filtersStored)...) + allErrs = append(allErrs, validateVendorParameters(parameters.VendorParameters, field.NewPath("vendorParameters"))...) + return allErrs +} + +func validateResourceFilters(filters []resource.ResourceFilter, fldPath *field.Path, filtersStored bool) field.ErrorList { + var allErrs field.ErrorList + driverNames := sets.New[string]() + for i, filter := range filters { + idxPath := fldPath.Index(i) + driverName := filter.DriverName + allErrs = append(allErrs, validateResourceDriverName(driverName, idxPath.Child("driverName"))...) + if driverNames.Has(driverName) { + allErrs = append(allErrs, field.Duplicate(idxPath.Child("driverName"), driverName)) + } else { + driverNames.Insert(driverName) + } + allErrs = append(allErrs, validateResourceFilterModel(&filter.ResourceFilterModel, idxPath, filtersStored)...) + } + return allErrs +} + +func validateResourceFilterModel(model *resource.ResourceFilterModel, fldPath *field.Path, filtersStored bool) field.ErrorList { + var allErrs field.ErrorList + entries := sets.New[string]() + // TODO: implement one structured parameter model + switch len(entries) { + case 0: + // allErrs = append(allErrs, field.Required(fldPath, "exactly one structured model field must be set")) + case 1: + // Okay. + default: + allErrs = append(allErrs, field.Invalid(fldPath, sets.List(entries), "exactly one field must be set, not several")) + } + return allErrs +} + +func validateVendorParameters(parameters []resource.VendorParameters, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + driverNames := sets.New[string]() + for i, parameters := range parameters { + idxPath := fldPath.Index(i) + driverName := parameters.DriverName + allErrs = append(allErrs, validateResourceDriverName(driverName, idxPath.Child("driverName"))...) + if driverNames.Has(driverName) { + allErrs = append(allErrs, field.Duplicate(idxPath.Child("driverName"), driverName)) + } else { + driverNames.Insert(driverName) + } + } + return allErrs +} + +// ValidateResourceClassParameters tests if a ResourceClassParameters update is valid. +func ValidateResourceClassParametersUpdate(resourceClassParameters, oldResourceClassParameters *resource.ResourceClassParameters) field.ErrorList { + allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClassParameters.ObjectMeta, &oldResourceClassParameters.ObjectMeta, field.NewPath("metadata")) + allErrs = append(allErrs, ValidateResourceClassParameters(resourceClassParameters)...) + return allErrs +} diff --git a/pkg/apis/resource/validation/validation_noderesourceslice_test.go b/pkg/apis/resource/validation/validation_noderesourceslice_test.go new file mode 100644 index 00000000000..c10cbdf01a9 --- /dev/null +++ b/pkg/apis/resource/validation/validation_noderesourceslice_test.go @@ -0,0 +1,256 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/utils/ptr" +) + +func testNodeResourceSlice(name, nodeName, driverName string) *resource.NodeResourceSlice { + return &resource.NodeResourceSlice{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + }, + NodeName: nodeName, + DriverName: driverName, + NodeResourceModel: resource.NodeResourceModel{ + // TODO: implement one structured parameter model + }, + } +} + +func TestValidateNodeResourceSlice(t *testing.T) { + goodName := "foo" + badName := "!@#$%^" + driverName := "test.example.com" + now := metav1.Now() + badValue := "spaces not allowed" + + scenarios := map[string]struct { + slice *resource.NodeResourceSlice + wantFailures field.ErrorList + }{ + "good": { + slice: testNodeResourceSlice(goodName, goodName, driverName), + }, + "missing-name": { + wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")}, + slice: testNodeResourceSlice("", goodName, driverName), + }, + "bad-name": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + slice: testNodeResourceSlice(badName, goodName, driverName), + }, + "generate-name": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.GenerateName = "prefix-" + return slice + }(), + }, + "uid": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.UID = "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d" + return slice + }(), + }, + "resource-version": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.ResourceVersion = "1" + return slice + }(), + }, + "generation": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.Generation = 100 + return slice + }(), + }, + "creation-timestamp": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.CreationTimestamp = now + return slice + }(), + }, + "deletion-grace-period-seconds": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.DeletionGracePeriodSeconds = ptr.To[int64](10) + return slice + }(), + }, + "owner-references": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.OwnerReferences = []metav1.OwnerReference{ + { + APIVersion: "v1", + Kind: "pod", + Name: "foo", + UID: "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d", + }, + } + return slice + }(), + }, + "finalizers": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.Finalizers = []string{ + "example.com/foo", + } + return slice + }(), + }, + "managed-fields": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.ManagedFields = []metav1.ManagedFieldsEntry{ + { + FieldsType: "FieldsV1", + Operation: "Apply", + APIVersion: "apps/v1", + Manager: "foo", + }, + } + return slice + }(), + }, + "good-labels": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.Labels = map[string]string{ + "apps.kubernetes.io/name": "test", + } + return slice + }(), + }, + "bad-labels": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "labels"), badValue, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')")}, + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.Labels = map[string]string{ + "hello-world": badValue, + } + return slice + }(), + }, + "good-annotations": { + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.Annotations = map[string]string{ + "foo": "bar", + } + return slice + }(), + }, + "bad-annotations": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "annotations"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')")}, + slice: func() *resource.NodeResourceSlice { + slice := testNodeResourceSlice(goodName, goodName, driverName) + slice.Annotations = map[string]string{ + badName: "hello world", + } + return slice + }(), + }, + "bad-nodename": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("nodeName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + slice: testNodeResourceSlice(goodName, badName, driverName), + }, + "bad-drivername": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("driverName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + slice: testNodeResourceSlice(goodName, goodName, badName), + }, + + // TODO: implement one structured parameter model + // "empty-model": { + // wantFailures: field.ErrorList{field.Required(nil, "exactly one structured model field must be set")}, + // slice: func() *resource.NodeResourceSlice { + // slice := testNodeResourceSlice(goodName, goodName, driverName) + // slice.NodeResourceModel = resource.NodeResourceModel{} + // return slice + // }(), + // }, + } + + for name, scenario := range scenarios { + t.Run(name, func(t *testing.T) { + errs := ValidateNodeResourceSlice(scenario.slice) + assert.Equal(t, scenario.wantFailures, errs) + }) + } +} + +func TestValidateNodeResourceSliceUpdate(t *testing.T) { + name := "valid" + validNodeResourceSlice := testNodeResourceSlice(name, name, name) + + scenarios := map[string]struct { + oldNodeResourceSlice *resource.NodeResourceSlice + update func(slice *resource.NodeResourceSlice) *resource.NodeResourceSlice + wantFailures field.ErrorList + }{ + "valid-no-op-update": { + oldNodeResourceSlice: validNodeResourceSlice, + update: func(slice *resource.NodeResourceSlice) *resource.NodeResourceSlice { return slice }, + }, + "invalid-name-update": { + oldNodeResourceSlice: validNodeResourceSlice, + update: func(slice *resource.NodeResourceSlice) *resource.NodeResourceSlice { + slice.Name += "-update" + return slice + }, + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), name+"-update", "field is immutable")}, + }, + "invalid-update-nodename": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("nodeName"), name+"-updated", "field is immutable")}, + oldNodeResourceSlice: validNodeResourceSlice, + update: func(slice *resource.NodeResourceSlice) *resource.NodeResourceSlice { + slice.NodeName += "-updated" + return slice + }, + }, + "invalid-update-drivername": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("driverName"), name+"-updated", "field is immutable")}, + oldNodeResourceSlice: validNodeResourceSlice, + update: func(slice *resource.NodeResourceSlice) *resource.NodeResourceSlice { + slice.DriverName += "-updated" + return slice + }, + }, + } + + for name, scenario := range scenarios { + t.Run(name, func(t *testing.T) { + scenario.oldNodeResourceSlice.ResourceVersion = "1" + errs := ValidateNodeResourceSliceUpdate(scenario.update(scenario.oldNodeResourceSlice.DeepCopy()), scenario.oldNodeResourceSlice) + assert.Equal(t, scenario.wantFailures, errs) + }) + } +} diff --git a/pkg/apis/resource/validation/validation_resourceclaim_test.go b/pkg/apis/resource/validation/validation_resourceclaim_test.go index 962336e3a5d..956377cdbda 100644 --- a/pkg/apis/resource/validation/validation_resourceclaim_test.go +++ b/pkg/apis/resource/validation/validation_resourceclaim_test.go @@ -380,6 +380,81 @@ func TestValidateClaimStatusUpdate(t *testing.T) { return claim }, }, + "valid-add-empty-allocation-structured": { + oldClaim: validClaim, + update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { + claim.Status.DriverName = "valid" + claim.Status.Allocation = &resource.AllocationResult{ + ResourceHandles: []resource.ResourceHandle{ + { + DriverName: "valid", + StructuredData: &resource.StructuredResourceHandle{ + NodeName: "worker", + }, + }, + }, + } + return claim + }, + }, + "invalid-add-allocation-structured": { + wantFailures: field.ErrorList{ + field.Invalid(field.NewPath("status", "allocation", "resourceHandles").Index(0).Child("structuredData", "nodeName"), "", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), + }, + oldClaim: validClaim, + update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { + claim.Status.DriverName = "valid" + claim.Status.Allocation = &resource.AllocationResult{ + ResourceHandles: []resource.ResourceHandle{ + { + DriverName: "valid", + StructuredData: &resource.StructuredResourceHandle{ + Results: []resource.DriverAllocationResult{ + // TODO: empty AllocationResultMode + }, + }, + }, + }, + } + return claim + }, + }, + "valid-add-allocation-structured": { + oldClaim: validClaim, + update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { + claim.Status.DriverName = "valid" + claim.Status.Allocation = &resource.AllocationResult{ + ResourceHandles: []resource.ResourceHandle{ + { + DriverName: "valid", + StructuredData: &resource.StructuredResourceHandle{ + NodeName: "worker", + }, + }, + }, + } + return claim + }, + }, + "invalid-duplicated-data": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("status", "allocation", "resourceHandles").Index(0), nil, "data and structuredData are mutually exclusive")}, + oldClaim: validClaim, + update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { + claim.Status.DriverName = "valid" + claim.Status.Allocation = &resource.AllocationResult{ + ResourceHandles: []resource.ResourceHandle{ + { + DriverName: "valid", + Data: "something", + StructuredData: &resource.StructuredResourceHandle{ + NodeName: "worker", + }, + }, + }, + } + return claim + }, + }, "invalid-allocation-resourceHandles": { wantFailures: field.ErrorList{field.TooLongMaxLength(field.NewPath("status", "allocation", "resourceHandles"), resource.AllocationResultResourceHandlesMaxSize+1, resource.AllocationResultResourceHandlesMaxSize)}, oldClaim: validClaim, @@ -413,7 +488,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) { }, }, "invalid-allocation-resource-handle-data": { - wantFailures: field.ErrorList{field.TooLongMaxLength(field.NewPath("status", "allocation", "resourceHandles[0]", "data"), resource.ResourceHandleDataMaxSize+1, resource.ResourceHandleDataMaxSize)}, + wantFailures: field.ErrorList{field.TooLongMaxLength(field.NewPath("status", "allocation", "resourceHandles").Index(0).Child("data"), resource.ResourceHandleDataMaxSize+1, resource.ResourceHandleDataMaxSize)}, oldClaim: validClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { claim.Status.DriverName = "valid" diff --git a/pkg/apis/resource/validation/validation_resourceclaimparameters_test.go b/pkg/apis/resource/validation/validation_resourceclaimparameters_test.go new file mode 100644 index 00000000000..d38e1246626 --- /dev/null +++ b/pkg/apis/resource/validation/validation_resourceclaimparameters_test.go @@ -0,0 +1,308 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/utils/ptr" +) + +func testResourceClaimParameters(name, namespace string, requests []resource.DriverRequests) *resource.ResourceClaimParameters { + return &resource.ResourceClaimParameters{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + }, + DriverRequests: requests, + } +} + +var goodRequests []resource.DriverRequests + +func TestValidateResourceClaimParameters(t *testing.T) { + goodName := "foo" + badName := "!@#$%^" + badValue := "spaces not allowed" + now := metav1.Now() + + scenarios := map[string]struct { + parameters *resource.ResourceClaimParameters + wantFailures field.ErrorList + }{ + "good": { + parameters: testResourceClaimParameters(goodName, goodName, goodRequests), + }, + "missing-name": { + wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")}, + parameters: testResourceClaimParameters("", goodName, goodRequests), + }, + "missing-namespace": { + wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "namespace"), "")}, + parameters: testResourceClaimParameters(goodName, "", goodRequests), + }, + "bad-name": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + parameters: testResourceClaimParameters(badName, goodName, goodRequests), + }, + "bad-namespace": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "namespace"), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')")}, + parameters: testResourceClaimParameters(goodName, badName, goodRequests), + }, + "generate-name": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.GenerateName = "prefix-" + return parameters + }(), + }, + "uid": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.UID = "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d" + return parameters + }(), + }, + "resource-version": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.ResourceVersion = "1" + return parameters + }(), + }, + "generation": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.Generation = 100 + return parameters + }(), + }, + "creation-timestamp": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.CreationTimestamp = now + return parameters + }(), + }, + "deletion-grace-period-seconds": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.DeletionGracePeriodSeconds = ptr.To[int64](10) + return parameters + }(), + }, + "owner-references": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.OwnerReferences = []metav1.OwnerReference{ + { + APIVersion: "v1", + Kind: "pod", + Name: "foo", + UID: "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d", + }, + } + return parameters + }(), + }, + "finalizers": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.Finalizers = []string{ + "example.com/foo", + } + return parameters + }(), + }, + "managed-fields": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.ManagedFields = []metav1.ManagedFieldsEntry{ + { + FieldsType: "FieldsV1", + Operation: "Apply", + APIVersion: "apps/v1", + Manager: "foo", + }, + } + return parameters + }(), + }, + "good-labels": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.Labels = map[string]string{ + "apps.kubernetes.io/name": "test", + } + return parameters + }(), + }, + "bad-labels": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "labels"), badValue, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')")}, + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.Labels = map[string]string{ + "hello-world": badValue, + } + return parameters + }(), + }, + "good-annotations": { + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.Annotations = map[string]string{ + "foo": "bar", + } + return parameters + }(), + }, + "bad-annotations": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "annotations"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')")}, + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.Annotations = map[string]string{ + badName: "hello world", + } + return parameters + }(), + }, + + // TODO: implement one structured parameter model + // "empty-model": { + // wantFailures: field.ErrorList{field.Required(field.NewPath("driverRequests").Index(0).Child("requests").Index(0), "exactly one structured model field must be set")}, + // parameters: func() *resource.ResourceClaimParameters { + // parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + // parameters.DriverRequests = []resource.DriverRequests{{DriverName: goodName, Requests: []resource.ResourceRequest{{}}}} + // return parameters + // }(), + // }, + + "empty-requests": { + wantFailures: field.ErrorList{field.Required(field.NewPath("driverRequests").Index(0).Child("requests"), "empty entries with no requests are not allowed")}, + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.DriverRequests = []resource.DriverRequests{{DriverName: goodName}} + return parameters + }(), + }, + + "invalid-driver": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("driverRequests").Index(1).Child("driverName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.DriverRequests = []resource.DriverRequests{ + { + DriverName: goodName, + Requests: []resource.ResourceRequest{ + { + ResourceRequestModel: resource.ResourceRequestModel{ + // TODO: implement one structured parameter model + }, + }, + }, + }, + { + DriverName: badName, + Requests: []resource.ResourceRequest{ + { + ResourceRequestModel: resource.ResourceRequestModel{ + // TODO: implement one structured parameter model + }, + }, + }, + }, + } + return parameters + }(), + }, + + "duplicate-driver": { + wantFailures: field.ErrorList{field.Duplicate(field.NewPath("driverRequests").Index(1).Child("driverName"), goodName)}, + parameters: func() *resource.ResourceClaimParameters { + parameters := testResourceClaimParameters(goodName, goodName, goodRequests) + parameters.DriverRequests = []resource.DriverRequests{ + { + DriverName: goodName, + Requests: []resource.ResourceRequest{ + { + ResourceRequestModel: resource.ResourceRequestModel{ + // TODO: implement one structured parameter model + + }, + }, + }, + }, + { + DriverName: goodName, + Requests: []resource.ResourceRequest{ + { + ResourceRequestModel: resource.ResourceRequestModel{ + // TODO: implement one structured parameter model + }, + }, + }, + }, + } + return parameters + }(), + }, + } + + for name, scenario := range scenarios { + t.Run(name, func(t *testing.T) { + errs := ValidateResourceClaimParameters(scenario.parameters) + assert.Equal(t, scenario.wantFailures, errs) + }) + } +} + +func TestValidateResourceClaimParametersUpdate(t *testing.T) { + name := "valid" + validResourceClaimParameters := testResourceClaimParameters(name, name, nil) + + scenarios := map[string]struct { + oldResourceClaimParameters *resource.ResourceClaimParameters + update func(claim *resource.ResourceClaimParameters) *resource.ResourceClaimParameters + wantFailures field.ErrorList + }{ + "valid-no-op-update": { + oldResourceClaimParameters: validResourceClaimParameters, + update: func(claim *resource.ResourceClaimParameters) *resource.ResourceClaimParameters { return claim }, + }, + "invalid-name-update": { + oldResourceClaimParameters: validResourceClaimParameters, + update: func(claim *resource.ResourceClaimParameters) *resource.ResourceClaimParameters { + claim.Name += "-update" + return claim + }, + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), name+"-update", "field is immutable")}, + }, + } + + for name, scenario := range scenarios { + t.Run(name, func(t *testing.T) { + scenario.oldResourceClaimParameters.ResourceVersion = "1" + errs := ValidateResourceClaimParametersUpdate(scenario.update(scenario.oldResourceClaimParameters.DeepCopy()), scenario.oldResourceClaimParameters) + assert.Equal(t, scenario.wantFailures, errs) + }) + } +} diff --git a/pkg/apis/resource/validation/validation_resourceclassparameters_test.go b/pkg/apis/resource/validation/validation_resourceclassparameters_test.go new file mode 100644 index 00000000000..c828196f865 --- /dev/null +++ b/pkg/apis/resource/validation/validation_resourceclassparameters_test.go @@ -0,0 +1,312 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/utils/ptr" +) + +func testResourceClassParameters(name, namespace string, filters []resource.ResourceFilter) *resource.ResourceClassParameters { + return &resource.ResourceClassParameters{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + }, + Filters: filters, + } +} + +var goodFilters []resource.ResourceFilter + +func TestValidateResourceClassParameters(t *testing.T) { + goodName := "foo" + badName := "!@#$%^" + badValue := "spaces not allowed" + now := metav1.Now() + + scenarios := map[string]struct { + parameters *resource.ResourceClassParameters + wantFailures field.ErrorList + }{ + "good": { + parameters: testResourceClassParameters(goodName, goodName, goodFilters), + }, + "missing-name": { + wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")}, + parameters: testResourceClassParameters("", goodName, goodFilters), + }, + "missing-namespace": { + wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "namespace"), "")}, + parameters: testResourceClassParameters(goodName, "", goodFilters), + }, + "bad-name": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + parameters: testResourceClassParameters(badName, goodName, goodFilters), + }, + "bad-namespace": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "namespace"), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')")}, + parameters: testResourceClassParameters(goodName, badName, goodFilters), + }, + "generate-name": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.GenerateName = "prefix-" + return parameters + }(), + }, + "uid": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.UID = "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d" + return parameters + }(), + }, + "resource-version": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.ResourceVersion = "1" + return parameters + }(), + }, + "generation": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.Generation = 100 + return parameters + }(), + }, + "creation-timestamp": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.CreationTimestamp = now + return parameters + }(), + }, + "deletion-grace-period-seconds": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.DeletionGracePeriodSeconds = ptr.To[int64](10) + return parameters + }(), + }, + "owner-references": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.OwnerReferences = []metav1.OwnerReference{ + { + APIVersion: "v1", + Kind: "pod", + Name: "foo", + UID: "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d", + }, + } + return parameters + }(), + }, + "finalizers": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.Finalizers = []string{ + "example.com/foo", + } + return parameters + }(), + }, + "managed-fields": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.ManagedFields = []metav1.ManagedFieldsEntry{ + { + FieldsType: "FieldsV1", + Operation: "Apply", + APIVersion: "apps/v1", + Manager: "foo", + }, + } + return parameters + }(), + }, + "good-labels": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.Labels = map[string]string{ + "apps.kubernetes.io/name": "test", + } + return parameters + }(), + }, + "bad-labels": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "labels"), badValue, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')")}, + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.Labels = map[string]string{ + "hello-world": badValue, + } + return parameters + }(), + }, + "good-annotations": { + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.Annotations = map[string]string{ + "foo": "bar", + } + return parameters + }(), + }, + "bad-annotations": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "annotations"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')")}, + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.Annotations = map[string]string{ + badName: "hello world", + } + return parameters + }(), + }, + + // TODO: implement one structured parameter model + // "empty-model": { + // wantFailures: field.ErrorList{field.Required(field.NewPath("filters").Index(0), "exactly one structured model field must be set")}, + // parameters: func() *resource.ResourceClassParameters { + // parameters := testResourceClassParameters(goodName, goodName, goodFilters) + // parameters.Filters = []resource.ResourceFilter{{DriverName: goodName}} + // return parameters + // }(), + // }, + + "filters-invalid-driver": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("filters").Index(1).Child("driverName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.Filters = []resource.ResourceFilter{ + { + DriverName: goodName, + ResourceFilterModel: resource.ResourceFilterModel{ + // TODO: implement one structured parameter model + }, + }, + { + DriverName: badName, + ResourceFilterModel: resource.ResourceFilterModel{ + // TODO: implement one structured parameter model + }, + }, + } + return parameters + }(), + }, + + "filters-duplicate-driver": { + wantFailures: field.ErrorList{field.Duplicate(field.NewPath("filters").Index(1).Child("driverName"), goodName)}, + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.Filters = []resource.ResourceFilter{ + { + DriverName: goodName, + ResourceFilterModel: resource.ResourceFilterModel{ + // TODO: implement one structured parameter model + }, + }, + { + DriverName: goodName, + ResourceFilterModel: resource.ResourceFilterModel{}, + }, + } + return parameters + }(), + }, + + "parameters-invalid-driver": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("vendorParameters").Index(1).Child("driverName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.VendorParameters = []resource.VendorParameters{ + { + DriverName: goodName, + }, + { + DriverName: badName, + }, + } + return parameters + }(), + }, + + "parameters-duplicate-driver": { + wantFailures: field.ErrorList{field.Duplicate(field.NewPath("vendorParameters").Index(1).Child("driverName"), goodName)}, + parameters: func() *resource.ResourceClassParameters { + parameters := testResourceClassParameters(goodName, goodName, goodFilters) + parameters.VendorParameters = []resource.VendorParameters{ + { + DriverName: goodName, + }, + { + DriverName: goodName, + }, + } + return parameters + }(), + }, + } + + for name, scenario := range scenarios { + t.Run(name, func(t *testing.T) { + errs := ValidateResourceClassParameters(scenario.parameters) + assert.Equal(t, scenario.wantFailures, errs) + }) + } +} + +func TestValidateResourceClassParametersUpdate(t *testing.T) { + name := "valid" + validResourceClassParameters := testResourceClassParameters(name, name, nil) + + scenarios := map[string]struct { + oldResourceClassParameters *resource.ResourceClassParameters + update func(class *resource.ResourceClassParameters) *resource.ResourceClassParameters + wantFailures field.ErrorList + }{ + "valid-no-op-update": { + oldResourceClassParameters: validResourceClassParameters, + update: func(class *resource.ResourceClassParameters) *resource.ResourceClassParameters { return class }, + }, + "invalid-name-update": { + oldResourceClassParameters: validResourceClassParameters, + update: func(class *resource.ResourceClassParameters) *resource.ResourceClassParameters { + class.Name += "-update" + return class + }, + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), name+"-update", "field is immutable")}, + }, + } + + for name, scenario := range scenarios { + t.Run(name, func(t *testing.T) { + scenario.oldResourceClassParameters.ResourceVersion = "1" + errs := ValidateResourceClassParametersUpdate(scenario.update(scenario.oldResourceClassParameters.DeepCopy()), scenario.oldResourceClassParameters) + assert.Equal(t, scenario.wantFailures, errs) + }) + } +} diff --git a/pkg/apis/resource/zz_generated.deepcopy.go b/pkg/apis/resource/zz_generated.deepcopy.go index e50a188b5f2..24114076648 100644 --- a/pkg/apis/resource/zz_generated.deepcopy.go +++ b/pkg/apis/resource/zz_generated.deepcopy.go @@ -32,7 +32,9 @@ func (in *AllocationResult) DeepCopyInto(out *AllocationResult) { if in.ResourceHandles != nil { in, out := &in.ResourceHandles, &out.ResourceHandles *out = make([]ResourceHandle, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.AvailableOnNodes != nil { in, out := &in.AvailableOnNodes, &out.AvailableOnNodes @@ -52,6 +54,144 @@ func (in *AllocationResult) DeepCopy() *AllocationResult { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocationResultModel) DeepCopyInto(out *AllocationResultModel) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResultModel. +func (in *AllocationResultModel) DeepCopy() *AllocationResultModel { + if in == nil { + return nil + } + out := new(AllocationResultModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DriverAllocationResult) DeepCopyInto(out *DriverAllocationResult) { + *out = *in + if in.VendorRequestParameters != nil { + out.VendorRequestParameters = in.VendorRequestParameters.DeepCopyObject() + } + out.AllocationResultModel = in.AllocationResultModel + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverAllocationResult. +func (in *DriverAllocationResult) DeepCopy() *DriverAllocationResult { + if in == nil { + return nil + } + out := new(DriverAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DriverRequests) DeepCopyInto(out *DriverRequests) { + *out = *in + if in.VendorParameters != nil { + out.VendorParameters = in.VendorParameters.DeepCopyObject() + } + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]ResourceRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverRequests. +func (in *DriverRequests) DeepCopy() *DriverRequests { + if in == nil { + return nil + } + out := new(DriverRequests) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourceModel) DeepCopyInto(out *NodeResourceModel) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourceModel. +func (in *NodeResourceModel) DeepCopy() *NodeResourceModel { + if in == nil { + return nil + } + out := new(NodeResourceModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourceSlice) DeepCopyInto(out *NodeResourceSlice) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.NodeResourceModel = in.NodeResourceModel + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourceSlice. +func (in *NodeResourceSlice) DeepCopy() *NodeResourceSlice { + if in == nil { + return nil + } + out := new(NodeResourceSlice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourceSlice) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourceSliceList) DeepCopyInto(out *NodeResourceSliceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NodeResourceSlice, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourceSliceList. +func (in *NodeResourceSliceList) DeepCopy() *NodeResourceSliceList { + if in == nil { + return nil + } + out := new(NodeResourceSliceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourceSliceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodSchedulingContext) DeepCopyInto(out *PodSchedulingContext) { *out = *in @@ -234,6 +374,77 @@ func (in *ResourceClaimList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimParameters) DeepCopyInto(out *ResourceClaimParameters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.GeneratedFrom != nil { + in, out := &in.GeneratedFrom, &out.GeneratedFrom + *out = new(ResourceClaimParametersReference) + **out = **in + } + if in.DriverRequests != nil { + in, out := &in.DriverRequests, &out.DriverRequests + *out = make([]DriverRequests, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParameters. +func (in *ResourceClaimParameters) DeepCopy() *ResourceClaimParameters { + if in == nil { + return nil + } + out := new(ResourceClaimParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimParameters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimParametersList) DeepCopyInto(out *ResourceClaimParametersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClaimParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersList. +func (in *ResourceClaimParametersList) DeepCopy() *ResourceClaimParametersList { + if in == nil { + return nil + } + out := new(ResourceClaimParametersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimParametersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceClaimParametersReference) DeepCopyInto(out *ResourceClaimParametersReference) { *out = *in @@ -411,6 +622,11 @@ func (in *ResourceClass) DeepCopyInto(out *ResourceClass) { *out = new(core.NodeSelector) (*in).DeepCopyInto(*out) } + if in.StructuredParameters != nil { + in, out := &in.StructuredParameters, &out.StructuredParameters + *out = new(bool) + **out = **in + } return } @@ -465,6 +681,82 @@ func (in *ResourceClassList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClassParameters) DeepCopyInto(out *ResourceClassParameters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.GeneratedFrom != nil { + in, out := &in.GeneratedFrom, &out.GeneratedFrom + *out = new(ResourceClassParametersReference) + **out = **in + } + if in.VendorParameters != nil { + in, out := &in.VendorParameters, &out.VendorParameters + *out = make([]VendorParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = make([]ResourceFilter, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParameters. +func (in *ResourceClassParameters) DeepCopy() *ResourceClassParameters { + if in == nil { + return nil + } + out := new(ResourceClassParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClassParameters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClassParametersList) DeepCopyInto(out *ResourceClassParametersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClassParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersList. +func (in *ResourceClassParametersList) DeepCopy() *ResourceClassParametersList { + if in == nil { + return nil + } + out := new(ResourceClassParametersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClassParametersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceClassParametersReference) DeepCopyInto(out *ResourceClassParametersReference) { *out = *in @@ -481,9 +773,47 @@ func (in *ResourceClassParametersReference) DeepCopy() *ResourceClassParametersR return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceFilter) DeepCopyInto(out *ResourceFilter) { + *out = *in + out.ResourceFilterModel = in.ResourceFilterModel + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilter. +func (in *ResourceFilter) DeepCopy() *ResourceFilter { + if in == nil { + return nil + } + out := new(ResourceFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceFilterModel) DeepCopyInto(out *ResourceFilterModel) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilterModel. +func (in *ResourceFilterModel) DeepCopy() *ResourceFilterModel { + if in == nil { + return nil + } + out := new(ResourceFilterModel) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceHandle) DeepCopyInto(out *ResourceHandle) { *out = *in + if in.StructuredData != nil { + in, out := &in.StructuredData, &out.StructuredData + *out = new(StructuredResourceHandle) + (*in).DeepCopyInto(*out) + } return } @@ -496,3 +826,87 @@ func (in *ResourceHandle) DeepCopy() *ResourceHandle { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest) { + *out = *in + if in.VendorParameters != nil { + out.VendorParameters = in.VendorParameters.DeepCopyObject() + } + out.ResourceRequestModel = in.ResourceRequestModel + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest. +func (in *ResourceRequest) DeepCopy() *ResourceRequest { + if in == nil { + return nil + } + out := new(ResourceRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequestModel) DeepCopyInto(out *ResourceRequestModel) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequestModel. +func (in *ResourceRequestModel) DeepCopy() *ResourceRequestModel { + if in == nil { + return nil + } + out := new(ResourceRequestModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StructuredResourceHandle) DeepCopyInto(out *StructuredResourceHandle) { + *out = *in + if in.VendorClassParameters != nil { + out.VendorClassParameters = in.VendorClassParameters.DeepCopyObject() + } + if in.VendorClaimParameters != nil { + out.VendorClaimParameters = in.VendorClaimParameters.DeepCopyObject() + } + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]DriverAllocationResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StructuredResourceHandle. +func (in *StructuredResourceHandle) DeepCopy() *StructuredResourceHandle { + if in == nil { + return nil + } + out := new(StructuredResourceHandle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VendorParameters) DeepCopyInto(out *VendorParameters) { + *out = *in + if in.Parameters != nil { + out.Parameters = in.Parameters.DeepCopyObject() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VendorParameters. +func (in *VendorParameters) DeepCopy() *VendorParameters { + if in == nil { + return nil + } + out := new(VendorParameters) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index ff8edb86e5a..4f6614f9ddc 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -868,6 +868,12 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref), "k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref), "k8s.io/api/resource/v1alpha2.AllocationResult": schema_k8sio_api_resource_v1alpha2_AllocationResult(ref), + "k8s.io/api/resource/v1alpha2.AllocationResultModel": schema_k8sio_api_resource_v1alpha2_AllocationResultModel(ref), + "k8s.io/api/resource/v1alpha2.DriverAllocationResult": schema_k8sio_api_resource_v1alpha2_DriverAllocationResult(ref), + "k8s.io/api/resource/v1alpha2.DriverRequests": schema_k8sio_api_resource_v1alpha2_DriverRequests(ref), + "k8s.io/api/resource/v1alpha2.NodeResourceModel": schema_k8sio_api_resource_v1alpha2_NodeResourceModel(ref), + "k8s.io/api/resource/v1alpha2.NodeResourceSlice": schema_k8sio_api_resource_v1alpha2_NodeResourceSlice(ref), + "k8s.io/api/resource/v1alpha2.NodeResourceSliceList": schema_k8sio_api_resource_v1alpha2_NodeResourceSliceList(ref), "k8s.io/api/resource/v1alpha2.PodSchedulingContext": schema_k8sio_api_resource_v1alpha2_PodSchedulingContext(ref), "k8s.io/api/resource/v1alpha2.PodSchedulingContextList": schema_k8sio_api_resource_v1alpha2_PodSchedulingContextList(ref), "k8s.io/api/resource/v1alpha2.PodSchedulingContextSpec": schema_k8sio_api_resource_v1alpha2_PodSchedulingContextSpec(ref), @@ -875,6 +881,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/resource/v1alpha2.ResourceClaim": schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1alpha2_ResourceClaimConsumerReference(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimList": schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref), + "k8s.io/api/resource/v1alpha2.ResourceClaimParameters": schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref), + "k8s.io/api/resource/v1alpha2.ResourceClaimParametersList": schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersList(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference": schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersReference(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimSchedulingStatus": schema_k8sio_api_resource_v1alpha2_ResourceClaimSchedulingStatus(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimSpec": schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref), @@ -884,8 +892,16 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/resource/v1alpha2.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref), "k8s.io/api/resource/v1alpha2.ResourceClass": schema_k8sio_api_resource_v1alpha2_ResourceClass(ref), "k8s.io/api/resource/v1alpha2.ResourceClassList": schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref), + "k8s.io/api/resource/v1alpha2.ResourceClassParameters": schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref), + "k8s.io/api/resource/v1alpha2.ResourceClassParametersList": schema_k8sio_api_resource_v1alpha2_ResourceClassParametersList(ref), "k8s.io/api/resource/v1alpha2.ResourceClassParametersReference": schema_k8sio_api_resource_v1alpha2_ResourceClassParametersReference(ref), + "k8s.io/api/resource/v1alpha2.ResourceFilter": schema_k8sio_api_resource_v1alpha2_ResourceFilter(ref), + "k8s.io/api/resource/v1alpha2.ResourceFilterModel": schema_k8sio_api_resource_v1alpha2_ResourceFilterModel(ref), "k8s.io/api/resource/v1alpha2.ResourceHandle": schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref), + "k8s.io/api/resource/v1alpha2.ResourceRequest": schema_k8sio_api_resource_v1alpha2_ResourceRequest(ref), + "k8s.io/api/resource/v1alpha2.ResourceRequestModel": schema_k8sio_api_resource_v1alpha2_ResourceRequestModel(ref), + "k8s.io/api/resource/v1alpha2.StructuredResourceHandle": schema_k8sio_api_resource_v1alpha2_StructuredResourceHandle(ref), + "k8s.io/api/resource/v1alpha2.VendorParameters": schema_k8sio_api_resource_v1alpha2_VendorParameters(ref), "k8s.io/api/scheduling/v1.PriorityClass": schema_k8sio_api_scheduling_v1_PriorityClass(ref), "k8s.io/api/scheduling/v1.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref), "k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), @@ -44711,6 +44727,200 @@ func schema_k8sio_api_resource_v1alpha2_AllocationResult(ref common.ReferenceCal } } +func schema_k8sio_api_resource_v1alpha2_AllocationResultModel(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllocationResultModel must have one and only one field set.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_k8sio_api_resource_v1alpha2_DriverAllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DriverAllocationResult contains vendor parameters and the allocation result for one request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "vendorRequestParameters": { + SchemaProps: spec.SchemaProps{ + Description: "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_api_resource_v1alpha2_DriverRequests(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DriverRequests describes all resources that are needed from one particular driver.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driverName": { + SchemaProps: spec.SchemaProps{ + Description: "DriverName is the name used by the DRA driver kubelet plugin.", + Type: []string{"string"}, + Format: "", + }, + }, + "vendorParameters": { + SchemaProps: spec.SchemaProps{ + Description: "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + "requests": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Requests describes all resources that are needed from the driver.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha2.ResourceRequest"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha2.ResourceRequest", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_api_resource_v1alpha2_NodeResourceModel(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeResourceModel must have one and only one field set.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_k8sio_api_resource_v1alpha2_NodeResourceSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeResourceSlice provides information about available resources on individual nodes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "NodeName identifies the node where the capacity is available. A field selector can be used to list only NodeResourceSlice objects with a certain node name.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "driverName": { + SchemaProps: spec.SchemaProps{ + Description: "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only NodeResourceSlice objects with a certain driver name.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"nodeName", "driverName"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_resource_v1alpha2_NodeResourceSliceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeResourceSliceList is a collection of NodeResourceSlices.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of node resource capacity objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha2.NodeResourceSlice"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha2.NodeResourceSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + func schema_k8sio_api_resource_v1alpha2_PodSchedulingContext(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -45037,6 +45247,125 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref common.ReferenceCa } } +func schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "generatedFrom": { + SchemaProps: spec.SchemaProps{ + Description: "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the claim parameters when the parameter reference of the claim refers to some unknown type.", + Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"), + }, + }, + "shareable": { + SchemaProps: spec.SchemaProps{ + Description: "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "driverRequests": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha2.DriverRequests"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha2.DriverRequests", "k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceClaimParametersList is a collection of ResourceClaimParameters.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of node resource capacity objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParameters"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha2.ResourceClaimParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -45383,6 +45712,13 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClass(ref common.ReferenceCallba Ref: ref("k8s.io/api/core/v1.NodeSelector"), }, }, + "structuredParameters": { + SchemaProps: spec.SchemaProps{ + Description: "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"driverName"}, }, @@ -45443,6 +45779,137 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref common.ReferenceCa } } +func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "generatedFrom": { + SchemaProps: spec.SchemaProps{ + Description: "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the class parameters when the parameter reference of the class refers to some unknown type.", + Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClassParametersReference"), + }, + }, + "vendorParameters": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha2.VendorParameters"), + }, + }, + }, + }, + }, + "filters": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Filters describes additional contraints that must be met when using the class.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha2.ResourceFilter"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha2.ResourceClassParametersReference", "k8s.io/api/resource/v1alpha2.ResourceFilter", "k8s.io/api/resource/v1alpha2.VendorParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceClassParametersList is a collection of ResourceClassParameters.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of node resource capacity objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClassParameters"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha2.ResourceClassParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -45487,6 +45954,37 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersReference(ref com } } +func schema_k8sio_api_resource_v1alpha2_ResourceFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceFilter is a filter for resources from one particular driver.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driverName": { + SchemaProps: spec.SchemaProps{ + Description: "DriverName is the name used by the DRA driver kubelet plugin.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_resource_v1alpha2_ResourceFilterModel(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceFilterModel must have one and only one field set.", + Type: []string{"object"}, + }, + }, + } +} + func schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -45508,9 +46006,132 @@ func schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref common.ReferenceCallb Format: "", }, }, + "structuredData": { + SchemaProps: spec.SchemaProps{ + Description: "If StructuredData is set, then it needs to be used instead of Data.", + Ref: ref("k8s.io/api/resource/v1alpha2.StructuredResourceHandle"), + }, + }, }, }, }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha2.StructuredResourceHandle"}, + } +} + +func schema_k8sio_api_resource_v1alpha2_ResourceRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceRequest is a request for resources from one particular driver.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "vendorParameters": { + SchemaProps: spec.SchemaProps{ + Description: "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_api_resource_v1alpha2_ResourceRequestModel(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceRequestModel must have one and only one field set.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_k8sio_api_resource_v1alpha2_StructuredResourceHandle(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StructuredResourceHandle is the in-tree representation of the allocation result.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "vendorClassParameters": { + SchemaProps: spec.SchemaProps{ + Description: "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + "vendorClaimParameters": { + SchemaProps: spec.SchemaProps{ + Description: "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "NodeName is the name of the node providing the necessary resources.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "results": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Results lists all allocated driver resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha2.DriverAllocationResult"), + }, + }, + }, + }, + }, + }, + Required: []string{"nodeName", "results"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha2.DriverAllocationResult", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_api_resource_v1alpha2_VendorParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VendorParameters are opaque parameters for one particular driver.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driverName": { + SchemaProps: spec.SchemaProps{ + Description: "DriverName is the name used by the DRA driver kubelet plugin.", + Type: []string{"string"}, + Format: "", + }, + }, + "parameters": { + SchemaProps: spec.SchemaProps{ + Description: "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index 15b27f73b92..6dbc72061d7 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -656,6 +656,31 @@ func AddHandlers(h printers.PrintHandler) { _ = h.TableHandler(podSchedulingCtxColumnDefinitions, printPodSchedulingContext) _ = h.TableHandler(podSchedulingCtxColumnDefinitions, printPodSchedulingContextList) + resourceClaimParametersColumnDefinitions := []metav1.TableColumnDefinition{ + {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, + {Name: "GeneratedFrom", Type: "string", Description: resourcev1alpha2.ResourceClaimParameters{}.SwaggerDoc()["generatedFrom"]}, + {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, + } + _ = h.TableHandler(resourceClaimParametersColumnDefinitions, printResourceClaimParameters) + _ = h.TableHandler(resourceClaimParametersColumnDefinitions, printResourceClaimParametersList) + + resourceClassParametersColumnDefinitions := []metav1.TableColumnDefinition{ + {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, + {Name: "GeneratedFrom", Type: "string", Description: resourcev1alpha2.ResourceClassParameters{}.SwaggerDoc()["generatedFrom"]}, + {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, + } + _ = h.TableHandler(resourceClassParametersColumnDefinitions, printResourceClassParameters) + _ = h.TableHandler(resourceClassParametersColumnDefinitions, printResourceClassParametersList) + + nodeResourceCapacityColumnDefinitions := []metav1.TableColumnDefinition{ + {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, + {Name: "Node", Type: "string", Description: resourcev1alpha2.NodeResourceSlice{}.SwaggerDoc()["nodeName"]}, + {Name: "Driver", Type: "string", Description: resourcev1alpha2.NodeResourceSlice{}.SwaggerDoc()["driverName"]}, + {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, + } + _ = h.TableHandler(nodeResourceCapacityColumnDefinitions, printNodeResourceSlice) + _ = h.TableHandler(nodeResourceCapacityColumnDefinitions, printNodeResourceSliceList) + serviceCIDRColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "CIDRs", Type: "string", Description: networkingv1alpha1.ServiceCIDRSpec{}.SwaggerDoc()["cidrs"]}, @@ -3046,6 +3071,77 @@ func printPodSchedulingContextList(list *resource.PodSchedulingContextList, opti return rows, nil } +func printResourceClaimParameters(obj *resource.ResourceClaimParameters, options printers.GenerateOptions) ([]metav1.TableRow, error) { + row := metav1.TableRow{ + Object: runtime.RawExtension{Object: obj}, + } + generatedFrom := "" + if obj.GeneratedFrom != nil { + generatedFrom = fmt.Sprintf("%s.%s %s", obj.GeneratedFrom.Kind, obj.GeneratedFrom.APIGroup, obj.GeneratedFrom.Name) + } + row.Cells = append(row.Cells, obj.Name, generatedFrom, translateTimestampSince(obj.CreationTimestamp)) + + return []metav1.TableRow{row}, nil +} + +func printResourceClaimParametersList(list *resource.ResourceClaimParametersList, options printers.GenerateOptions) ([]metav1.TableRow, error) { + rows := make([]metav1.TableRow, 0, len(list.Items)) + for i := range list.Items { + r, err := printResourceClaimParameters(&list.Items[i], options) + if err != nil { + return nil, err + } + rows = append(rows, r...) + } + return rows, nil +} + +func printResourceClassParameters(obj *resource.ResourceClassParameters, options printers.GenerateOptions) ([]metav1.TableRow, error) { + row := metav1.TableRow{ + Object: runtime.RawExtension{Object: obj}, + } + generatedFrom := "" + if obj.GeneratedFrom != nil { + generatedFrom = fmt.Sprintf("%s.%s %s", obj.GeneratedFrom.Kind, obj.GeneratedFrom.APIGroup, obj.GeneratedFrom.Name) + } + row.Cells = append(row.Cells, obj.Name, generatedFrom, translateTimestampSince(obj.CreationTimestamp)) + + return []metav1.TableRow{row}, nil +} + +func printResourceClassParametersList(list *resource.ResourceClassParametersList, options printers.GenerateOptions) ([]metav1.TableRow, error) { + rows := make([]metav1.TableRow, 0, len(list.Items)) + for i := range list.Items { + r, err := printResourceClassParameters(&list.Items[i], options) + if err != nil { + return nil, err + } + rows = append(rows, r...) + } + return rows, nil +} + +func printNodeResourceSlice(obj *resource.NodeResourceSlice, options printers.GenerateOptions) ([]metav1.TableRow, error) { + row := metav1.TableRow{ + Object: runtime.RawExtension{Object: obj}, + } + row.Cells = append(row.Cells, obj.Name, obj.NodeName, obj.DriverName, translateTimestampSince(obj.CreationTimestamp)) + + return []metav1.TableRow{row}, nil +} + +func printNodeResourceSliceList(list *resource.NodeResourceSliceList, options printers.GenerateOptions) ([]metav1.TableRow, error) { + rows := make([]metav1.TableRow, 0, len(list.Items)) + for i := range list.Items { + r, err := printNodeResourceSlice(&list.Items[i], options) + if err != nil { + return nil, err + } + rows = append(rows, r...) + } + return rows, nil +} + func printBoolPtr(value *bool) string { if value != nil { return printBool(*value) diff --git a/pkg/registry/resource/noderesourceslice/storage/storage.go b/pkg/registry/resource/noderesourceslice/storage/storage.go new file mode 100644 index 00000000000..b6f16d97a60 --- /dev/null +++ b/pkg/registry/resource/noderesourceslice/storage/storage.go @@ -0,0 +1,62 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package storage + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/generic" + genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/kubernetes/pkg/printers" + printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" + printerstorage "k8s.io/kubernetes/pkg/printers/storage" + "k8s.io/kubernetes/pkg/registry/resource/noderesourceslice" +) + +// REST implements a RESTStorage for NodeResourceSlice. +type REST struct { + *genericregistry.Store +} + +// NewREST returns a RESTStorage object that will work against NodeResourceSlice. +func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { + store := &genericregistry.Store{ + NewFunc: func() runtime.Object { return &resource.NodeResourceSlice{} }, + NewListFunc: func() runtime.Object { return &resource.NodeResourceSliceList{} }, + PredicateFunc: noderesourceslice.Match, + DefaultQualifiedResource: resource.Resource("noderesourceslices"), + SingularQualifiedResource: resource.Resource("noderesourceslice"), + + CreateStrategy: noderesourceslice.Strategy, + UpdateStrategy: noderesourceslice.Strategy, + DeleteStrategy: noderesourceslice.Strategy, + ReturnDeletedObject: true, + + TableConvertor: printerstorage.TableConvertor{TableGenerator: printers.NewTableGenerator().With(printersinternal.AddHandlers)}, + } + options := &generic.StoreOptions{ + RESTOptions: optsGetter, + AttrFunc: noderesourceslice.GetAttrs, + TriggerFunc: noderesourceslice.TriggerFunc, + Indexers: noderesourceslice.Indexers(), + } + if err := store.CompleteWithOptions(options); err != nil { + return nil, err + } + + return &REST{store}, nil +} diff --git a/pkg/registry/resource/noderesourceslice/storage/storage_test.go b/pkg/registry/resource/noderesourceslice/storage/storage_test.go new file mode 100644 index 00000000000..c4ef982b430 --- /dev/null +++ b/pkg/registry/resource/noderesourceslice/storage/storage_test.go @@ -0,0 +1,146 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package storage + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/generic" + genericregistrytest "k8s.io/apiserver/pkg/registry/generic/testing" + etcd3testing "k8s.io/apiserver/pkg/storage/etcd3/testing" + "k8s.io/kubernetes/pkg/apis/resource" + _ "k8s.io/kubernetes/pkg/apis/resource/install" + "k8s.io/kubernetes/pkg/registry/registrytest" +) + +func newStorage(t *testing.T) (*REST, *etcd3testing.EtcdTestServer) { + etcdStorage, server := registrytest.NewEtcdStorage(t, resource.GroupName) + restOptions := generic.RESTOptions{ + StorageConfig: etcdStorage, + Decorator: generic.UndecoratedStorage, + DeleteCollectionWorkers: 1, + ResourcePrefix: "noderesourceslices", + } + resourceClassStorage, err := NewREST(restOptions) + if err != nil { + t.Fatalf("unexpected error from REST storage: %v", err) + } + return resourceClassStorage, server +} + +func validNewNodeResourceSlice(name string) *resource.NodeResourceSlice { + return &resource.NodeResourceSlice{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + }, + NodeName: name, + DriverName: "cdi.example.com", + } +} + +func TestCreate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store).ClusterScope() + resourceClass := validNewNodeResourceSlice("foo") + resourceClass.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} + test.TestCreate( + // valid + resourceClass, + // invalid + &resource.NodeResourceSlice{ + ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, + }, + ) +} + +func TestUpdate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store).ClusterScope() + test.TestUpdate( + // valid + validNewNodeResourceSlice("foo"), + // updateFunc + func(obj runtime.Object) runtime.Object { + object := obj.(*resource.NodeResourceSlice) + object.Labels = map[string]string{"foo": "bar"} + return object + }, + // invalid update + func(obj runtime.Object) runtime.Object { + object := obj.(*resource.NodeResourceSlice) + object.DriverName = "" + return object + }, + ) + +} + +func TestDelete(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store).ClusterScope().ReturnDeletedObject() + test.TestDelete(validNewNodeResourceSlice("foo")) +} + +func TestGet(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store).ClusterScope() + test.TestGet(validNewNodeResourceSlice("foo")) +} + +func TestList(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store).ClusterScope() + test.TestList(validNewNodeResourceSlice("foo")) +} + +func TestWatch(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store).ClusterScope() + test.TestWatch( + validNewNodeResourceSlice("foo"), + // matching labels + []labels.Set{}, + // not matching labels + []labels.Set{ + {"foo": "bar"}, + }, + // matching fields + []fields.Set{ + {"metadata.name": "foo"}, + }, + // not matching fields + []fields.Set{ + {"metadata.name": "bar"}, + }, + ) +} diff --git a/pkg/registry/resource/noderesourceslice/strategy.go b/pkg/registry/resource/noderesourceslice/strategy.go new file mode 100644 index 00000000000..3f6ec715669 --- /dev/null +++ b/pkg/registry/resource/noderesourceslice/strategy.go @@ -0,0 +1,139 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package noderesourceslice + +import ( + "context" + "fmt" + + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/storage" + "k8s.io/apiserver/pkg/storage/names" + "k8s.io/client-go/tools/cache" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/kubernetes/pkg/apis/resource/validation" +) + +// nodeResourceSliceStrategy implements behavior for NodeResourceSlice objects +type nodeResourceSliceStrategy struct { + runtime.ObjectTyper + names.NameGenerator +} + +var Strategy = nodeResourceSliceStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} + +func (nodeResourceSliceStrategy) NamespaceScoped() bool { + return false +} + +func (nodeResourceSliceStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { +} + +func (nodeResourceSliceStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { + slice := obj.(*resource.NodeResourceSlice) + return validation.ValidateNodeResourceSlice(slice) +} + +func (nodeResourceSliceStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { + return nil +} + +func (nodeResourceSliceStrategy) Canonicalize(obj runtime.Object) { +} + +func (nodeResourceSliceStrategy) AllowCreateOnUpdate() bool { + return false +} + +func (nodeResourceSliceStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { +} + +func (nodeResourceSliceStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + return validation.ValidateNodeResourceSliceUpdate(obj.(*resource.NodeResourceSlice), old.(*resource.NodeResourceSlice)) +} + +func (nodeResourceSliceStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { + return nil +} + +func (nodeResourceSliceStrategy) AllowUnconditionalUpdate() bool { + return true +} + +var TriggerFunc = map[string]storage.IndexerFunc{ + // Only one index is supported: + // https://github.com/kubernetes/kubernetes/blob/3aa8c59fec0bf339e67ca80ea7905c817baeca85/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go#L346-L350 + "nodeName": nodeNameTriggerFunc, +} + +func nodeNameTriggerFunc(obj runtime.Object) string { + return obj.(*resource.NodeResourceSlice).NodeName +} + +// Indexers returns the indexers for NodeResourceSlice. +func Indexers() *cache.Indexers { + return &cache.Indexers{ + storage.FieldIndex("nodeName"): nodeNameIndexFunc, + } +} + +func nodeNameIndexFunc(obj interface{}) ([]string, error) { + slice, ok := obj.(*resource.NodeResourceSlice) + if !ok { + return nil, fmt.Errorf("not a NodeResourceSlice") + } + return []string{slice.NodeName}, nil +} + +// GetAttrs returns labels and fields of a given object for filtering purposes. +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { + slice, ok := obj.(*resource.NodeResourceSlice) + if !ok { + return nil, nil, fmt.Errorf("not a NodeResourceSlice") + } + return labels.Set(slice.ObjectMeta.Labels), toSelectableFields(slice), nil +} + +// Match returns a generic matcher for a given label and field selector. +func Match(label labels.Selector, field fields.Selector) storage.SelectionPredicate { + return storage.SelectionPredicate{ + Label: label, + Field: field, + GetAttrs: GetAttrs, + IndexFields: []string{"nodeName"}, + } +} + +// toSelectableFields returns a field set that represents the object +// TODO: fields are not labels, and the validation rules for them do not apply. +func toSelectableFields(slice *resource.NodeResourceSlice) fields.Set { + // The purpose of allocation with a given number of elements is to reduce + // amount of allocations needed to create the fields.Set. If you add any + // field here or the number of object-meta related fields changes, this should + // be adjusted. + fields := make(fields.Set, 3) + fields["nodeName"] = slice.NodeName + fields["driverName"] = slice.DriverName + + // Adds one field. + return generic.AddObjectMetaFieldsSet(fields, &slice.ObjectMeta, false) +} diff --git a/pkg/registry/resource/noderesourceslice/strategy_test.go b/pkg/registry/resource/noderesourceslice/strategy_test.go new file mode 100644 index 00000000000..56a6e0e9bb0 --- /dev/null +++ b/pkg/registry/resource/noderesourceslice/strategy_test.go @@ -0,0 +1,82 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package noderesourceslice + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/kubernetes/pkg/apis/resource" +) + +var slice = &resource.NodeResourceSlice{ + ObjectMeta: metav1.ObjectMeta{ + Name: "valid-class", + }, + NodeName: "valid-node-name", + DriverName: "testdriver.example.com", +} + +func TestClassStrategy(t *testing.T) { + if Strategy.NamespaceScoped() { + t.Errorf("NodeResourceSlice must not be namespace scoped") + } + if Strategy.AllowCreateOnUpdate() { + t.Errorf("NodeResourceSlice should not allow create on update") + } +} + +func TestClassStrategyCreate(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + slice := slice.DeepCopy() + + Strategy.PrepareForCreate(ctx, slice) + errs := Strategy.Validate(ctx, slice) + if len(errs) != 0 { + t.Errorf("unexpected error validating for create %v", errs) + } +} + +func TestClassStrategyUpdate(t *testing.T) { + t.Run("no-changes-okay", func(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + slice := slice.DeepCopy() + newClass := slice.DeepCopy() + newClass.ResourceVersion = "4" + + Strategy.PrepareForUpdate(ctx, newClass, slice) + errs := Strategy.ValidateUpdate(ctx, newClass, slice) + if len(errs) != 0 { + t.Errorf("unexpected validation errors: %v", errs) + } + }) + + t.Run("name-change-not-allowed", func(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + slice := slice.DeepCopy() + newClass := slice.DeepCopy() + newClass.Name = "valid-class-2" + newClass.ResourceVersion = "4" + + Strategy.PrepareForUpdate(ctx, newClass, slice) + errs := Strategy.ValidateUpdate(ctx, newClass, slice) + if len(errs) == 0 { + t.Errorf("expected a validation error") + } + }) +} diff --git a/pkg/registry/resource/resourceclaimparameters/storage/storage.go b/pkg/registry/resource/resourceclaimparameters/storage/storage.go new file mode 100644 index 00000000000..820411fede9 --- /dev/null +++ b/pkg/registry/resource/resourceclaimparameters/storage/storage.go @@ -0,0 +1,57 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package storage + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/generic" + genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/kubernetes/pkg/printers" + printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" + printerstorage "k8s.io/kubernetes/pkg/printers/storage" + "k8s.io/kubernetes/pkg/registry/resource/resourceclaimparameters" +) + +// REST implements a RESTStorage for ResourceClaimParameters. +type REST struct { + *genericregistry.Store +} + +// NewREST returns a RESTStorage object that will work against ResourceClaimParameters. +func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { + store := &genericregistry.Store{ + NewFunc: func() runtime.Object { return &resource.ResourceClaimParameters{} }, + NewListFunc: func() runtime.Object { return &resource.ResourceClaimParametersList{} }, + PredicateFunc: resourceclaimparameters.Match, + DefaultQualifiedResource: resource.Resource("resourceclaimparameters"), + SingularQualifiedResource: resource.Resource("resourceclaimparameters"), + + CreateStrategy: resourceclaimparameters.Strategy, + UpdateStrategy: resourceclaimparameters.Strategy, + DeleteStrategy: resourceclaimparameters.Strategy, + ReturnDeletedObject: true, + + TableConvertor: printerstorage.TableConvertor{TableGenerator: printers.NewTableGenerator().With(printersinternal.AddHandlers)}, + } + options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: resourceclaimparameters.GetAttrs} + if err := store.CompleteWithOptions(options); err != nil { + return nil, err + } + + return &REST{store}, nil +} diff --git a/pkg/registry/resource/resourceclaimparameters/storage/storage_test.go b/pkg/registry/resource/resourceclaimparameters/storage/storage_test.go new file mode 100644 index 00000000000..c5ff63e9d5f --- /dev/null +++ b/pkg/registry/resource/resourceclaimparameters/storage/storage_test.go @@ -0,0 +1,145 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package storage + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/generic" + genericregistrytest "k8s.io/apiserver/pkg/registry/generic/testing" + etcd3testing "k8s.io/apiserver/pkg/storage/etcd3/testing" + "k8s.io/kubernetes/pkg/apis/resource" + _ "k8s.io/kubernetes/pkg/apis/resource/install" + "k8s.io/kubernetes/pkg/registry/registrytest" +) + +func newStorage(t *testing.T) (*REST, *etcd3testing.EtcdTestServer) { + etcdStorage, server := registrytest.NewEtcdStorage(t, resource.GroupName) + restOptions := generic.RESTOptions{ + StorageConfig: etcdStorage, + Decorator: generic.UndecoratedStorage, + DeleteCollectionWorkers: 1, + ResourcePrefix: "resourceclaimparameters", + } + resourceClassStorage, err := NewREST(restOptions) + if err != nil { + t.Fatalf("unexpected error from REST storage: %v", err) + } + return resourceClassStorage, server +} + +func validNewResourceClaimParameters(name string) *resource.ResourceClaimParameters { + return &resource.ResourceClaimParameters{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: metav1.NamespaceDefault, + }, + } +} + +func TestCreate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + resourceClass := validNewResourceClaimParameters("foo") + resourceClass.ObjectMeta = metav1.ObjectMeta{} + test.TestCreate( + // valid + resourceClass, + // invalid + &resource.ResourceClaimParameters{ + ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, + }, + ) +} + +func TestUpdate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + test.TestUpdate( + // valid + validNewResourceClaimParameters("foo"), + // updateFunc + func(obj runtime.Object) runtime.Object { + object := obj.(*resource.ResourceClaimParameters) + object.Labels = map[string]string{"foo": "bar"} + return object + }, + // invalid update + func(obj runtime.Object) runtime.Object { + object := obj.(*resource.ResourceClaimParameters) + object.Labels = map[string]string{"&$^^#%@": "1"} + return object + }, + ) + +} + +func TestDelete(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store).ReturnDeletedObject() + test.TestDelete(validNewResourceClaimParameters("foo")) +} + +func TestGet(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + test.TestGet(validNewResourceClaimParameters("foo")) +} + +func TestList(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + test.TestList(validNewResourceClaimParameters("foo")) +} + +func TestWatch(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + test.TestWatch( + validNewResourceClaimParameters("foo"), + // matching labels + []labels.Set{}, + // not matching labels + []labels.Set{ + {"foo": "bar"}, + }, + // matching fields + []fields.Set{ + {"metadata.name": "foo"}, + }, + // not matching fields + []fields.Set{ + {"metadata.name": "bar"}, + }, + ) +} diff --git a/pkg/registry/resource/resourceclaimparameters/strategy.go b/pkg/registry/resource/resourceclaimparameters/strategy.go new file mode 100644 index 00000000000..9b17f14f228 --- /dev/null +++ b/pkg/registry/resource/resourceclaimparameters/strategy.go @@ -0,0 +1,103 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resourceclaimparameters + +import ( + "context" + "errors" + + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/storage" + "k8s.io/apiserver/pkg/storage/names" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/kubernetes/pkg/apis/resource/validation" +) + +// resourceClaimParametersStrategy implements behavior for ResourceClaimParameters objects +type resourceClaimParametersStrategy struct { + runtime.ObjectTyper + names.NameGenerator +} + +var Strategy = resourceClaimParametersStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} + +func (resourceClaimParametersStrategy) NamespaceScoped() bool { + return true +} + +func (resourceClaimParametersStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { +} + +func (resourceClaimParametersStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { + resourceClaimParameters := obj.(*resource.ResourceClaimParameters) + return validation.ValidateResourceClaimParameters(resourceClaimParameters) +} + +func (resourceClaimParametersStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { + return nil +} + +func (resourceClaimParametersStrategy) Canonicalize(obj runtime.Object) { +} + +func (resourceClaimParametersStrategy) AllowCreateOnUpdate() bool { + return false +} + +func (resourceClaimParametersStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { +} + +func (resourceClaimParametersStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + return validation.ValidateResourceClaimParametersUpdate(obj.(*resource.ResourceClaimParameters), old.(*resource.ResourceClaimParameters)) +} + +func (resourceClaimParametersStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { + return nil +} + +func (resourceClaimParametersStrategy) AllowUnconditionalUpdate() bool { + return true +} + +// Match returns a generic matcher for a given label and field selector. +func Match(label labels.Selector, field fields.Selector) storage.SelectionPredicate { + return storage.SelectionPredicate{ + Label: label, + Field: field, + GetAttrs: GetAttrs, + } +} + +// GetAttrs returns labels and fields of a given object for filtering purposes. +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { + parameters, ok := obj.(*resource.ResourceClaimParameters) + if !ok { + return nil, nil, errors.New("not a resourceclaim") + } + return labels.Set(parameters.Labels), toSelectableFields(parameters), nil +} + +// toSelectableFields returns a field set that represents the object +func toSelectableFields(claim *resource.ResourceClaimParameters) fields.Set { + fields := generic.ObjectMetaFieldsSet(&claim.ObjectMeta, true) + return fields +} diff --git a/pkg/registry/resource/resourceclaimparameters/strategy_test.go b/pkg/registry/resource/resourceclaimparameters/strategy_test.go new file mode 100644 index 00000000000..931b4a8316a --- /dev/null +++ b/pkg/registry/resource/resourceclaimparameters/strategy_test.go @@ -0,0 +1,81 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resourceclaimparameters + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/kubernetes/pkg/apis/resource" +) + +var resourceClaimParameters = &resource.ResourceClaimParameters{ + ObjectMeta: metav1.ObjectMeta{ + Name: "valid", + Namespace: "ns", + }, +} + +func TestClassStrategy(t *testing.T) { + if !Strategy.NamespaceScoped() { + t.Errorf("ResourceClaimParameters must be namespace scoped") + } + if Strategy.AllowCreateOnUpdate() { + t.Errorf("ResourceClaimParameters should not allow create on update") + } +} + +func TestClassStrategyCreate(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + resourceClaimParameters := resourceClaimParameters.DeepCopy() + + Strategy.PrepareForCreate(ctx, resourceClaimParameters) + errs := Strategy.Validate(ctx, resourceClaimParameters) + if len(errs) != 0 { + t.Errorf("unexpected error validating for create %v", errs) + } +} + +func TestClassStrategyUpdate(t *testing.T) { + t.Run("no-changes-okay", func(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + resourceClaimParameters := resourceClaimParameters.DeepCopy() + newObj := resourceClaimParameters.DeepCopy() + newObj.ResourceVersion = "4" + + Strategy.PrepareForUpdate(ctx, newObj, resourceClaimParameters) + errs := Strategy.ValidateUpdate(ctx, newObj, resourceClaimParameters) + if len(errs) != 0 { + t.Errorf("unexpected validation errors: %v", errs) + } + }) + + t.Run("name-change-not-allowed", func(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + resourceClaimParameters := resourceClaimParameters.DeepCopy() + newObj := resourceClaimParameters.DeepCopy() + newObj.Name += "-2" + newObj.ResourceVersion = "4" + + Strategy.PrepareForUpdate(ctx, newObj, resourceClaimParameters) + errs := Strategy.ValidateUpdate(ctx, newObj, resourceClaimParameters) + if len(errs) == 0 { + t.Errorf("expected a validation error") + } + }) +} diff --git a/pkg/registry/resource/resourceclassparameters/storage/storage.go b/pkg/registry/resource/resourceclassparameters/storage/storage.go new file mode 100644 index 00000000000..1603b27c34a --- /dev/null +++ b/pkg/registry/resource/resourceclassparameters/storage/storage.go @@ -0,0 +1,57 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package storage + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/generic" + genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/kubernetes/pkg/printers" + printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" + printerstorage "k8s.io/kubernetes/pkg/printers/storage" + "k8s.io/kubernetes/pkg/registry/resource/resourceclassparameters" +) + +// REST implements a RESTStorage for ResourceClassParameters. +type REST struct { + *genericregistry.Store +} + +// NewREST returns a RESTStorage object that will work against ResourceClassParameters. +func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { + store := &genericregistry.Store{ + NewFunc: func() runtime.Object { return &resource.ResourceClassParameters{} }, + NewListFunc: func() runtime.Object { return &resource.ResourceClassParametersList{} }, + PredicateFunc: resourceclassparameters.Match, + DefaultQualifiedResource: resource.Resource("resourceclassparameters"), + SingularQualifiedResource: resource.Resource("resourceclassparameters"), + + CreateStrategy: resourceclassparameters.Strategy, + UpdateStrategy: resourceclassparameters.Strategy, + DeleteStrategy: resourceclassparameters.Strategy, + ReturnDeletedObject: true, + + TableConvertor: printerstorage.TableConvertor{TableGenerator: printers.NewTableGenerator().With(printersinternal.AddHandlers)}, + } + options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: resourceclassparameters.GetAttrs} + if err := store.CompleteWithOptions(options); err != nil { + return nil, err + } + + return &REST{store}, nil +} diff --git a/pkg/registry/resource/resourceclassparameters/storage/storage_test.go b/pkg/registry/resource/resourceclassparameters/storage/storage_test.go new file mode 100644 index 00000000000..40fd3e5ed17 --- /dev/null +++ b/pkg/registry/resource/resourceclassparameters/storage/storage_test.go @@ -0,0 +1,145 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package storage + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/generic" + genericregistrytest "k8s.io/apiserver/pkg/registry/generic/testing" + etcd3testing "k8s.io/apiserver/pkg/storage/etcd3/testing" + "k8s.io/kubernetes/pkg/apis/resource" + _ "k8s.io/kubernetes/pkg/apis/resource/install" + "k8s.io/kubernetes/pkg/registry/registrytest" +) + +func newStorage(t *testing.T) (*REST, *etcd3testing.EtcdTestServer) { + etcdStorage, server := registrytest.NewEtcdStorage(t, resource.GroupName) + restOptions := generic.RESTOptions{ + StorageConfig: etcdStorage, + Decorator: generic.UndecoratedStorage, + DeleteCollectionWorkers: 1, + ResourcePrefix: "resourceclassparameters", + } + resourceClassStorage, err := NewREST(restOptions) + if err != nil { + t.Fatalf("unexpected error from REST storage: %v", err) + } + return resourceClassStorage, server +} + +func validNewResourceClaimParameters(name string) *resource.ResourceClaimParameters { + return &resource.ResourceClaimParameters{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: metav1.NamespaceDefault, + }, + } +} + +func TestCreate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + resourceClass := validNewResourceClaimParameters("foo") + resourceClass.ObjectMeta = metav1.ObjectMeta{} + test.TestCreate( + // valid + resourceClass, + // invalid + &resource.ResourceClaimParameters{ + ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, + }, + ) +} + +func TestUpdate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + test.TestUpdate( + // valid + validNewResourceClaimParameters("foo"), + // updateFunc + func(obj runtime.Object) runtime.Object { + object := obj.(*resource.ResourceClaimParameters) + object.Labels = map[string]string{"foo": "bar"} + return object + }, + // invalid update + func(obj runtime.Object) runtime.Object { + object := obj.(*resource.ResourceClaimParameters) + object.Labels = map[string]string{"&$^^#%@": "1"} + return object + }, + ) + +} + +func TestDelete(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store).ReturnDeletedObject() + test.TestDelete(validNewResourceClaimParameters("foo")) +} + +func TestGet(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + test.TestGet(validNewResourceClaimParameters("foo")) +} + +func TestList(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + test.TestList(validNewResourceClaimParameters("foo")) +} + +func TestWatch(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + test := genericregistrytest.New(t, storage.Store) + test.TestWatch( + validNewResourceClaimParameters("foo"), + // matching labels + []labels.Set{}, + // not matching labels + []labels.Set{ + {"foo": "bar"}, + }, + // matching fields + []fields.Set{ + {"metadata.name": "foo"}, + }, + // not matching fields + []fields.Set{ + {"metadata.name": "bar"}, + }, + ) +} diff --git a/pkg/registry/resource/resourceclassparameters/strategy.go b/pkg/registry/resource/resourceclassparameters/strategy.go new file mode 100644 index 00000000000..a1cd1b968cd --- /dev/null +++ b/pkg/registry/resource/resourceclassparameters/strategy.go @@ -0,0 +1,103 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resourceclassparameters + +import ( + "context" + "errors" + + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/storage" + "k8s.io/apiserver/pkg/storage/names" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/kubernetes/pkg/apis/resource/validation" +) + +// resourceClassParametersStrategy implements behavior for ResourceClassParameters objects +type resourceClassParametersStrategy struct { + runtime.ObjectTyper + names.NameGenerator +} + +var Strategy = resourceClassParametersStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} + +func (resourceClassParametersStrategy) NamespaceScoped() bool { + return true +} + +func (resourceClassParametersStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { +} + +func (resourceClassParametersStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { + resourceClassParameters := obj.(*resource.ResourceClassParameters) + return validation.ValidateResourceClassParameters(resourceClassParameters) +} + +func (resourceClassParametersStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { + return nil +} + +func (resourceClassParametersStrategy) Canonicalize(obj runtime.Object) { +} + +func (resourceClassParametersStrategy) AllowCreateOnUpdate() bool { + return false +} + +func (resourceClassParametersStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { +} + +func (resourceClassParametersStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + return validation.ValidateResourceClassParametersUpdate(obj.(*resource.ResourceClassParameters), old.(*resource.ResourceClassParameters)) +} + +func (resourceClassParametersStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { + return nil +} + +func (resourceClassParametersStrategy) AllowUnconditionalUpdate() bool { + return true +} + +// Match returns a generic matcher for a given label and field selector. +func Match(label labels.Selector, field fields.Selector) storage.SelectionPredicate { + return storage.SelectionPredicate{ + Label: label, + Field: field, + GetAttrs: GetAttrs, + } +} + +// GetAttrs returns labels and fields of a given object for filtering purposes. +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { + parameters, ok := obj.(*resource.ResourceClassParameters) + if !ok { + return nil, nil, errors.New("not a resourceclassparameters") + } + return labels.Set(parameters.Labels), toSelectableFields(parameters), nil +} + +// toSelectableFields returns a field set that represents the object +func toSelectableFields(class *resource.ResourceClassParameters) fields.Set { + fields := generic.ObjectMetaFieldsSet(&class.ObjectMeta, true) + return fields +} diff --git a/pkg/registry/resource/resourceclassparameters/strategy_test.go b/pkg/registry/resource/resourceclassparameters/strategy_test.go new file mode 100644 index 00000000000..079f9279c9b --- /dev/null +++ b/pkg/registry/resource/resourceclassparameters/strategy_test.go @@ -0,0 +1,81 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resourceclassparameters + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/kubernetes/pkg/apis/resource" +) + +var resourceClassParameters = &resource.ResourceClassParameters{ + ObjectMeta: metav1.ObjectMeta{ + Name: "valid", + Namespace: "ns", + }, +} + +func TestClassStrategy(t *testing.T) { + if !Strategy.NamespaceScoped() { + t.Errorf("ResourceClassParameters must be namespace scoped") + } + if Strategy.AllowCreateOnUpdate() { + t.Errorf("ResourceClassParameters should not allow create on update") + } +} + +func TestClassStrategyCreate(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + resourceClassParameters := resourceClassParameters.DeepCopy() + + Strategy.PrepareForCreate(ctx, resourceClassParameters) + errs := Strategy.Validate(ctx, resourceClassParameters) + if len(errs) != 0 { + t.Errorf("unexpected error validating for create %v", errs) + } +} + +func TestClassStrategyUpdate(t *testing.T) { + t.Run("no-changes-okay", func(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + resourceClassParameters := resourceClassParameters.DeepCopy() + newObj := resourceClassParameters.DeepCopy() + newObj.ResourceVersion = "4" + + Strategy.PrepareForUpdate(ctx, newObj, resourceClassParameters) + errs := Strategy.ValidateUpdate(ctx, newObj, resourceClassParameters) + if len(errs) != 0 { + t.Errorf("unexpected validation errors: %v", errs) + } + }) + + t.Run("name-change-not-allowed", func(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + resourceClassParameters := resourceClassParameters.DeepCopy() + newObj := resourceClassParameters.DeepCopy() + newObj.Name += "-2" + newObj.ResourceVersion = "4" + + Strategy.PrepareForUpdate(ctx, newObj, resourceClassParameters) + errs := Strategy.ValidateUpdate(ctx, newObj, resourceClassParameters) + if len(errs) == 0 { + t.Errorf("expected a validation error") + } + }) +} diff --git a/pkg/registry/resource/rest/storage_resource.go b/pkg/registry/resource/rest/storage_resource.go index 4756b01381d..28a2eaaecc5 100644 --- a/pkg/registry/resource/rest/storage_resource.go +++ b/pkg/registry/resource/rest/storage_resource.go @@ -24,10 +24,13 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/resource" + noderesourceslicestore "k8s.io/kubernetes/pkg/registry/resource/noderesourceslice/storage" podschedulingcontextsstore "k8s.io/kubernetes/pkg/registry/resource/podschedulingcontext/storage" resourceclaimstore "k8s.io/kubernetes/pkg/registry/resource/resourceclaim/storage" + resourceclaimparametersstore "k8s.io/kubernetes/pkg/registry/resource/resourceclaimparameters/storage" resourceclaimtemplatestore "k8s.io/kubernetes/pkg/registry/resource/resourceclaimtemplate/storage" resourceclassstore "k8s.io/kubernetes/pkg/registry/resource/resourceclass/storage" + resourceclassparametersstore "k8s.io/kubernetes/pkg/registry/resource/resourceclassparameters/storage" ) type RESTStorageProvider struct{} @@ -83,6 +86,30 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora storage[resource+"/status"] = podSchedulingStatusStorage } + if resource := "resourceclaimparameters"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { + resourceClaimParametersStorage, err := resourceclaimparametersstore.NewREST(restOptionsGetter) + if err != nil { + return nil, err + } + storage[resource] = resourceClaimParametersStorage + } + + if resource := "resourceclassparameters"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { + resourceClassParametersStorage, err := resourceclassparametersstore.NewREST(restOptionsGetter) + if err != nil { + return nil, err + } + storage[resource] = resourceClassParametersStorage + } + + if resource := "noderesourceslices"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { + nodeResourceSliceStorage, err := noderesourceslicestore.NewREST(restOptionsGetter) + if err != nil { + return nil, err + } + storage[resource] = nodeResourceSliceStorage + } + return storage, nil } diff --git a/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go b/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go index fb3880f96c6..c40cd0ff88a 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go @@ -74,10 +74,178 @@ func (m *AllocationResult) XXX_DiscardUnknown() { var xxx_messageInfo_AllocationResult proto.InternalMessageInfo +func (m *AllocationResultModel) Reset() { *m = AllocationResultModel{} } +func (*AllocationResultModel) ProtoMessage() {} +func (*AllocationResultModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{1} +} +func (m *AllocationResultModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllocationResultModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AllocationResultModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocationResultModel.Merge(m, src) +} +func (m *AllocationResultModel) XXX_Size() int { + return m.Size() +} +func (m *AllocationResultModel) XXX_DiscardUnknown() { + xxx_messageInfo_AllocationResultModel.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocationResultModel proto.InternalMessageInfo + +func (m *DriverAllocationResult) Reset() { *m = DriverAllocationResult{} } +func (*DriverAllocationResult) ProtoMessage() {} +func (*DriverAllocationResult) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{2} +} +func (m *DriverAllocationResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DriverAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DriverAllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverAllocationResult.Merge(m, src) +} +func (m *DriverAllocationResult) XXX_Size() int { + return m.Size() +} +func (m *DriverAllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_DriverAllocationResult.DiscardUnknown(m) +} + +var xxx_messageInfo_DriverAllocationResult proto.InternalMessageInfo + +func (m *DriverRequests) Reset() { *m = DriverRequests{} } +func (*DriverRequests) ProtoMessage() {} +func (*DriverRequests) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{3} +} +func (m *DriverRequests) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DriverRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DriverRequests) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverRequests.Merge(m, src) +} +func (m *DriverRequests) XXX_Size() int { + return m.Size() +} +func (m *DriverRequests) XXX_DiscardUnknown() { + xxx_messageInfo_DriverRequests.DiscardUnknown(m) +} + +var xxx_messageInfo_DriverRequests proto.InternalMessageInfo + +func (m *NodeResourceModel) Reset() { *m = NodeResourceModel{} } +func (*NodeResourceModel) ProtoMessage() {} +func (*NodeResourceModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{4} +} +func (m *NodeResourceModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeResourceModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NodeResourceModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeResourceModel.Merge(m, src) +} +func (m *NodeResourceModel) XXX_Size() int { + return m.Size() +} +func (m *NodeResourceModel) XXX_DiscardUnknown() { + xxx_messageInfo_NodeResourceModel.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeResourceModel proto.InternalMessageInfo + +func (m *NodeResourceSlice) Reset() { *m = NodeResourceSlice{} } +func (*NodeResourceSlice) ProtoMessage() {} +func (*NodeResourceSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{5} +} +func (m *NodeResourceSlice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NodeResourceSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeResourceSlice.Merge(m, src) +} +func (m *NodeResourceSlice) XXX_Size() int { + return m.Size() +} +func (m *NodeResourceSlice) XXX_DiscardUnknown() { + xxx_messageInfo_NodeResourceSlice.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeResourceSlice proto.InternalMessageInfo + +func (m *NodeResourceSliceList) Reset() { *m = NodeResourceSliceList{} } +func (*NodeResourceSliceList) ProtoMessage() {} +func (*NodeResourceSliceList) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{6} +} +func (m *NodeResourceSliceList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NodeResourceSliceList) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeResourceSliceList.Merge(m, src) +} +func (m *NodeResourceSliceList) XXX_Size() int { + return m.Size() +} +func (m *NodeResourceSliceList) XXX_DiscardUnknown() { + xxx_messageInfo_NodeResourceSliceList.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeResourceSliceList proto.InternalMessageInfo + func (m *PodSchedulingContext) Reset() { *m = PodSchedulingContext{} } func (*PodSchedulingContext) ProtoMessage() {} func (*PodSchedulingContext) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{1} + return fileDescriptor_4312f5b44a31ec02, []int{7} } func (m *PodSchedulingContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +273,7 @@ var xxx_messageInfo_PodSchedulingContext proto.InternalMessageInfo func (m *PodSchedulingContextList) Reset() { *m = PodSchedulingContextList{} } func (*PodSchedulingContextList) ProtoMessage() {} func (*PodSchedulingContextList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{2} + return fileDescriptor_4312f5b44a31ec02, []int{8} } func (m *PodSchedulingContextList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +301,7 @@ var xxx_messageInfo_PodSchedulingContextList proto.InternalMessageInfo func (m *PodSchedulingContextSpec) Reset() { *m = PodSchedulingContextSpec{} } func (*PodSchedulingContextSpec) ProtoMessage() {} func (*PodSchedulingContextSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{3} + return fileDescriptor_4312f5b44a31ec02, []int{9} } func (m *PodSchedulingContextSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +329,7 @@ var xxx_messageInfo_PodSchedulingContextSpec proto.InternalMessageInfo func (m *PodSchedulingContextStatus) Reset() { *m = PodSchedulingContextStatus{} } func (*PodSchedulingContextStatus) ProtoMessage() {} func (*PodSchedulingContextStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{4} + return fileDescriptor_4312f5b44a31ec02, []int{10} } func (m *PodSchedulingContextStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +357,7 @@ var xxx_messageInfo_PodSchedulingContextStatus proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{5} + return fileDescriptor_4312f5b44a31ec02, []int{11} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +385,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{6} + return fileDescriptor_4312f5b44a31ec02, []int{12} } func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,7 +413,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{7} + return fileDescriptor_4312f5b44a31ec02, []int{13} } func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,10 +438,66 @@ func (m *ResourceClaimList) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo +func (m *ResourceClaimParameters) Reset() { *m = ResourceClaimParameters{} } +func (*ResourceClaimParameters) ProtoMessage() {} +func (*ResourceClaimParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{14} +} +func (m *ResourceClaimParameters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimParameters.Merge(m, src) +} +func (m *ResourceClaimParameters) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimParameters) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimParameters proto.InternalMessageInfo + +func (m *ResourceClaimParametersList) Reset() { *m = ResourceClaimParametersList{} } +func (*ResourceClaimParametersList) ProtoMessage() {} +func (*ResourceClaimParametersList) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{15} +} +func (m *ResourceClaimParametersList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimParametersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimParametersList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimParametersList.Merge(m, src) +} +func (m *ResourceClaimParametersList) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimParametersList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimParametersList.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimParametersList proto.InternalMessageInfo + func (m *ResourceClaimParametersReference) Reset() { *m = ResourceClaimParametersReference{} } func (*ResourceClaimParametersReference) ProtoMessage() {} func (*ResourceClaimParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{8} + return fileDescriptor_4312f5b44a31ec02, []int{16} } func (m *ResourceClaimParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +525,7 @@ var xxx_messageInfo_ResourceClaimParametersReference proto.InternalMessageInfo func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} } func (*ResourceClaimSchedulingStatus) ProtoMessage() {} func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{9} + return fileDescriptor_4312f5b44a31ec02, []int{17} } func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -329,7 +553,7 @@ var xxx_messageInfo_ResourceClaimSchedulingStatus proto.InternalMessageInfo func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{10} + return fileDescriptor_4312f5b44a31ec02, []int{18} } func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -357,7 +581,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{11} + return fileDescriptor_4312f5b44a31ec02, []int{19} } func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -385,7 +609,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{12} + return fileDescriptor_4312f5b44a31ec02, []int{20} } func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -413,7 +637,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{13} + return fileDescriptor_4312f5b44a31ec02, []int{21} } func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +665,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{14} + return fileDescriptor_4312f5b44a31ec02, []int{22} } func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -469,7 +693,7 @@ var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo func (m *ResourceClass) Reset() { *m = ResourceClass{} } func (*ResourceClass) ProtoMessage() {} func (*ResourceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{15} + return fileDescriptor_4312f5b44a31ec02, []int{23} } func (m *ResourceClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +721,7 @@ var xxx_messageInfo_ResourceClass proto.InternalMessageInfo func (m *ResourceClassList) Reset() { *m = ResourceClassList{} } func (*ResourceClassList) ProtoMessage() {} func (*ResourceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{16} + return fileDescriptor_4312f5b44a31ec02, []int{24} } func (m *ResourceClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,10 +746,66 @@ func (m *ResourceClassList) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClassList proto.InternalMessageInfo +func (m *ResourceClassParameters) Reset() { *m = ResourceClassParameters{} } +func (*ResourceClassParameters) ProtoMessage() {} +func (*ResourceClassParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{25} +} +func (m *ResourceClassParameters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClassParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClassParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClassParameters.Merge(m, src) +} +func (m *ResourceClassParameters) XXX_Size() int { + return m.Size() +} +func (m *ResourceClassParameters) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClassParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClassParameters proto.InternalMessageInfo + +func (m *ResourceClassParametersList) Reset() { *m = ResourceClassParametersList{} } +func (*ResourceClassParametersList) ProtoMessage() {} +func (*ResourceClassParametersList) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{26} +} +func (m *ResourceClassParametersList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClassParametersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClassParametersList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClassParametersList.Merge(m, src) +} +func (m *ResourceClassParametersList) XXX_Size() int { + return m.Size() +} +func (m *ResourceClassParametersList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClassParametersList.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClassParametersList proto.InternalMessageInfo + func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} } func (*ResourceClassParametersReference) ProtoMessage() {} func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{17} + return fileDescriptor_4312f5b44a31ec02, []int{27} } func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -550,10 +830,66 @@ func (m *ResourceClassParametersReference) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo +func (m *ResourceFilter) Reset() { *m = ResourceFilter{} } +func (*ResourceFilter) ProtoMessage() {} +func (*ResourceFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{28} +} +func (m *ResourceFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceFilter.Merge(m, src) +} +func (m *ResourceFilter) XXX_Size() int { + return m.Size() +} +func (m *ResourceFilter) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceFilter proto.InternalMessageInfo + +func (m *ResourceFilterModel) Reset() { *m = ResourceFilterModel{} } +func (*ResourceFilterModel) ProtoMessage() {} +func (*ResourceFilterModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{29} +} +func (m *ResourceFilterModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceFilterModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceFilterModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceFilterModel.Merge(m, src) +} +func (m *ResourceFilterModel) XXX_Size() int { + return m.Size() +} +func (m *ResourceFilterModel) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceFilterModel.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceFilterModel proto.InternalMessageInfo + func (m *ResourceHandle) Reset() { *m = ResourceHandle{} } func (*ResourceHandle) ProtoMessage() {} func (*ResourceHandle) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{18} + return fileDescriptor_4312f5b44a31ec02, []int{30} } func (m *ResourceHandle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,8 +914,126 @@ func (m *ResourceHandle) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceHandle proto.InternalMessageInfo +func (m *ResourceRequest) Reset() { *m = ResourceRequest{} } +func (*ResourceRequest) ProtoMessage() {} +func (*ResourceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{31} +} +func (m *ResourceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceRequest.Merge(m, src) +} +func (m *ResourceRequest) XXX_Size() int { + return m.Size() +} +func (m *ResourceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceRequest proto.InternalMessageInfo + +func (m *ResourceRequestModel) Reset() { *m = ResourceRequestModel{} } +func (*ResourceRequestModel) ProtoMessage() {} +func (*ResourceRequestModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{32} +} +func (m *ResourceRequestModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceRequestModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceRequestModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceRequestModel.Merge(m, src) +} +func (m *ResourceRequestModel) XXX_Size() int { + return m.Size() +} +func (m *ResourceRequestModel) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceRequestModel.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceRequestModel proto.InternalMessageInfo + +func (m *StructuredResourceHandle) Reset() { *m = StructuredResourceHandle{} } +func (*StructuredResourceHandle) ProtoMessage() {} +func (*StructuredResourceHandle) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{33} +} +func (m *StructuredResourceHandle) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StructuredResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StructuredResourceHandle) XXX_Merge(src proto.Message) { + xxx_messageInfo_StructuredResourceHandle.Merge(m, src) +} +func (m *StructuredResourceHandle) XXX_Size() int { + return m.Size() +} +func (m *StructuredResourceHandle) XXX_DiscardUnknown() { + xxx_messageInfo_StructuredResourceHandle.DiscardUnknown(m) +} + +var xxx_messageInfo_StructuredResourceHandle proto.InternalMessageInfo + +func (m *VendorParameters) Reset() { *m = VendorParameters{} } +func (*VendorParameters) ProtoMessage() {} +func (*VendorParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{34} +} +func (m *VendorParameters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VendorParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *VendorParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_VendorParameters.Merge(m, src) +} +func (m *VendorParameters) XXX_Size() int { + return m.Size() +} +func (m *VendorParameters) XXX_DiscardUnknown() { + xxx_messageInfo_VendorParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_VendorParameters proto.InternalMessageInfo + func init() { proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha2.AllocationResult") + proto.RegisterType((*AllocationResultModel)(nil), "k8s.io.api.resource.v1alpha2.AllocationResultModel") + proto.RegisterType((*DriverAllocationResult)(nil), "k8s.io.api.resource.v1alpha2.DriverAllocationResult") + proto.RegisterType((*DriverRequests)(nil), "k8s.io.api.resource.v1alpha2.DriverRequests") + proto.RegisterType((*NodeResourceModel)(nil), "k8s.io.api.resource.v1alpha2.NodeResourceModel") + proto.RegisterType((*NodeResourceSlice)(nil), "k8s.io.api.resource.v1alpha2.NodeResourceSlice") + proto.RegisterType((*NodeResourceSliceList)(nil), "k8s.io.api.resource.v1alpha2.NodeResourceSliceList") proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContext") proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextList") proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextSpec") @@ -587,6 +1041,8 @@ func init() { proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaim") proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimConsumerReference") proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimList") + proto.RegisterType((*ResourceClaimParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParameters") + proto.RegisterType((*ResourceClaimParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersList") proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersReference") proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSchedulingStatus") proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSpec") @@ -596,8 +1052,16 @@ func init() { proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplateSpec") proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha2.ResourceClass") proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassList") + proto.RegisterType((*ResourceClassParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParameters") + proto.RegisterType((*ResourceClassParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersList") proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersReference") + proto.RegisterType((*ResourceFilter)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilter") + proto.RegisterType((*ResourceFilterModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilterModel") proto.RegisterType((*ResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.ResourceHandle") + proto.RegisterType((*ResourceRequest)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequest") + proto.RegisterType((*ResourceRequestModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequestModel") + proto.RegisterType((*StructuredResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.StructuredResourceHandle") + proto.RegisterType((*VendorParameters)(nil), "k8s.io.api.resource.v1alpha2.VendorParameters") } func init() { @@ -605,84 +1069,121 @@ func init() { } var fileDescriptor_4312f5b44a31ec02 = []byte{ - // 1218 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xaf, 0x93, 0x74, 0xd5, 0x4e, 0xdb, 0xb4, 0x75, 0x5b, 0xc8, 0x56, 0xbb, 0x49, 0xf0, 0xa9, - 0x12, 0xc5, 0xd9, 0x06, 0xb4, 0x54, 0xfc, 0x93, 0xea, 0x56, 0x2c, 0x15, 0x6c, 0x37, 0x4c, 0xa8, - 0xd8, 0x22, 0x84, 0x76, 0x6a, 0x4f, 0x13, 0x53, 0xff, 0xc3, 0x33, 0x2e, 0xac, 0xb8, 0xec, 0x47, - 0xd8, 0x03, 0x07, 0x38, 0x71, 0xe4, 0x0b, 0xf0, 0x0d, 0x10, 0x52, 0x8f, 0x45, 0x70, 0xd8, 0x53, - 0x44, 0xc3, 0x47, 0xe0, 0xc4, 0x9e, 0xd0, 0x4c, 0x6c, 0xc7, 0xe3, 0xc4, 0xa1, 0xe9, 0x21, 0x62, - 0x4f, 0xed, 0xcc, 0xfb, 0xbd, 0xdf, 0xfb, 0x37, 0xef, 0xcd, 0x38, 0x60, 0xf3, 0x74, 0x9b, 0xa8, - 0xa6, 0x5b, 0x43, 0x9e, 0x59, 0xf3, 0x31, 0x71, 0x03, 0x5f, 0xc7, 0xb5, 0xb3, 0x2d, 0x64, 0x79, - 0x6d, 0x54, 0xaf, 0xb5, 0xb0, 0x83, 0x7d, 0x44, 0xb1, 0xa1, 0x7a, 0xbe, 0x4b, 0x5d, 0xf9, 0x56, - 0x0f, 0xad, 0x22, 0xcf, 0x54, 0x23, 0xb4, 0x1a, 0xa1, 0xd7, 0x5f, 0x6b, 0x99, 0xb4, 0x1d, 0x1c, - 0xab, 0xba, 0x6b, 0xd7, 0x5a, 0x6e, 0xcb, 0xad, 0x71, 0xa5, 0xe3, 0xe0, 0x84, 0xaf, 0xf8, 0x82, - 0xff, 0xd7, 0x23, 0x5b, 0x57, 0x12, 0xa6, 0x75, 0xd7, 0x67, 0x66, 0xd3, 0x06, 0xd7, 0xdf, 0xe8, - 0x63, 0x6c, 0xa4, 0xb7, 0x4d, 0x07, 0xfb, 0x8f, 0x6b, 0xde, 0x69, 0x8b, 0x6d, 0x90, 0x9a, 0x8d, - 0x29, 0x1a, 0xa6, 0x55, 0xcb, 0xd2, 0xf2, 0x03, 0x87, 0x9a, 0x36, 0x1e, 0x50, 0xb8, 0xfb, 0x5f, - 0x0a, 0x44, 0x6f, 0x63, 0x1b, 0xa5, 0xf5, 0x94, 0xef, 0x73, 0x60, 0x69, 0xc7, 0xb2, 0x5c, 0x1d, - 0x51, 0xd3, 0x75, 0x20, 0x26, 0x81, 0x45, 0x65, 0x17, 0x2c, 0x46, 0xb9, 0xf9, 0x00, 0x39, 0x86, - 0x85, 0x49, 0x49, 0xaa, 0xe6, 0x37, 0xe6, 0xea, 0x9b, 0xea, 0xa8, 0xf4, 0xa9, 0x50, 0x50, 0xd2, - 0x5e, 0x3e, 0xef, 0x54, 0xa6, 0xba, 0x9d, 0xca, 0xa2, 0xb8, 0x4f, 0x60, 0x9a, 0x5d, 0x3e, 0x06, - 0x4b, 0xe8, 0x0c, 0x99, 0x16, 0x3a, 0xb6, 0xf0, 0x03, 0xe7, 0xc0, 0x35, 0x30, 0x29, 0xe5, 0xaa, - 0xd2, 0xc6, 0x5c, 0xbd, 0x9a, 0xb4, 0xc8, 0x72, 0xac, 0x9e, 0x6d, 0xa9, 0x0c, 0xd0, 0xc4, 0x16, - 0xd6, 0xa9, 0xeb, 0x6b, 0xab, 0xdd, 0x4e, 0x65, 0x69, 0x27, 0xa5, 0x0d, 0x07, 0xf8, 0xe4, 0x1a, - 0x98, 0x25, 0x6d, 0xe4, 0x63, 0xb6, 0x57, 0xca, 0x57, 0xa5, 0x8d, 0x19, 0x6d, 0x39, 0x74, 0x70, - 0xb6, 0x19, 0x09, 0x60, 0x1f, 0xa3, 0xfc, 0x9c, 0x03, 0xab, 0x0d, 0xd7, 0x68, 0xea, 0x6d, 0x6c, - 0x04, 0x96, 0xe9, 0xb4, 0x76, 0x5d, 0x87, 0xe2, 0x6f, 0xa8, 0xfc, 0x08, 0xcc, 0xb0, 0xba, 0x19, - 0x88, 0xa2, 0x92, 0xc4, 0xbd, 0xbc, 0x93, 0xf0, 0x32, 0x4e, 0xbf, 0xea, 0x9d, 0xb6, 0xd8, 0x06, - 0x51, 0x19, 0x9a, 0xf9, 0xfd, 0xe0, 0xf8, 0x4b, 0xac, 0xd3, 0xfb, 0x98, 0x22, 0x4d, 0x0e, 0x4d, - 0x83, 0xfe, 0x1e, 0x8c, 0x59, 0xe5, 0x87, 0xa0, 0x40, 0x3c, 0xac, 0x87, 0x39, 0xb8, 0x3b, 0x3a, - 0xeb, 0xc3, 0x7c, 0x6c, 0x7a, 0x58, 0xd7, 0xe6, 0x43, 0x1b, 0x05, 0xb6, 0x82, 0x9c, 0x51, 0x7e, - 0x04, 0x6e, 0x10, 0x8a, 0x68, 0x40, 0x78, 0x0a, 0xe6, 0xea, 0xdb, 0xd7, 0xe0, 0xe6, 0xfa, 0x5a, - 0x31, 0x64, 0xbf, 0xd1, 0x5b, 0xc3, 0x90, 0x57, 0xf9, 0x4d, 0x02, 0xa5, 0x61, 0x6a, 0x1f, 0x99, - 0x84, 0xca, 0x9f, 0x0f, 0xa4, 0x4e, 0xbd, 0x5a, 0xea, 0x98, 0x36, 0x4f, 0xdc, 0x52, 0x68, 0x76, - 0x26, 0xda, 0x49, 0xa4, 0xed, 0x53, 0x30, 0x6d, 0x52, 0x6c, 0xb3, 0xb3, 0xc3, 0x4e, 0x6b, 0x7d, - 0xfc, 0xd8, 0xb4, 0x85, 0x90, 0x7e, 0x7a, 0x9f, 0x11, 0xc1, 0x1e, 0x9f, 0xf2, 0x34, 0x23, 0x26, - 0x96, 0x58, 0x79, 0x1b, 0xcc, 0x13, 0x7e, 0x18, 0xb1, 0xc1, 0x4e, 0x1a, 0x8f, 0x6b, 0x56, 0x5b, - 0x0d, 0x89, 0xe6, 0x9b, 0x09, 0x19, 0x14, 0x90, 0xf2, 0x5b, 0xa0, 0xe8, 0xb9, 0x14, 0x3b, 0xd4, - 0x44, 0x56, 0x74, 0xe8, 0xf3, 0x1b, 0xb3, 0x9a, 0xdc, 0xed, 0x54, 0x8a, 0x0d, 0x41, 0x02, 0x53, - 0x48, 0xe5, 0x07, 0x09, 0xac, 0x67, 0x57, 0x47, 0xfe, 0x16, 0x14, 0xa3, 0x88, 0x77, 0x2d, 0x64, - 0xda, 0x51, 0x07, 0xbf, 0x7d, 0xb5, 0x0e, 0xe6, 0x3a, 0x7d, 0xee, 0xb0, 0xe4, 0x2f, 0x85, 0x31, - 0x15, 0x05, 0x18, 0x81, 0x29, 0x53, 0xca, 0x8f, 0x39, 0xb0, 0x20, 0x40, 0x26, 0xd0, 0x32, 0x1f, - 0x0b, 0x2d, 0x53, 0x1b, 0x27, 0xcc, 0xac, 0x5e, 0x39, 0x4a, 0xf5, 0xca, 0xd6, 0x38, 0xa4, 0xa3, - 0x9b, 0xa4, 0x2b, 0x81, 0xb2, 0x80, 0xdf, 0x75, 0x1d, 0x12, 0xd8, 0xd8, 0x87, 0xf8, 0x04, 0xfb, - 0xd8, 0xd1, 0xb1, 0xbc, 0x09, 0x66, 0x90, 0x67, 0xde, 0xf3, 0xdd, 0xc0, 0x0b, 0x8f, 0x54, 0x7c, - 0xf4, 0x77, 0x1a, 0xfb, 0x7c, 0x1f, 0xc6, 0x08, 0x86, 0x8e, 0x3c, 0xe2, 0xde, 0x26, 0xd0, 0x91, - 0x1d, 0x18, 0x23, 0xe4, 0x2a, 0x28, 0x38, 0xc8, 0xc6, 0xa5, 0x02, 0x47, 0xc6, 0xb1, 0x1f, 0x20, - 0x1b, 0x43, 0x2e, 0x91, 0x35, 0x90, 0x0f, 0x4c, 0xa3, 0x34, 0xcd, 0x01, 0x77, 0x42, 0x40, 0xfe, - 0x70, 0x7f, 0xef, 0x79, 0xa7, 0xf2, 0x4a, 0xd6, 0x5d, 0x43, 0x1f, 0x7b, 0x98, 0xa8, 0x87, 0xfb, - 0x7b, 0x90, 0x29, 0x2b, 0xbf, 0x48, 0x60, 0x59, 0x08, 0x72, 0x02, 0x23, 0xa0, 0x21, 0x8e, 0x80, - 0x57, 0xc7, 0x28, 0x59, 0x46, 0xef, 0x7f, 0x27, 0x81, 0xaa, 0x80, 0x6b, 0x20, 0x1f, 0xd9, 0x98, - 0x62, 0x9f, 0x5c, 0xb7, 0x58, 0x55, 0x50, 0x38, 0x35, 0x1d, 0x83, 0x9f, 0xd5, 0x44, 0xfa, 0x3f, - 0x34, 0x1d, 0x03, 0x72, 0x49, 0x5c, 0xa0, 0x7c, 0x56, 0x81, 0x94, 0x27, 0x12, 0xb8, 0x3d, 0xb2, - 0x5b, 0x63, 0x0e, 0x29, 0xb3, 0xc8, 0xef, 0x82, 0xc5, 0xc0, 0x21, 0x81, 0x49, 0xd9, 0x7d, 0x97, - 0x1c, 0x40, 0x2b, 0xec, 0xd6, 0x3e, 0x14, 0x45, 0x30, 0x8d, 0x55, 0x7e, 0xca, 0xa5, 0xea, 0xcb, - 0xc7, 0xe1, 0x3d, 0xb0, 0x9c, 0x18, 0x07, 0x84, 0x1c, 0xf4, 0x7d, 0xb8, 0x19, 0xfa, 0x90, 0xd4, - 0xea, 0x01, 0xe0, 0xa0, 0x8e, 0xfc, 0x35, 0x58, 0xf0, 0x92, 0xa9, 0x0e, 0x5b, 0xfb, 0xbd, 0x31, - 0x4a, 0x3a, 0xa4, 0x54, 0xda, 0x72, 0xb7, 0x53, 0x59, 0x10, 0x04, 0x50, 0xb4, 0x23, 0x37, 0x40, - 0x11, 0xc5, 0x4f, 0xa2, 0xfb, 0x6c, 0xa4, 0xf7, 0xca, 0xb0, 0x11, 0x8d, 0xbf, 0x1d, 0x41, 0xfa, - 0x7c, 0x60, 0x07, 0xa6, 0xf4, 0x95, 0xbf, 0x73, 0x60, 0x65, 0xc8, 0x78, 0x90, 0xeb, 0x00, 0x18, - 0xbe, 0x79, 0x86, 0xfd, 0x44, 0x92, 0xe2, 0x31, 0xb7, 0x17, 0x4b, 0x60, 0x02, 0x25, 0x7f, 0x01, - 0x40, 0x9f, 0x3d, 0xcc, 0x89, 0x3a, 0x3a, 0x27, 0xe9, 0x07, 0x9e, 0x56, 0x64, 0xfc, 0x89, 0xdd, - 0x04, 0xa3, 0x4c, 0xc0, 0x9c, 0x8f, 0x09, 0xf6, 0xcf, 0xb0, 0xf1, 0xbe, 0xeb, 0x97, 0xf2, 0xbc, - 0x8f, 0xde, 0x19, 0x23, 0xe9, 0x03, 0xa3, 0x4c, 0x5b, 0x09, 0x43, 0x9a, 0x83, 0x7d, 0x62, 0x98, - 0xb4, 0x22, 0x37, 0xc1, 0x9a, 0x81, 0x51, 0xc2, 0xcd, 0xaf, 0x02, 0x4c, 0x28, 0x36, 0xf8, 0x84, - 0x9a, 0xd1, 0x6e, 0x87, 0x04, 0x6b, 0x7b, 0xc3, 0x40, 0x70, 0xb8, 0xae, 0xf2, 0x87, 0x04, 0xd6, - 0x04, 0xcf, 0x3e, 0xc1, 0xb6, 0x67, 0x21, 0x8a, 0x27, 0x70, 0x1d, 0x1d, 0x09, 0xd7, 0xd1, 0x9b, - 0x63, 0xa4, 0x2f, 0x72, 0x32, 0xeb, 0x5a, 0x52, 0x7e, 0x97, 0xc0, 0xcd, 0xa1, 0x1a, 0x13, 0x18, - 0xaf, 0x0f, 0xc5, 0xf1, 0xfa, 0xfa, 0x35, 0xe2, 0xca, 0x18, 0xb3, 0x17, 0x59, 0x51, 0x35, 0x7b, - 0xcf, 0xd6, 0x17, 0xef, 0xfd, 0xa0, 0xfc, 0x23, 0x3e, 0x83, 0x08, 0x99, 0x40, 0x18, 0xe2, 0x44, - 0xc9, 0x5d, 0x69, 0xa2, 0x0c, 0x0c, 0xda, 0xfc, 0x98, 0x83, 0x96, 0x90, 0xeb, 0x0d, 0xda, 0x23, - 0xb0, 0x20, 0xde, 0x3e, 0x85, 0x2b, 0x7e, 0xf3, 0x71, 0xea, 0xa6, 0x70, 0x3b, 0x89, 0x4c, 0xe9, - 0xb7, 0x07, 0x21, 0xff, 0xe7, 0xb7, 0x07, 0x21, 0x19, 0x4d, 0xf1, 0xab, 0xf8, 0xf6, 0x18, 0x9a, - 0xe7, 0xc9, 0xbf, 0x3d, 0xd8, 0xa7, 0x34, 0xfb, 0x4b, 0x3c, 0xa4, 0x47, 0x6f, 0xc8, 0xf8, 0x53, - 0xfa, 0x20, 0x12, 0xc0, 0x3e, 0x46, 0x39, 0x01, 0x45, 0xf1, 0x37, 0x80, 0x6b, 0xdd, 0x7c, 0x55, - 0x50, 0xe0, 0x95, 0x4b, 0xb9, 0xbe, 0x87, 0x28, 0x82, 0x5c, 0xa2, 0x69, 0xe7, 0x97, 0xe5, 0xa9, - 0x8b, 0xcb, 0xf2, 0xd4, 0xb3, 0xcb, 0xf2, 0xd4, 0x93, 0x6e, 0x59, 0x3a, 0xef, 0x96, 0xa5, 0x8b, - 0x6e, 0x59, 0x7a, 0xd6, 0x2d, 0x4b, 0x7f, 0x76, 0xcb, 0xd2, 0xd3, 0xbf, 0xca, 0x53, 0x9f, 0xdd, - 0x1a, 0xf5, 0x8b, 0xd1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x24, 0xee, 0x5c, 0x4a, 0x50, 0x12, - 0x00, 0x00, + // 1822 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x1a, 0xcd, 0x6f, 0x1b, 0x4b, + 0x3d, 0x6b, 0x3b, 0xaf, 0xe9, 0x2f, 0x8d, 0x93, 0x6c, 0x92, 0xc6, 0x2f, 0xaf, 0xcf, 0x36, 0x7b, + 0x8a, 0x44, 0xbb, 0x7e, 0xc9, 0x2b, 0xa5, 0xe2, 0x4b, 0xca, 0x36, 0xb4, 0x44, 0xb4, 0x69, 0x18, + 0xf7, 0x1b, 0x04, 0xdd, 0x78, 0xa7, 0xc9, 0x92, 0xf5, 0xee, 0xb2, 0xb3, 0x4e, 0x5b, 0x71, 0xa9, + 0x10, 0x07, 0x2e, 0x48, 0x95, 0x40, 0x08, 0x4e, 0x1c, 0x11, 0x17, 0x2e, 0xf0, 0x1f, 0x54, 0xa8, + 0x95, 0xb8, 0xb4, 0x02, 0x89, 0x8a, 0x43, 0x44, 0xcd, 0x9f, 0xc0, 0xad, 0x27, 0x34, 0xe3, 0xd9, + 0xf5, 0xce, 0x7e, 0x38, 0x5e, 0xf3, 0x6a, 0xb5, 0xa7, 0x64, 0x67, 0x7e, 0x1f, 0xf3, 0xfb, 0xfe, + 0xfd, 0x66, 0x0c, 0x67, 0x0f, 0x2e, 0x12, 0xd5, 0x74, 0x1a, 0xba, 0x6b, 0x36, 0x3c, 0x4c, 0x9c, + 0x8e, 0xd7, 0xc2, 0x8d, 0xc3, 0x35, 0xdd, 0x72, 0xf7, 0xf5, 0xf5, 0xc6, 0x1e, 0xb6, 0xb1, 0xa7, + 0xfb, 0xd8, 0x50, 0x5d, 0xcf, 0xf1, 0x1d, 0xf9, 0x4c, 0x0f, 0x5a, 0xd5, 0x5d, 0x53, 0x0d, 0xa0, + 0xd5, 0x00, 0x7a, 0xe5, 0xdc, 0x9e, 0xe9, 0xef, 0x77, 0x76, 0xd5, 0x96, 0xd3, 0x6e, 0xec, 0x39, + 0x7b, 0x4e, 0x83, 0x21, 0xed, 0x76, 0x1e, 0xb0, 0x2f, 0xf6, 0xc1, 0xfe, 0xeb, 0x11, 0x5b, 0x51, + 0x22, 0xac, 0x5b, 0x8e, 0x47, 0xd9, 0xc6, 0x19, 0xae, 0x9c, 0xef, 0xc3, 0xb4, 0xf5, 0xd6, 0xbe, + 0x69, 0x63, 0xef, 0x71, 0xc3, 0x3d, 0xd8, 0xa3, 0x0b, 0xa4, 0xd1, 0xc6, 0xbe, 0x9e, 0x86, 0xd5, + 0xc8, 0xc2, 0xf2, 0x3a, 0xb6, 0x6f, 0xb6, 0x71, 0x02, 0xe1, 0xc2, 0x71, 0x08, 0xa4, 0xb5, 0x8f, + 0xdb, 0x7a, 0x1c, 0x4f, 0xf9, 0x6d, 0x01, 0xe6, 0x36, 0x2c, 0xcb, 0x69, 0xe9, 0xbe, 0xe9, 0xd8, + 0x08, 0x93, 0x8e, 0xe5, 0xcb, 0x0e, 0xcc, 0x06, 0xba, 0xf9, 0x8e, 0x6e, 0x1b, 0x16, 0x26, 0x15, + 0xa9, 0x5e, 0x5c, 0x9d, 0x5e, 0x3f, 0xab, 0x0e, 0x52, 0x9f, 0x8a, 0x04, 0x24, 0x6d, 0xf9, 0xc5, + 0x51, 0x6d, 0xa2, 0x7b, 0x54, 0x9b, 0x15, 0xd7, 0x09, 0x8a, 0x53, 0x97, 0x77, 0x61, 0x4e, 0x3f, + 0xd4, 0x4d, 0x4b, 0xdf, 0xb5, 0xf0, 0x75, 0x7b, 0xdb, 0x31, 0x30, 0xa9, 0x14, 0xea, 0xd2, 0xea, + 0xf4, 0x7a, 0x3d, 0xca, 0x91, 0xea, 0x58, 0x3d, 0x5c, 0x53, 0x29, 0x40, 0x13, 0x5b, 0xb8, 0xe5, + 0x3b, 0x9e, 0xb6, 0xd8, 0x3d, 0xaa, 0xcd, 0x6d, 0xc4, 0xb0, 0x51, 0x82, 0x9e, 0xdc, 0x80, 0x93, + 0x64, 0x5f, 0xf7, 0x30, 0x5d, 0xab, 0x14, 0xeb, 0xd2, 0xea, 0x94, 0x36, 0xcf, 0x0f, 0x78, 0xb2, + 0x19, 0x6c, 0xa0, 0x3e, 0x8c, 0xb2, 0x0c, 0x4b, 0x71, 0xcd, 0x5c, 0x73, 0x0c, 0x6c, 0x29, 0x7f, + 0x2a, 0xc0, 0xe9, 0x4d, 0xcf, 0x3c, 0xc4, 0x5e, 0x42, 0x73, 0xbf, 0x90, 0x60, 0xf9, 0x10, 0xdb, + 0x86, 0xe3, 0x21, 0xfc, 0x93, 0x0e, 0x26, 0xfe, 0x8e, 0xee, 0xe9, 0x6d, 0xec, 0x63, 0x8f, 0xaa, + 0x90, 0x0a, 0x74, 0x2e, 0x22, 0x50, 0x68, 0x29, 0xd5, 0x3d, 0xd8, 0x53, 0xb9, 0xa5, 0x54, 0xa4, + 0x3f, 0xfc, 0xf6, 0x23, 0x1f, 0xdb, 0xc4, 0x74, 0x6c, 0xad, 0xc6, 0x8f, 0xb8, 0x7c, 0x2b, 0x9d, + 0x2a, 0xca, 0x62, 0x47, 0x8f, 0xb2, 0xa4, 0xa7, 0x9d, 0x9f, 0x6b, 0xf6, 0xf3, 0xc1, 0xb6, 0x4c, + 0x15, 0x5d, 0xfb, 0x94, 0x1f, 0x27, 0x5d, 0x33, 0x28, 0x9d, 0xa1, 0xf2, 0x9b, 0x02, 0x94, 0x7b, + 0x0a, 0xe3, 0xc7, 0x24, 0xf2, 0x3a, 0x80, 0xc1, 0x56, 0xb6, 0xf5, 0x36, 0x66, 0xaa, 0x39, 0xa9, + 0xc9, 0x9c, 0x38, 0x6c, 0x86, 0x3b, 0x28, 0x02, 0x25, 0x13, 0x98, 0xeb, 0x09, 0x1b, 0x51, 0x6a, + 0x61, 0x14, 0xa5, 0x56, 0x38, 0xa3, 0xb9, 0x5b, 0x31, 0x72, 0x28, 0xc1, 0x40, 0xfe, 0x3e, 0x4c, + 0x79, 0xfc, 0xd0, 0x95, 0x22, 0x0b, 0x82, 0x73, 0xc3, 0x05, 0x01, 0x17, 0x55, 0x9b, 0xe3, 0xcc, + 0xa6, 0x02, 0xd9, 0x51, 0x48, 0x50, 0x59, 0x80, 0x79, 0xea, 0x9c, 0x01, 0x4a, 0x4f, 0x5b, 0xaf, + 0x0a, 0xe2, 0x6a, 0xd3, 0x32, 0x5b, 0x58, 0xbe, 0x0f, 0x53, 0x34, 0x59, 0x18, 0xba, 0xaf, 0x73, + 0x4f, 0xfa, 0x2c, 0x53, 0x68, 0x9a, 0x5a, 0x54, 0x0a, 0x4d, 0x83, 0xe5, 0xfa, 0xee, 0x8f, 0x71, + 0xcb, 0xbf, 0x86, 0x7d, 0xbd, 0xaf, 0xe0, 0xfe, 0x1a, 0x0a, 0xa9, 0xca, 0x67, 0x61, 0xca, 0x76, + 0x0c, 0xcc, 0x0c, 0x52, 0x60, 0x06, 0x09, 0x8f, 0xbe, 0xcd, 0xd7, 0x51, 0x08, 0x11, 0x33, 0x60, + 0x71, 0x28, 0x03, 0x3e, 0x82, 0x79, 0x3b, 0x2e, 0x6e, 0xa5, 0xc4, 0x84, 0x69, 0x0c, 0x56, 0x6a, + 0x42, 0x4b, 0xda, 0xc7, 0x9c, 0x57, 0x52, 0x81, 0x28, 0xc9, 0x44, 0xf9, 0x9b, 0x04, 0x4b, 0x09, + 0x9d, 0x5e, 0x35, 0x89, 0x2f, 0xff, 0x20, 0xa1, 0x57, 0x75, 0x38, 0xbd, 0x52, 0x6c, 0xa6, 0xd5, + 0x50, 0x4b, 0xc1, 0x4a, 0x44, 0xa7, 0x37, 0x60, 0xd2, 0xf4, 0x71, 0x9b, 0xfa, 0x69, 0x31, 0x9f, + 0x94, 0xec, 0x84, 0xda, 0x0c, 0xa7, 0x3d, 0xb9, 0x45, 0xa9, 0xa0, 0x1e, 0x31, 0xe5, 0x2f, 0x05, + 0x58, 0xdc, 0x71, 0x8c, 0x66, 0x6b, 0x1f, 0x1b, 0x1d, 0xcb, 0xb4, 0xf7, 0x2e, 0x39, 0xb6, 0x8f, + 0x1f, 0xf9, 0x63, 0x70, 0x92, 0x3b, 0x50, 0x22, 0x2e, 0x6e, 0xf1, 0xb8, 0xbb, 0x30, 0x58, 0x9e, + 0xb4, 0x33, 0x36, 0x5d, 0xdc, 0xd2, 0x4e, 0x71, 0x1e, 0x25, 0xfa, 0x85, 0x18, 0x45, 0xf9, 0x3e, + 0x7c, 0x44, 0x7c, 0xdd, 0xef, 0x10, 0xe6, 0x4c, 0xd3, 0xeb, 0x17, 0x47, 0xa0, 0xcd, 0xf0, 0xb5, + 0x32, 0xa7, 0xfe, 0x51, 0xef, 0x1b, 0x71, 0xba, 0xca, 0x2b, 0x09, 0x2a, 0x69, 0x68, 0x63, 0xf0, + 0x83, 0xdb, 0xa2, 0x1f, 0xac, 0xe7, 0x97, 0x2d, 0xc3, 0x15, 0x9e, 0x66, 0xc8, 0x44, 0x15, 0x2b, + 0x5f, 0x84, 0x53, 0x84, 0x95, 0x49, 0x6c, 0x50, 0xd7, 0xe2, 0x69, 0x76, 0x91, 0x13, 0x3a, 0xd5, + 0x8c, 0xec, 0x21, 0x01, 0x52, 0xfe, 0x1a, 0x94, 0x5d, 0xc7, 0xc7, 0xb6, 0x6f, 0xea, 0x56, 0x50, + 0x8e, 0x8b, 0x34, 0xc2, 0xbb, 0x47, 0xb5, 0xf2, 0x8e, 0xb0, 0x83, 0x62, 0x90, 0xca, 0xef, 0x24, + 0x58, 0xc9, 0xb6, 0x8e, 0xfc, 0x53, 0x28, 0x07, 0x12, 0x5f, 0xb2, 0x74, 0xb3, 0x1d, 0xf4, 0x16, + 0x5f, 0x1f, 0x2e, 0xad, 0x32, 0x9c, 0x3e, 0x6d, 0x6e, 0xf2, 0xd3, 0x5c, 0xa6, 0xb2, 0x00, 0x46, + 0x50, 0x8c, 0x95, 0xf2, 0xfb, 0x02, 0xcc, 0x08, 0x20, 0x63, 0x08, 0x99, 0xef, 0x09, 0x21, 0xd3, + 0xc8, 0x23, 0x66, 0x56, 0xac, 0xdc, 0x8d, 0xc5, 0xca, 0x5a, 0x1e, 0xa2, 0x83, 0x83, 0xa4, 0x2b, + 0x41, 0x55, 0x80, 0xbf, 0xe4, 0xd8, 0xa4, 0xd3, 0xa6, 0xa5, 0xfb, 0x01, 0xf6, 0xb0, 0xdd, 0xc2, + 0xb4, 0x50, 0xe8, 0xae, 0x79, 0xc5, 0x73, 0x3a, 0x2e, 0x77, 0xa9, 0xd0, 0xf5, 0x37, 0x76, 0xb6, + 0xd8, 0x3a, 0x0a, 0x21, 0x28, 0x74, 0x70, 0x22, 0x5e, 0x26, 0x22, 0x15, 0x91, 0x97, 0xca, 0x10, + 0x42, 0xae, 0x43, 0xc9, 0xa6, 0x05, 0xa5, 0xc4, 0x20, 0x43, 0xd9, 0x59, 0x29, 0x61, 0x3b, 0xb2, + 0x06, 0xc5, 0x8e, 0x69, 0x54, 0x26, 0x19, 0xc0, 0x67, 0x1c, 0xa0, 0x78, 0x73, 0x6b, 0xf3, 0xed, + 0x51, 0xed, 0x4b, 0x59, 0x5d, 0xb0, 0xff, 0xd8, 0xc5, 0x44, 0xbd, 0xb9, 0xb5, 0x89, 0x28, 0xb2, + 0xf2, 0x4c, 0x82, 0x79, 0x41, 0xc8, 0x31, 0xa4, 0x80, 0x1d, 0x31, 0x05, 0x7c, 0x39, 0x87, 0xc9, + 0x32, 0x62, 0xff, 0x57, 0x45, 0x58, 0x16, 0xe0, 0x22, 0x6d, 0xcb, 0xbb, 0x77, 0xeb, 0x87, 0x30, + 0x13, 0x0e, 0x13, 0x97, 0x3d, 0xa7, 0xcd, 0xfd, 0xfb, 0x5b, 0x39, 0xe4, 0x8a, 0x34, 0x5e, 0x81, + 0x73, 0x69, 0xf3, 0xdd, 0xa3, 0xda, 0xcc, 0x95, 0x28, 0x61, 0x24, 0xf2, 0xc9, 0xdd, 0xc8, 0xcb, + 0x16, 0x94, 0x0d, 0xa1, 0xfb, 0xac, 0x94, 0x86, 0x99, 0x66, 0xc4, 0x8e, 0xb5, 0x9f, 0x62, 0xc4, + 0x75, 0x14, 0xa3, 0xad, 0xfc, 0x53, 0x82, 0x4f, 0x32, 0xa4, 0x1c, 0x83, 0x97, 0xdd, 0x13, 0xbd, + 0xec, 0x2b, 0x23, 0x59, 0x23, 0xc3, 0xdf, 0x7e, 0x2d, 0x41, 0xfd, 0x38, 0xfb, 0xe5, 0x4c, 0x0e, + 0x75, 0x28, 0x1d, 0x98, 0xb6, 0xc1, 0xfb, 0xcd, 0x30, 0xdc, 0xbf, 0x6b, 0xda, 0x06, 0x62, 0x3b, + 0x61, 0x42, 0x28, 0x66, 0x25, 0x04, 0xe5, 0x89, 0x04, 0x9f, 0x0e, 0xac, 0x0e, 0x21, 0x0d, 0x29, + 0x33, 0xa9, 0x7c, 0x13, 0x66, 0x3b, 0x36, 0xe9, 0x98, 0x3e, 0x75, 0x98, 0x68, 0xc1, 0x5b, 0xa0, + 0xf3, 0xeb, 0x4d, 0x71, 0x0b, 0xc5, 0x61, 0x95, 0x3f, 0x14, 0x62, 0xf9, 0x84, 0x95, 0xdf, 0x2b, + 0x30, 0x1f, 0x29, 0x3f, 0x84, 0x44, 0x46, 0x9d, 0xb0, 0x7b, 0x45, 0x71, 0x00, 0x94, 0xc4, 0xa1, + 0xa1, 0xe6, 0x46, 0x55, 0xfd, 0x45, 0x86, 0x9a, 0xb0, 0x81, 0x44, 0x3e, 0xf2, 0x0e, 0x94, 0xfb, + 0x13, 0x1d, 0xed, 0xa4, 0xb9, 0x19, 0x56, 0x83, 0x58, 0xd8, 0x10, 0x76, 0xdf, 0x26, 0x56, 0x50, + 0x0c, 0x5f, 0xf9, 0x6f, 0x01, 0x16, 0x52, 0xca, 0xd1, 0x48, 0xf3, 0xe0, 0x0f, 0x01, 0xfa, 0xd4, + 0xb9, 0x4e, 0xd4, 0x7c, 0x53, 0xad, 0x56, 0xa6, 0xf4, 0x23, 0xab, 0x11, 0x8a, 0x32, 0x81, 0x69, + 0x0f, 0x13, 0xec, 0x1d, 0x62, 0xe3, 0xb2, 0xe3, 0xf1, 0xe9, 0xef, 0x1b, 0x39, 0x94, 0x9e, 0x28, + 0x9d, 0xda, 0x02, 0x17, 0x69, 0x1a, 0xf5, 0x09, 0xa3, 0x28, 0x17, 0xb9, 0x09, 0x4b, 0x06, 0x8e, + 0x8e, 0xd1, 0x2c, 0xad, 0x60, 0x83, 0x55, 0xc4, 0xa9, 0xfe, 0x00, 0xbe, 0x99, 0x06, 0x84, 0xd2, + 0x71, 0x95, 0x7f, 0x48, 0xb0, 0x24, 0x9c, 0xec, 0x06, 0x6e, 0xbb, 0x96, 0xee, 0x8f, 0x63, 0xac, + 0xbc, 0x2b, 0xb4, 0x3f, 0x5f, 0xcd, 0xa1, 0xbe, 0xe0, 0x90, 0x59, 0x6d, 0x90, 0xf2, 0x77, 0x09, + 0x3e, 0x4e, 0xc5, 0x18, 0x43, 0xa2, 0xbd, 0x23, 0x26, 0xda, 0xcf, 0x47, 0x90, 0x2b, 0x23, 0xcd, + 0xbe, 0xcc, 0x92, 0xaa, 0xd9, 0x1b, 0x93, 0x3e, 0xbc, 0x7e, 0x55, 0x79, 0x5e, 0x14, 0xda, 0x6e, + 0x32, 0x8e, 0xfe, 0x44, 0xcc, 0x28, 0x85, 0xa1, 0x32, 0x4a, 0x22, 0xd1, 0x16, 0x73, 0x26, 0x5a, + 0x42, 0x46, 0x4b, 0xb4, 0x77, 0x61, 0x46, 0xac, 0x3e, 0xa5, 0x21, 0x6f, 0x3f, 0x19, 0xe9, 0xa6, + 0x50, 0x9d, 0x44, 0x4a, 0xf2, 0x55, 0x58, 0x24, 0xbe, 0xd7, 0x69, 0xf9, 0x1d, 0x0f, 0x1b, 0x91, + 0x9b, 0xb3, 0x49, 0x96, 0x4f, 0x2a, 0xdd, 0xa3, 0xda, 0x62, 0x33, 0x65, 0x1f, 0xa5, 0x62, 0xc5, + 0x3b, 0x67, 0x42, 0xde, 0xe7, 0xce, 0x99, 0x64, 0x75, 0x32, 0xcf, 0xc4, 0xce, 0x39, 0x6a, 0xb5, + 0x0f, 0xa1, 0x73, 0x1e, 0xe0, 0x65, 0x03, 0x3b, 0x67, 0x3f, 0xe5, 0x02, 0xb5, 0x57, 0xd5, 0x8e, + 0x29, 0x9b, 0xf1, 0x7b, 0xd2, 0x5c, 0x37, 0xa8, 0xb7, 0xe1, 0xc4, 0x03, 0xd3, 0x62, 0xcc, 0x4a, + 0x79, 0x5e, 0x11, 0x2e, 0x33, 0x24, 0x6d, 0x96, 0xb3, 0x3a, 0xd1, 0xfb, 0x26, 0x28, 0xa0, 0x16, + 0xef, 0xb4, 0xa3, 0x5a, 0x79, 0x9f, 0x3b, 0xed, 0xe8, 0x39, 0x33, 0xfc, 0xf3, 0xaf, 0x62, 0xa7, + 0x9d, 0x6a, 0xef, 0xf1, 0x77, 0xda, 0x74, 0xf2, 0xa2, 0x7f, 0x89, 0xab, 0xb7, 0x82, 0x09, 0x3d, + 0x9c, 0xbc, 0xb6, 0x83, 0x0d, 0xd4, 0x87, 0x51, 0x9e, 0x4b, 0x50, 0x16, 0xcd, 0x39, 0x52, 0xa3, + 0xf7, 0x44, 0x82, 0x05, 0x4f, 0x20, 0x13, 0x7d, 0xc8, 0x58, 0xcb, 0xe3, 0x4e, 0xbd, 0xcb, 0xe3, + 0x4f, 0x38, 0xc3, 0x85, 0x94, 0x4d, 0x94, 0xc6, 0x4a, 0x59, 0x82, 0x34, 0x58, 0xe5, 0x5f, 0x11, + 0x01, 0x7b, 0x8f, 0x59, 0x23, 0x09, 0x58, 0x87, 0x12, 0xf3, 0xd2, 0x98, 0x71, 0x36, 0x75, 0x5f, + 0x47, 0x6c, 0x47, 0xf6, 0xa0, 0xdc, 0xcf, 0xc7, 0x74, 0x9d, 0xe5, 0xef, 0x63, 0x6f, 0x60, 0xfb, + 0x99, 0x3d, 0xf6, 0x36, 0xc7, 0x2e, 0xf2, 0x9a, 0x02, 0x45, 0x14, 0xe3, 0xa0, 0xfc, 0xb2, 0x00, + 0xb3, 0xb1, 0xd7, 0x8c, 0xd4, 0x37, 0x18, 0xe9, 0x5d, 0xbf, 0xc1, 0xfc, 0x5c, 0x82, 0x45, 0x4f, + 0x3c, 0x48, 0xd4, 0x01, 0xd6, 0x73, 0x3d, 0xc8, 0xf4, 0x3c, 0xe0, 0x0c, 0x67, 0xbf, 0x98, 0xb6, + 0x8b, 0x52, 0xb9, 0x29, 0xa7, 0x21, 0x15, 0x5a, 0xf9, 0x73, 0x11, 0x2a, 0x59, 0x8a, 0x96, 0x7f, + 0x26, 0xc1, 0x52, 0x4f, 0xa0, 0x58, 0x20, 0x8f, 0xa6, 0xb6, 0xb0, 0xff, 0xbf, 0x95, 0x46, 0x13, + 0xa5, 0xb3, 0x12, 0x0f, 0x11, 0x1d, 0x06, 0x47, 0x7b, 0x3f, 0x4b, 0x1e, 0x42, 0x18, 0x30, 0xd3, + 0x59, 0x09, 0xef, 0x4b, 0xa5, 0x63, 0xdf, 0x97, 0x7e, 0x04, 0x27, 0x3c, 0x36, 0xa2, 0xd1, 0x4e, + 0x85, 0x26, 0xd8, 0xf3, 0xc3, 0xdc, 0xd6, 0x24, 0xe6, 0xbb, 0xb0, 0x7a, 0xf4, 0xbe, 0x09, 0x0a, + 0xa8, 0x2a, 0x7f, 0x94, 0x20, 0xe1, 0x7b, 0x23, 0x05, 0xaf, 0x0e, 0xe0, 0xfe, 0x9f, 0x0a, 0x0d, + 0x59, 0x44, 0xb4, 0x18, 0x21, 0xaa, 0x69, 0x2f, 0xde, 0x54, 0x27, 0x5e, 0xbe, 0xa9, 0x4e, 0xbc, + 0x7e, 0x53, 0x9d, 0x78, 0xd2, 0xad, 0x4a, 0x2f, 0xba, 0x55, 0xe9, 0x65, 0xb7, 0x2a, 0xbd, 0xee, + 0x56, 0xa5, 0x7f, 0x77, 0xab, 0xd2, 0xd3, 0xff, 0x54, 0x27, 0xee, 0x9d, 0x19, 0xf4, 0x4b, 0x88, + 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x11, 0xc0, 0x9d, 0x25, 0x28, 0x21, 0x00, 0x00, } func (m *AllocationResult) Marshal() (dAtA []byte, err error) { @@ -742,6 +1243,247 @@ func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *AllocationResultModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AllocationResultModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AllocationResultModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *DriverAllocationResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DriverAllocationResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DriverAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.AllocationResultModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.VendorRequestParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DriverRequests) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DriverRequests) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DriverRequests) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Requests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size, err := m.VendorParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *NodeResourceModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeResourceModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeResourceModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *NodeResourceSlice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeResourceSlice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.NodeResourceModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0x1a + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *NodeResourceSliceList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeResourceSliceList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *PodSchedulingContext) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1059,6 +1801,120 @@ func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ResourceClaimParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DriverRequests) > 0 { + for iNdEx := len(m.DriverRequests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DriverRequests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + i-- + if m.Shareable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + if m.GeneratedFrom != nil { + { + size, err := m.GeneratedFrom.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimParametersList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimParametersList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimParametersList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *ResourceClaimParametersReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1394,6 +2250,16 @@ func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.StructuredParameters != nil { + i-- + if *m.StructuredParameters { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } if m.SuitableNodes != nil { { size, err := m.SuitableNodes.MarshalToSizedBuffer(dAtA[:i]) @@ -1483,6 +2349,126 @@ func (m *ResourceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ResourceClassParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClassParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Filters) > 0 { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.VendorParameters) > 0 { + for iNdEx := len(m.VendorParameters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VendorParameters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.GeneratedFrom != nil { + { + size, err := m.GeneratedFrom.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClassParametersList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClassParametersList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassParametersList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *ResourceClassParametersReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1526,6 +2512,67 @@ func (m *ResourceClassParametersReference) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *ResourceFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ResourceFilterModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceFilterModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceFilterModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceFilterModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *ResourceHandle) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1546,6 +2593,18 @@ func (m *ResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.StructuredData != nil { + { + size, err := m.StructuredData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } i -= len(m.Data) copy(dAtA[i:], m.Data) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data))) @@ -1559,6 +2618,172 @@ func (m *ResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ResourceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ResourceRequestModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.VendorParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceRequestModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceRequestModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceRequestModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *StructuredResourceHandle) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StructuredResourceHandle) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StructuredResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x22 + { + size, err := m.VendorClaimParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.VendorClassParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *VendorParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VendorParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VendorParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset @@ -1590,6 +2815,90 @@ func (m *AllocationResult) Size() (n int) { return n } +func (m *AllocationResultModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *DriverAllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VendorRequestParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.AllocationResultModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DriverRequests) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.VendorParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Requests) > 0 { + for _, e := range m.Requests { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *NodeResourceModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *NodeResourceSlice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.NodeResourceModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NodeResourceSliceList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *PodSchedulingContext) Size() (n int) { if m == nil { return 0 @@ -1703,6 +3012,45 @@ func (m *ResourceClaimList) Size() (n int) { return n } +func (m *ResourceClaimParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.GeneratedFrom != nil { + l = m.GeneratedFrom.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 2 + if len(m.DriverRequests) > 0 { + for _, e := range m.DriverRequests { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClaimParametersList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *ResourceClaimParametersReference) Size() (n int) { if m == nil { return 0 @@ -1835,6 +3183,9 @@ func (m *ResourceClass) Size() (n int) { l = m.SuitableNodes.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.StructuredParameters != nil { + n += 2 + } return n } @@ -1855,6 +3206,50 @@ func (m *ResourceClassList) Size() (n int) { return n } +func (m *ResourceClassParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.GeneratedFrom != nil { + l = m.GeneratedFrom.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.VendorParameters) > 0 { + for _, e := range m.VendorParameters { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Filters) > 0 { + for _, e := range m.Filters { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClassParametersList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *ResourceClassParametersReference) Size() (n int) { if m == nil { return 0 @@ -1872,6 +3267,28 @@ func (m *ResourceClassParametersReference) Size() (n int) { return n } +func (m *ResourceFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.ResourceFilterModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceFilterModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *ResourceHandle) Size() (n int) { if m == nil { return 0 @@ -1882,6 +3299,66 @@ func (m *ResourceHandle) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Data) n += 1 + l + sovGenerated(uint64(l)) + if m.StructuredData != nil { + l = m.StructuredData.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VendorParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.ResourceRequestModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceRequestModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *StructuredResourceHandle) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VendorClassParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.VendorClaimParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *VendorParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Parameters.Size() + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -1908,6 +3385,81 @@ func (this *AllocationResult) String() string { }, "") return s } +func (this *AllocationResultModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllocationResultModel{`, + `}`, + }, "") + return s +} +func (this *DriverAllocationResult) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DriverAllocationResult{`, + `VendorRequestParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorRequestParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `AllocationResultModel:` + strings.Replace(strings.Replace(this.AllocationResultModel.String(), "AllocationResultModel", "AllocationResultModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DriverRequests) String() string { + if this == nil { + return "nil" + } + repeatedStringForRequests := "[]ResourceRequest{" + for _, f := range this.Requests { + repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "ResourceRequest", "ResourceRequest", 1), `&`, ``, 1) + "," + } + repeatedStringForRequests += "}" + s := strings.Join([]string{`&DriverRequests{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `VendorParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `Requests:` + repeatedStringForRequests + `,`, + `}`, + }, "") + return s +} +func (this *NodeResourceModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NodeResourceModel{`, + `}`, + }, "") + return s +} +func (this *NodeResourceSlice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NodeResourceSlice{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `NodeResourceModel:` + strings.Replace(strings.Replace(this.NodeResourceModel.String(), "NodeResourceModel", "NodeResourceModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *NodeResourceSliceList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]NodeResourceSlice{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "NodeResourceSlice", "NodeResourceSlice", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&NodeResourceSliceList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} func (this *PodSchedulingContext) String() string { if this == nil { return "nil" @@ -2003,6 +3555,40 @@ func (this *ResourceClaimList) String() string { }, "") return s } +func (this *ResourceClaimParameters) String() string { + if this == nil { + return "nil" + } + repeatedStringForDriverRequests := "[]DriverRequests{" + for _, f := range this.DriverRequests { + repeatedStringForDriverRequests += strings.Replace(strings.Replace(f.String(), "DriverRequests", "DriverRequests", 1), `&`, ``, 1) + "," + } + repeatedStringForDriverRequests += "}" + s := strings.Join([]string{`&ResourceClaimParameters{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `GeneratedFrom:` + strings.Replace(this.GeneratedFrom.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, + `Shareable:` + fmt.Sprintf("%v", this.Shareable) + `,`, + `DriverRequests:` + repeatedStringForDriverRequests + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimParametersList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClaimParameters{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimParameters", "ResourceClaimParameters", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimParametersList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} func (this *ResourceClaimParametersReference) String() string { if this == nil { return "nil" @@ -2103,6 +3689,7 @@ func (this *ResourceClass) String() string { `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, `SuitableNodes:` + strings.Replace(fmt.Sprintf("%v", this.SuitableNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, + `StructuredParameters:` + valueToStringGenerated(this.StructuredParameters) + `,`, `}`, }, "") return s @@ -2123,6 +3710,45 @@ func (this *ResourceClassList) String() string { }, "") return s } +func (this *ResourceClassParameters) String() string { + if this == nil { + return "nil" + } + repeatedStringForVendorParameters := "[]VendorParameters{" + for _, f := range this.VendorParameters { + repeatedStringForVendorParameters += strings.Replace(strings.Replace(f.String(), "VendorParameters", "VendorParameters", 1), `&`, ``, 1) + "," + } + repeatedStringForVendorParameters += "}" + repeatedStringForFilters := "[]ResourceFilter{" + for _, f := range this.Filters { + repeatedStringForFilters += strings.Replace(strings.Replace(f.String(), "ResourceFilter", "ResourceFilter", 1), `&`, ``, 1) + "," + } + repeatedStringForFilters += "}" + s := strings.Join([]string{`&ResourceClassParameters{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `GeneratedFrom:` + strings.Replace(this.GeneratedFrom.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, + `VendorParameters:` + repeatedStringForVendorParameters + `,`, + `Filters:` + repeatedStringForFilters + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClassParametersList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClassParameters{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClassParameters", "ResourceClassParameters", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClassParametersList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} func (this *ResourceClassParametersReference) String() string { if this == nil { return "nil" @@ -2136,6 +3762,26 @@ func (this *ResourceClassParametersReference) String() string { }, "") return s } +func (this *ResourceFilter) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceFilter{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `ResourceFilterModel:` + strings.Replace(strings.Replace(this.ResourceFilterModel.String(), "ResourceFilterModel", "ResourceFilterModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceFilterModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceFilterModel{`, + `}`, + }, "") + return s +} func (this *ResourceHandle) String() string { if this == nil { return "nil" @@ -2143,6 +3789,56 @@ func (this *ResourceHandle) String() string { s := strings.Join([]string{`&ResourceHandle{`, `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `StructuredData:` + strings.Replace(this.StructuredData.String(), "StructuredResourceHandle", "StructuredResourceHandle", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceRequest{`, + `VendorParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `ResourceRequestModel:` + strings.Replace(strings.Replace(this.ResourceRequestModel.String(), "ResourceRequestModel", "ResourceRequestModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceRequestModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceRequestModel{`, + `}`, + }, "") + return s +} +func (this *StructuredResourceHandle) String() string { + if this == nil { + return "nil" + } + repeatedStringForResults := "[]DriverAllocationResult{" + for _, f := range this.Results { + repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DriverAllocationResult", "DriverAllocationResult", 1), `&`, ``, 1) + "," + } + repeatedStringForResults += "}" + s := strings.Join([]string{`&StructuredResourceHandle{`, + `VendorClassParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorClassParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `VendorClaimParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorClaimParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `Results:` + repeatedStringForResults + `,`, + `}`, + }, "") + return s +} +func (this *VendorParameters) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VendorParameters{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -2295,6 +3991,668 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { } return nil } +func (m *AllocationResultModel) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllocationResultModel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocationResultModel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DriverAllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DriverAllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DriverAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorRequestParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VendorRequestParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationResultModel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AllocationResultModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DriverRequests) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DriverRequests: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DriverRequests: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VendorParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, ResourceRequest{}) + if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeResourceModel) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeResourceModel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeResourceModel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeResourceSlice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeResourceSlice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeResourceSlice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeResourceModel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NodeResourceModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeResourceSliceList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeResourceSliceList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeResourceSliceList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, NodeResourceSlice{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3203,6 +5561,296 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { } return nil } +func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimParameters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GeneratedFrom", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GeneratedFrom == nil { + m.GeneratedFrom = &ResourceClaimParametersReference{} + } + if err := m.GeneratedFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Shareable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Shareable = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverRequests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverRequests = append(m.DriverRequests, DriverRequests{}) + if err := m.DriverRequests[len(m.DriverRequests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimParametersList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimParametersList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimParametersList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ResourceClaimParameters{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4300,6 +6948,27 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StructuredParameters", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.StructuredParameters = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -4438,6 +7107,310 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { } return nil } +func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClassParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClassParameters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GeneratedFrom", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GeneratedFrom == nil { + m.GeneratedFrom = &ResourceClassParametersReference{} + } + if err := m.GeneratedFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VendorParameters = append(m.VendorParameters, VendorParameters{}) + if err := m.VendorParameters[len(m.VendorParameters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filters = append(m.Filters, ResourceFilter{}) + if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClassParametersList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClassParametersList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClassParametersList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ResourceClassParameters{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4616,6 +7589,171 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } return nil } +func (m *ResourceFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceFilterModel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ResourceFilterModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceFilterModel) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceFilterModel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceFilterModel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ResourceHandle) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4709,6 +7847,505 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { } m.Data = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StructuredData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StructuredData == nil { + m.StructuredData = &StructuredResourceHandle{} + } + if err := m.StructuredData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VendorParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceRequestModel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ResourceRequestModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceRequestModel) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceRequestModel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceRequestModel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StructuredResourceHandle) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StructuredResourceHandle: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StructuredResourceHandle: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorClassParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VendorClassParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorClaimParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VendorClaimParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, DriverAllocationResult{}) + if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VendorParameters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VendorParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VendorParameters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/staging/src/k8s.io/api/resource/v1alpha2/generated.proto b/staging/src/k8s.io/api/resource/v1alpha2/generated.proto index c9f1ec1c0ff..2248d551d9d 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/generated.proto +++ b/staging/src/k8s.io/api/resource/v1alpha2/generated.proto @@ -63,6 +63,72 @@ message AllocationResult { optional bool shareable = 3; } +// AllocationResultModel must have one and only one field set. +message AllocationResultModel { +} + +// DriverAllocationResult contains vendor parameters and the allocation result for +// one request. +message DriverAllocationResult { + // VendorRequestParameters are the per-request configuration parameters + // from the time that the claim was allocated. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorRequestParameters = 1; + + optional AllocationResultModel allocationResultModel = 2; +} + +// DriverRequests describes all resources that are needed from one particular driver. +message DriverRequests { + // DriverName is the name used by the DRA driver kubelet plugin. + optional string driverName = 1; + + // VendorParameters are arbitrary setup parameters for all requests of the + // claim. They are ignored while allocating the claim. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorParameters = 2; + + // Requests describes all resources that are needed from the driver. + // +listType=atomic + repeated ResourceRequest requests = 3; +} + +// NodeResourceModel must have one and only one field set. +message NodeResourceModel { +} + +// NodeResourceSlice provides information about available +// resources on individual nodes. +message NodeResourceSlice { + // Standard object metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // NodeName identifies the node where the capacity is available. + // A field selector can be used to list only NodeResourceSlice + // objects with a certain node name. + optional string nodeName = 2; + + // DriverName identifies the DRA driver providing the capacity information. + // A field selector can be used to list only NodeResourceSlice + // objects with a certain driver name. + optional string driverName = 3; + + optional NodeResourceModel nodeResourceModel = 4; +} + +// NodeResourceSliceList is a collection of NodeResourceSlices. +message NodeResourceSliceList { + // Standard list metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of node resource capacity objects. + repeated NodeResourceSlice items = 2; +} + // PodSchedulingContext objects hold information that is needed to schedule // a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation // mode. @@ -176,6 +242,45 @@ message ResourceClaimList { repeated ResourceClaim items = 2; } +// ResourceClaimParameters defines resource requests for a ResourceClaim in an +// in-tree format understood by Kubernetes. +message ResourceClaimParameters { + // Standard object metadata + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the claim parameters when the parameter reference of the claim refers + // to some unknown type. + // +optional + optional ResourceClaimParametersReference generatedFrom = 2; + + // Shareable indicates whether the allocated claim is meant to be shareable + // by multiple consumers at the same time. + // +optional + optional bool shareable = 3; + + // DriverRequests describes all resources that are needed for the + // allocated claim. A single claim may use resources coming from + // different drivers. For each driver, this array has at most one + // entry which then may have one or more per-driver requests. + // + // May be empty, in which case the claim can always be allocated. + // + // +listType=atomic + repeated DriverRequests driverRequests = 4; +} + +// ResourceClaimParametersList is a collection of ResourceClaimParameters. +message ResourceClaimParametersList { + // Standard list metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of node resource capacity objects. + repeated ResourceClaimParameters items = 2; +} + // ResourceClaimParametersReference contains enough information to let you // locate the parameters for a ResourceClaim. The object must be in the same // namespace as the ResourceClaim. @@ -344,6 +449,11 @@ message ResourceClass { // Setting this field is optional. If null, all nodes are candidates. // +optional optional k8s.io.api.core.v1.NodeSelector suitableNodes = 4; + + // If and only if allocation of claims using this class is handled + // via structured parameters, then StructuredParameters must be set to true. + // +optional + optional bool structuredParameters = 5; } // ResourceClassList is a collection of classes. @@ -356,6 +466,43 @@ message ResourceClassList { repeated ResourceClass items = 2; } +// ResourceClassParameters defines resource requests for a ResourceClass in an +// in-tree format understood by Kubernetes. +message ResourceClassParameters { + // Standard object metadata + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the class parameters when the parameter reference of the class refers + // to some unknown type. + // +optional + optional ResourceClassParametersReference generatedFrom = 2; + + // VendorParameters are arbitrary setup parameters for all claims using + // this class. They are ignored while allocating the claim. There must + // not be more than one entry per driver. + // + // +listType=atomic + // +optional + repeated VendorParameters vendorParameters = 3; + + // Filters describes additional contraints that must be met when using the class. + // + // +listType=atomic + repeated ResourceFilter filters = 4; +} + +// ResourceClassParametersList is a collection of ResourceClassParameters. +message ResourceClassParametersList { + // Standard list metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of node resource capacity objects. + repeated ResourceClassParameters items = 2; +} + // ResourceClassParametersReference contains enough information to let you // locate the parameters for a ResourceClass. message ResourceClassParametersReference { @@ -379,6 +526,18 @@ message ResourceClassParametersReference { optional string namespace = 4; } +// ResourceFilter is a filter for resources from one particular driver. +message ResourceFilter { + // DriverName is the name used by the DRA driver kubelet plugin. + optional string driverName = 1; + + optional ResourceFilterModel resourceFilterModel = 2; +} + +// ResourceFilterModel must have one and only one field set. +message ResourceFilterModel { +} + // ResourceHandle holds opaque resource data for processing by a specific kubelet plugin. message ResourceHandle { // DriverName specifies the name of the resource driver whose kubelet @@ -398,5 +557,61 @@ message ResourceHandle { // future, but not reduced. // +optional optional string data = 2; + + // If StructuredData is set, then it needs to be used instead of Data. + // + // +optional + optional StructuredResourceHandle structuredData = 5; +} + +// ResourceRequest is a request for resources from one particular driver. +message ResourceRequest { + // VendorParameters are arbitrary setup parameters for the requested + // resource. They are ignored while allocating a claim. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorParameters = 1; + + optional ResourceRequestModel resourceRequestModel = 2; +} + +// ResourceRequestModel must have one and only one field set. +message ResourceRequestModel { +} + +// StructuredResourceHandle is the in-tree representation of the allocation result. +message StructuredResourceHandle { + // VendorClassParameters are the per-claim configuration parameters + // from the resource class at the time that the claim was allocated. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorClassParameters = 1; + + // VendorClaimParameters are the per-claim configuration parameters + // from the resource claim parameters at the time that the claim was + // allocated. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorClaimParameters = 2; + + // NodeName is the name of the node providing the necessary resources. + optional string nodeName = 4; + + // Results lists all allocated driver resources. + // + // +listType=atomic + repeated DriverAllocationResult results = 5; +} + +// VendorParameters are opaque parameters for one particular driver. +message VendorParameters { + // DriverName is the name used by the DRA driver kubelet plugin. + optional string driverName = 1; + + // Parameters can be arbitrary setup parameters. They are ignored while + // allocating a claim. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 2; } diff --git a/staging/src/k8s.io/api/resource/v1alpha2/register.go b/staging/src/k8s.io/api/resource/v1alpha2/register.go index 6e0d7ceb988..0d948096bc5 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/register.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/register.go @@ -52,6 +52,12 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ResourceClaimTemplateList{}, &PodSchedulingContext{}, &PodSchedulingContextList{}, + &NodeResourceSlice{}, + &NodeResourceSliceList{}, + &ResourceClaimParameters{}, + &ResourceClaimParametersList{}, + &ResourceClassParameters{}, + &ResourceClassParametersList{}, ) // Add common types diff --git a/staging/src/k8s.io/api/resource/v1alpha2/types.go b/staging/src/k8s.io/api/resource/v1alpha2/types.go index f862cd960b4..7fcbba38511 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/types.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/types.go @@ -19,9 +19,16 @@ package v1alpha2 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" ) +const ( + // Finalizer is the finalizer that gets set for claims + // which were allocated through a builtin controller. + Finalizer = "dra.k8s.io/delete-protection" +) + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 @@ -192,11 +199,57 @@ type ResourceHandle struct { // future, but not reduced. // +optional Data string `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"` + + // If StructuredData is set, then it needs to be used instead of Data. + // + // +optional + StructuredData *StructuredResourceHandle `json:"structuredData,omitempty" protobuf:"bytes,5,opt,name=structuredData"` } // ResourceHandleDataMaxSize represents the maximum size of resourceHandle.data. const ResourceHandleDataMaxSize = 16 * 1024 +// StructuredResourceHandle is the in-tree representation of the allocation result. +type StructuredResourceHandle struct { + // VendorClassParameters are the per-claim configuration parameters + // from the resource class at the time that the claim was allocated. + // + // +optional + VendorClassParameters runtime.RawExtension `json:"vendorClassParameters,omitempty" protobuf:"bytes,1,opt,name=vendorClassParameters"` + + // VendorClaimParameters are the per-claim configuration parameters + // from the resource claim parameters at the time that the claim was + // allocated. + // + // +optional + VendorClaimParameters runtime.RawExtension `json:"vendorClaimParameters,omitempty" protobuf:"bytes,2,opt,name=vendorClaimParameters"` + + // NodeName is the name of the node providing the necessary resources. + NodeName string `json:"nodeName" protobuf:"bytes,4,name=nodeName"` + + // Results lists all allocated driver resources. + // + // +listType=atomic + Results []DriverAllocationResult `json:"results" protobuf:"bytes,5,name=results"` +} + +// DriverAllocationResult contains vendor parameters and the allocation result for +// one request. +type DriverAllocationResult struct { + // VendorRequestParameters are the per-request configuration parameters + // from the time that the claim was allocated. + // + // +optional + VendorRequestParameters runtime.RawExtension `json:"vendorRequestParameters,omitempty" protobuf:"bytes,1,opt,name=vendorRequestParameters"` + + AllocationResultModel `json:",inline" protobuf:"bytes,2,name=allocationResultModel"` +} + +// AllocationResultModel must have one and only one field set. +type AllocationResultModel struct { + // TODO: implement one structured parameter model +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 @@ -347,6 +400,11 @@ type ResourceClass struct { // Setting this field is optional. If null, all nodes are candidates. // +optional SuitableNodes *v1.NodeSelector `json:"suitableNodes,omitempty" protobuf:"bytes,4,opt,name=suitableNodes"` + + // If and only if allocation of claims using this class is handled + // via structured parameters, then StructuredParameters must be set to true. + // +optional + StructuredParameters *bool `json:"structuredParameters,omitempty" protobuf:"bytes,5,opt,name=structuredParameters"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -462,3 +520,199 @@ type ResourceClaimTemplateList struct { // Items is the list of resource claim templates. Items []ResourceClaimTemplate `json:"items" protobuf:"bytes,2,rep,name=items"` } + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// NodeResourceSlice provides information about available +// resources on individual nodes. +type NodeResourceSlice struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // NodeName identifies the node where the capacity is available. + // A field selector can be used to list only NodeResourceSlice + // objects with a certain node name. + NodeName string `json:"nodeName" protobuf:"bytes,2,name=nodeName"` + + // DriverName identifies the DRA driver providing the capacity information. + // A field selector can be used to list only NodeResourceSlice + // objects with a certain driver name. + DriverName string `json:"driverName" protobuf:"bytes,3,name=driverName"` + + NodeResourceModel `json:",inline" protobuf:"bytes,4,name=nodeResourceModel"` +} + +// NodeResourceModel must have one and only one field set. +type NodeResourceModel struct { + // TODO: implement one structured parameter model +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// NodeResourceSliceList is a collection of NodeResourceSlices. +type NodeResourceSliceList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of node resource capacity objects. + Items []NodeResourceSlice `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClaimParameters defines resource requests for a ResourceClaim in an +// in-tree format understood by Kubernetes. +type ResourceClaimParameters struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the claim parameters when the parameter reference of the claim refers + // to some unknown type. + // +optional + GeneratedFrom *ResourceClaimParametersReference `json:"generatedFrom,omitempty" protobuf:"bytes,2,opt,name=generatedFrom"` + + // Shareable indicates whether the allocated claim is meant to be shareable + // by multiple consumers at the same time. + // +optional + Shareable bool `json:"shareable,omitempty" protobuf:"bytes,3,opt,name=shareable"` + + // DriverRequests describes all resources that are needed for the + // allocated claim. A single claim may use resources coming from + // different drivers. For each driver, this array has at most one + // entry which then may have one or more per-driver requests. + // + // May be empty, in which case the claim can always be allocated. + // + // +listType=atomic + DriverRequests []DriverRequests `json:"driverRequests,omitempty" protobuf:"bytes,4,opt,name=driverRequests"` +} + +// DriverRequests describes all resources that are needed from one particular driver. +type DriverRequests struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + + // VendorParameters are arbitrary setup parameters for all requests of the + // claim. They are ignored while allocating the claim. + // + // +optional + VendorParameters runtime.RawExtension `json:"vendorParameters,omitempty" protobuf:"bytes,2,opt,name=vendorParameters"` + + // Requests describes all resources that are needed from the driver. + // +listType=atomic + Requests []ResourceRequest `json:"requests,omitempty" protobuf:"bytes,3,opt,name=requests"` +} + +// ResourceRequest is a request for resources from one particular driver. +type ResourceRequest struct { + // VendorParameters are arbitrary setup parameters for the requested + // resource. They are ignored while allocating a claim. + // + // +optional + VendorParameters runtime.RawExtension `json:"vendorParameters,omitempty" protobuf:"bytes,1,opt,name=vendorParameters"` + + ResourceRequestModel `json:",inline" protobuf:"bytes,2,name=resourceRequestModel"` +} + +// ResourceRequestModel must have one and only one field set. +type ResourceRequestModel struct { + // TODO: implement one structured parameter model +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClaimParametersList is a collection of ResourceClaimParameters. +type ResourceClaimParametersList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of node resource capacity objects. + Items []ResourceClaimParameters `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClassParameters defines resource requests for a ResourceClass in an +// in-tree format understood by Kubernetes. +type ResourceClassParameters struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the class parameters when the parameter reference of the class refers + // to some unknown type. + // +optional + GeneratedFrom *ResourceClassParametersReference `json:"generatedFrom,omitempty" protobuf:"bytes,2,opt,name=generatedFrom"` + + // VendorParameters are arbitrary setup parameters for all claims using + // this class. They are ignored while allocating the claim. There must + // not be more than one entry per driver. + // + // +listType=atomic + // +optional + VendorParameters []VendorParameters `json:"vendorParameters,omitempty" protobuf:"bytes,3,opt,name=vendorParameters"` + + // Filters describes additional contraints that must be met when using the class. + // + // +listType=atomic + Filters []ResourceFilter `json:"filters,omitempty" protobuf:"bytes,4,opt,name=filters"` +} + +// ResourceFilter is a filter for resources from one particular driver. +type ResourceFilter struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + + ResourceFilterModel `json:",inline" protobuf:"bytes,2,name=resourceFilterModel"` +} + +// ResourceFilterModel must have one and only one field set. +type ResourceFilterModel struct { + // TODO: implement one structured parameter model +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClassParametersList is a collection of ResourceClassParameters. +type ResourceClassParametersList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of node resource capacity objects. + Items []ResourceClassParameters `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// VendorParameters are opaque parameters for one particular driver. +type VendorParameters struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + + // Parameters can be arbitrary setup parameters. They are ignored while + // allocating a claim. + // + // +optional + Parameters runtime.RawExtension `json:"parameters,omitempty" protobuf:"bytes,2,opt,name=parameters"` +} diff --git a/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go index 474be8c85ce..e46c6e06ddb 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go @@ -38,6 +38,63 @@ func (AllocationResult) SwaggerDoc() map[string]string { return map_AllocationResult } +var map_AllocationResultModel = map[string]string{ + "": "AllocationResultModel must have one and only one field set.", +} + +func (AllocationResultModel) SwaggerDoc() map[string]string { + return map_AllocationResultModel +} + +var map_DriverAllocationResult = map[string]string{ + "": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", + "vendorRequestParameters": "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.", +} + +func (DriverAllocationResult) SwaggerDoc() map[string]string { + return map_DriverAllocationResult +} + +var map_DriverRequests = map[string]string{ + "": "DriverRequests describes all resources that are needed from one particular driver.", + "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", + "vendorParameters": "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim.", + "requests": "Requests describes all resources that are needed from the driver.", +} + +func (DriverRequests) SwaggerDoc() map[string]string { + return map_DriverRequests +} + +var map_NodeResourceModel = map[string]string{ + "": "NodeResourceModel must have one and only one field set.", +} + +func (NodeResourceModel) SwaggerDoc() map[string]string { + return map_NodeResourceModel +} + +var map_NodeResourceSlice = map[string]string{ + "": "NodeResourceSlice provides information about available resources on individual nodes.", + "metadata": "Standard object metadata", + "nodeName": "NodeName identifies the node where the capacity is available. A field selector can be used to list only NodeResourceSlice objects with a certain node name.", + "driverName": "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only NodeResourceSlice objects with a certain driver name.", +} + +func (NodeResourceSlice) SwaggerDoc() map[string]string { + return map_NodeResourceSlice +} + +var map_NodeResourceSliceList = map[string]string{ + "": "NodeResourceSliceList is a collection of NodeResourceSlices.", + "metadata": "Standard list metadata", + "items": "Items is the list of node resource capacity objects.", +} + +func (NodeResourceSliceList) SwaggerDoc() map[string]string { + return map_NodeResourceSliceList +} + var map_PodSchedulingContext = map[string]string{ "": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "metadata": "Standard object metadata", @@ -111,6 +168,28 @@ func (ResourceClaimList) SwaggerDoc() map[string]string { return map_ResourceClaimList } +var map_ResourceClaimParameters = map[string]string{ + "": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", + "metadata": "Standard object metadata", + "generatedFrom": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the claim parameters when the parameter reference of the claim refers to some unknown type.", + "shareable": "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", + "driverRequests": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", +} + +func (ResourceClaimParameters) SwaggerDoc() map[string]string { + return map_ResourceClaimParameters +} + +var map_ResourceClaimParametersList = map[string]string{ + "": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", + "metadata": "Standard list metadata", + "items": "Items is the list of node resource capacity objects.", +} + +func (ResourceClaimParametersList) SwaggerDoc() map[string]string { + return map_ResourceClaimParametersList +} + var map_ResourceClaimParametersReference = map[string]string{ "": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", @@ -186,11 +265,12 @@ func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string { } var map_ResourceClass = map[string]string{ - "": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", - "metadata": "Standard object metadata", - "driverName": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", - "parametersRef": "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.", - "suitableNodes": "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 ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates.", + "": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "metadata": "Standard object metadata", + "driverName": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", + "parametersRef": "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.", + "suitableNodes": "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 ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates.", + "structuredParameters": "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", } func (ResourceClass) SwaggerDoc() map[string]string { @@ -207,6 +287,28 @@ func (ResourceClassList) SwaggerDoc() map[string]string { return map_ResourceClassList } +var map_ResourceClassParameters = map[string]string{ + "": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", + "metadata": "Standard object metadata", + "generatedFrom": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the class parameters when the parameter reference of the class refers to some unknown type.", + "vendorParameters": "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", + "filters": "Filters describes additional contraints that must be met when using the class.", +} + +func (ResourceClassParameters) SwaggerDoc() map[string]string { + return map_ResourceClassParameters +} + +var map_ResourceClassParametersList = map[string]string{ + "": "ResourceClassParametersList is a collection of ResourceClassParameters.", + "metadata": "Standard list metadata", + "items": "Items is the list of node resource capacity objects.", +} + +func (ResourceClassParametersList) SwaggerDoc() map[string]string { + return map_ResourceClassParametersList +} + var map_ResourceClassParametersReference = map[string]string{ "": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", @@ -219,14 +321,71 @@ func (ResourceClassParametersReference) SwaggerDoc() map[string]string { return map_ResourceClassParametersReference } +var map_ResourceFilter = map[string]string{ + "": "ResourceFilter is a filter for resources from one particular driver.", + "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", +} + +func (ResourceFilter) SwaggerDoc() map[string]string { + return map_ResourceFilter +} + +var map_ResourceFilterModel = map[string]string{ + "": "ResourceFilterModel must have one and only one field set.", +} + +func (ResourceFilterModel) SwaggerDoc() map[string]string { + return map_ResourceFilterModel +} + var map_ResourceHandle = map[string]string{ - "": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", - "driverName": "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.", - "data": "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", + "": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", + "driverName": "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.", + "data": "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", + "structuredData": "If StructuredData is set, then it needs to be used instead of Data.", } func (ResourceHandle) SwaggerDoc() map[string]string { return map_ResourceHandle } +var map_ResourceRequest = map[string]string{ + "": "ResourceRequest is a request for resources from one particular driver.", + "vendorParameters": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.", +} + +func (ResourceRequest) SwaggerDoc() map[string]string { + return map_ResourceRequest +} + +var map_ResourceRequestModel = map[string]string{ + "": "ResourceRequestModel must have one and only one field set.", +} + +func (ResourceRequestModel) SwaggerDoc() map[string]string { + return map_ResourceRequestModel +} + +var map_StructuredResourceHandle = map[string]string{ + "": "StructuredResourceHandle is the in-tree representation of the allocation result.", + "vendorClassParameters": "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated.", + "vendorClaimParameters": "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated.", + "nodeName": "NodeName is the name of the node providing the necessary resources.", + "results": "Results lists all allocated driver resources.", +} + +func (StructuredResourceHandle) SwaggerDoc() map[string]string { + return map_StructuredResourceHandle +} + +var map_VendorParameters = map[string]string{ + "": "VendorParameters are opaque parameters for one particular driver.", + "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", + "parameters": "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim.", +} + +func (VendorParameters) SwaggerDoc() map[string]string { + return map_VendorParameters +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/staging/src/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go b/staging/src/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go index 89d521bf05a..76a11096e7a 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go @@ -32,7 +32,9 @@ func (in *AllocationResult) DeepCopyInto(out *AllocationResult) { if in.ResourceHandles != nil { in, out := &in.ResourceHandles, &out.ResourceHandles *out = make([]ResourceHandle, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.AvailableOnNodes != nil { in, out := &in.AvailableOnNodes, &out.AvailableOnNodes @@ -52,6 +54,140 @@ func (in *AllocationResult) DeepCopy() *AllocationResult { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocationResultModel) DeepCopyInto(out *AllocationResultModel) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResultModel. +func (in *AllocationResultModel) DeepCopy() *AllocationResultModel { + if in == nil { + return nil + } + out := new(AllocationResultModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DriverAllocationResult) DeepCopyInto(out *DriverAllocationResult) { + *out = *in + in.VendorRequestParameters.DeepCopyInto(&out.VendorRequestParameters) + out.AllocationResultModel = in.AllocationResultModel + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverAllocationResult. +func (in *DriverAllocationResult) DeepCopy() *DriverAllocationResult { + if in == nil { + return nil + } + out := new(DriverAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DriverRequests) DeepCopyInto(out *DriverRequests) { + *out = *in + in.VendorParameters.DeepCopyInto(&out.VendorParameters) + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]ResourceRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverRequests. +func (in *DriverRequests) DeepCopy() *DriverRequests { + if in == nil { + return nil + } + out := new(DriverRequests) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourceModel) DeepCopyInto(out *NodeResourceModel) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourceModel. +func (in *NodeResourceModel) DeepCopy() *NodeResourceModel { + if in == nil { + return nil + } + out := new(NodeResourceModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourceSlice) DeepCopyInto(out *NodeResourceSlice) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.NodeResourceModel = in.NodeResourceModel + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourceSlice. +func (in *NodeResourceSlice) DeepCopy() *NodeResourceSlice { + if in == nil { + return nil + } + out := new(NodeResourceSlice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourceSlice) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourceSliceList) DeepCopyInto(out *NodeResourceSliceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NodeResourceSlice, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourceSliceList. +func (in *NodeResourceSliceList) DeepCopy() *NodeResourceSliceList { + if in == nil { + return nil + } + out := new(NodeResourceSliceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourceSliceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodSchedulingContext) DeepCopyInto(out *PodSchedulingContext) { *out = *in @@ -234,6 +370,77 @@ func (in *ResourceClaimList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimParameters) DeepCopyInto(out *ResourceClaimParameters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.GeneratedFrom != nil { + in, out := &in.GeneratedFrom, &out.GeneratedFrom + *out = new(ResourceClaimParametersReference) + **out = **in + } + if in.DriverRequests != nil { + in, out := &in.DriverRequests, &out.DriverRequests + *out = make([]DriverRequests, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParameters. +func (in *ResourceClaimParameters) DeepCopy() *ResourceClaimParameters { + if in == nil { + return nil + } + out := new(ResourceClaimParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimParameters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimParametersList) DeepCopyInto(out *ResourceClaimParametersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClaimParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersList. +func (in *ResourceClaimParametersList) DeepCopy() *ResourceClaimParametersList { + if in == nil { + return nil + } + out := new(ResourceClaimParametersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimParametersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceClaimParametersReference) DeepCopyInto(out *ResourceClaimParametersReference) { *out = *in @@ -411,6 +618,11 @@ func (in *ResourceClass) DeepCopyInto(out *ResourceClass) { *out = new(v1.NodeSelector) (*in).DeepCopyInto(*out) } + if in.StructuredParameters != nil { + in, out := &in.StructuredParameters, &out.StructuredParameters + *out = new(bool) + **out = **in + } return } @@ -465,6 +677,82 @@ func (in *ResourceClassList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClassParameters) DeepCopyInto(out *ResourceClassParameters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.GeneratedFrom != nil { + in, out := &in.GeneratedFrom, &out.GeneratedFrom + *out = new(ResourceClassParametersReference) + **out = **in + } + if in.VendorParameters != nil { + in, out := &in.VendorParameters, &out.VendorParameters + *out = make([]VendorParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = make([]ResourceFilter, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParameters. +func (in *ResourceClassParameters) DeepCopy() *ResourceClassParameters { + if in == nil { + return nil + } + out := new(ResourceClassParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClassParameters) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClassParametersList) DeepCopyInto(out *ResourceClassParametersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClassParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersList. +func (in *ResourceClassParametersList) DeepCopy() *ResourceClassParametersList { + if in == nil { + return nil + } + out := new(ResourceClassParametersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClassParametersList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceClassParametersReference) DeepCopyInto(out *ResourceClassParametersReference) { *out = *in @@ -481,9 +769,47 @@ func (in *ResourceClassParametersReference) DeepCopy() *ResourceClassParametersR return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceFilter) DeepCopyInto(out *ResourceFilter) { + *out = *in + out.ResourceFilterModel = in.ResourceFilterModel + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilter. +func (in *ResourceFilter) DeepCopy() *ResourceFilter { + if in == nil { + return nil + } + out := new(ResourceFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceFilterModel) DeepCopyInto(out *ResourceFilterModel) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilterModel. +func (in *ResourceFilterModel) DeepCopy() *ResourceFilterModel { + if in == nil { + return nil + } + out := new(ResourceFilterModel) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceHandle) DeepCopyInto(out *ResourceHandle) { *out = *in + if in.StructuredData != nil { + in, out := &in.StructuredData, &out.StructuredData + *out = new(StructuredResourceHandle) + (*in).DeepCopyInto(*out) + } return } @@ -496,3 +822,79 @@ func (in *ResourceHandle) DeepCopy() *ResourceHandle { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest) { + *out = *in + in.VendorParameters.DeepCopyInto(&out.VendorParameters) + out.ResourceRequestModel = in.ResourceRequestModel + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest. +func (in *ResourceRequest) DeepCopy() *ResourceRequest { + if in == nil { + return nil + } + out := new(ResourceRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequestModel) DeepCopyInto(out *ResourceRequestModel) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequestModel. +func (in *ResourceRequestModel) DeepCopy() *ResourceRequestModel { + if in == nil { + return nil + } + out := new(ResourceRequestModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StructuredResourceHandle) DeepCopyInto(out *StructuredResourceHandle) { + *out = *in + in.VendorClassParameters.DeepCopyInto(&out.VendorClassParameters) + in.VendorClaimParameters.DeepCopyInto(&out.VendorClaimParameters) + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]DriverAllocationResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StructuredResourceHandle. +func (in *StructuredResourceHandle) DeepCopy() *StructuredResourceHandle { + if in == nil { + return nil + } + out := new(StructuredResourceHandle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VendorParameters) DeepCopyInto(out *VendorParameters) { + *out = *in + in.Parameters.DeepCopyInto(&out.Parameters) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VendorParameters. +func (in *VendorParameters) DeepCopy() *VendorParameters { + if in == nil { + return nil + } + out := new(VendorParameters) + in.DeepCopyInto(out) + return out +} diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.NodeResourceSlice.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.NodeResourceSlice.json new file mode 100644 index 00000000000..08001a055a1 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.NodeResourceSlice.json @@ -0,0 +1,48 @@ +{ + "kind": "NodeResourceSlice", + "apiVersion": "resource.k8s.io/v1alpha2", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "nodeName": "nodeNameValue", + "driverName": "driverNameValue" +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.NodeResourceSlice.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.NodeResourceSlice.pb new file mode 100644 index 00000000000..bf5c7af2076 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.NodeResourceSlice.pb differ diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.NodeResourceSlice.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.NodeResourceSlice.yaml new file mode 100644 index 00000000000..f1765d1e993 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.NodeResourceSlice.yaml @@ -0,0 +1,36 @@ +apiVersion: resource.k8s.io/v1alpha2 +driverName: driverNameValue +kind: NodeResourceSlice +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +nodeName: nodeNameValue diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json index 4d9180f1c61..809fd41137e 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json @@ -58,7 +58,44 @@ "resourceHandles": [ { "driverName": "driverNameValue", - "data": "dataValue" + "data": "dataValue", + "structuredData": { + "vendorClassParameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + }, + "vendorClaimParameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + }, + "nodeName": "nodeNameValue", + "results": [ + { + "vendorRequestParameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + } + } + ] + } } ], "availableOnNodes": { diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb index 34901e6088b..95dfd8203f4 100644 Binary files a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb and b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb differ diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml index 9a486948b86..79ad3c0cdd3 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml @@ -56,6 +56,30 @@ status: resourceHandles: - data: dataValue driverName: driverNameValue + structuredData: + nodeName: nodeNameValue + results: + - vendorRequestParameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + vendorClaimParameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + vendorClassParameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 shareable: true deallocationRequested: true driverName: driverNameValue diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json new file mode 100644 index 00000000000..fb4495fe606 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json @@ -0,0 +1,81 @@ +{ + "kind": "ResourceClaimParameters", + "apiVersion": "resource.k8s.io/v1alpha2", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "generatedFrom": { + "apiGroup": "apiGroupValue", + "kind": "kindValue", + "name": "nameValue" + }, + "shareable": true, + "driverRequests": [ + { + "driverName": "driverNameValue", + "vendorParameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + }, + "requests": [ + { + "vendorParameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.pb new file mode 100644 index 00000000000..96b724d3072 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.pb differ diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.yaml new file mode 100644 index 00000000000..5baff21f8dc --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.yaml @@ -0,0 +1,56 @@ +apiVersion: resource.k8s.io/v1alpha2 +driverRequests: +- driverName: driverNameValue + requests: + - vendorParameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + vendorParameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 +generatedFrom: + apiGroup: apiGroupValue + kind: kindValue + name: nameValue +kind: ResourceClaimParameters +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +shareable: true diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.json index 90738786b4b..16461a7efc1 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.json @@ -73,5 +73,6 @@ ] } ] - } + }, + "structuredParameters": true } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.pb index 99f93ce8e17..772cd16f80a 100644 Binary files a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.pb and b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.pb differ diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.yaml index 8dce3e3cbbc..80e93c7cd9f 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClass.yaml @@ -38,6 +38,7 @@ parametersRef: kind: kindValue name: nameValue namespace: namespaceValue +structuredParameters: true suitableNodes: nodeSelectorTerms: - matchExpressions: diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClassParameters.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClassParameters.json new file mode 100644 index 00000000000..84177997e24 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClassParameters.json @@ -0,0 +1,72 @@ +{ + "kind": "ResourceClassParameters", + "apiVersion": "resource.k8s.io/v1alpha2", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "generatedFrom": { + "apiGroup": "apiGroupValue", + "kind": "kindValue", + "name": "nameValue", + "namespace": "namespaceValue" + }, + "vendorParameters": [ + { + "driverName": "driverNameValue", + "parameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + } + } + ], + "filters": [ + { + "driverName": "driverNameValue" + } + ] +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClassParameters.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClassParameters.pb new file mode 100644 index 00000000000..e2c1b15ff5d Binary files /dev/null and b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClassParameters.pb differ diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClassParameters.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClassParameters.yaml new file mode 100644 index 00000000000..41aebd40234 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClassParameters.yaml @@ -0,0 +1,50 @@ +apiVersion: resource.k8s.io/v1alpha2 +filters: +- driverName: driverNameValue +generatedFrom: + apiGroup: apiGroupValue + kind: kindValue + name: nameValue + namespace: namespaceValue +kind: ResourceClassParameters +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +vendorParameters: +- driverName: driverNameValue + parameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 diff --git a/staging/src/k8s.io/api/testdata/v1.28.0/resource.k8s.io.v1alpha2.ResourceClass.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.28.0/resource.k8s.io.v1alpha2.ResourceClass.after_roundtrip.pb new file mode 100644 index 00000000000..99f93ce8e17 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.28.0/resource.k8s.io.v1alpha2.ResourceClass.after_roundtrip.pb differ diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClass.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClass.after_roundtrip.pb new file mode 100644 index 00000000000..99f93ce8e17 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClass.after_roundtrip.pb differ diff --git a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go index d1946cfb1ab..d1f8a5b5240 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -11945,6 +11945,48 @@ var schemaYAML = typed.YAMLObject(`types: - name: shareable type: scalar: boolean +- name: io.k8s.api.resource.v1alpha2.DriverAllocationResult + map: + fields: + - name: vendorRequestParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.DriverRequests + map: + fields: + - name: driverName + type: + scalar: string + - name: requests + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.ResourceRequest + elementRelationship: atomic + - name: vendorParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.NodeResourceSlice + map: + fields: + - name: apiVersion + type: + scalar: string + - name: driverName + type: + scalar: string + default: "" + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: nodeName + type: + scalar: string + default: "" - name: io.k8s.api.resource.v1alpha2.PodSchedulingContext map: fields: @@ -12028,6 +12070,31 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" +- name: io.k8s.api.resource.v1alpha2.ResourceClaimParameters + map: + fields: + - name: apiVersion + type: + scalar: string + - name: driverRequests + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.DriverRequests + elementRelationship: atomic + - name: generatedFrom + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: shareable + type: + scalar: boolean - name: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference map: fields: @@ -12135,9 +12202,40 @@ var schemaYAML = typed.YAMLObject(`types: - name: parametersRef type: namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + - name: structuredParameters + type: + scalar: boolean - name: suitableNodes type: namedType: io.k8s.api.core.v1.NodeSelector +- name: io.k8s.api.resource.v1alpha2.ResourceClassParameters + map: + fields: + - name: apiVersion + type: + scalar: string + - name: filters + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.ResourceFilter + elementRelationship: atomic + - name: generatedFrom + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: vendorParameters + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.VendorParameters + elementRelationship: atomic - name: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference map: fields: @@ -12155,6 +12253,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: namespace type: scalar: string +- name: io.k8s.api.resource.v1alpha2.ResourceFilter + map: + fields: + - name: driverName + type: + scalar: string - name: io.k8s.api.resource.v1alpha2.ResourceHandle map: fields: @@ -12164,6 +12268,43 @@ var schemaYAML = typed.YAMLObject(`types: - name: driverName type: scalar: string + - name: structuredData + type: + namedType: io.k8s.api.resource.v1alpha2.StructuredResourceHandle +- name: io.k8s.api.resource.v1alpha2.ResourceRequest + map: + fields: + - name: vendorParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.StructuredResourceHandle + map: + fields: + - name: nodeName + type: + scalar: string + default: "" + - name: results + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.DriverAllocationResult + elementRelationship: atomic + - name: vendorClaimParameters + type: + namedType: __untyped_atomic_ + - name: vendorClassParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.VendorParameters + map: + fields: + - name: driverName + type: + scalar: string + - name: parameters + type: + namedType: __untyped_atomic_ - name: io.k8s.api.scheduling.v1.PriorityClass map: fields: diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go new file mode 100644 index 00000000000..3b0403cca51 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go @@ -0,0 +1,45 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DriverAllocationResultApplyConfiguration represents an declarative configuration of the DriverAllocationResult type for use +// with apply. +type DriverAllocationResultApplyConfiguration struct { + VendorRequestParameters *runtime.RawExtension `json:"vendorRequestParameters,omitempty"` + v1alpha2.AllocationResultModel `json:",inline"` +} + +// DriverAllocationResultApplyConfiguration constructs an declarative configuration of the DriverAllocationResult type for use with +// apply. +func DriverAllocationResult() *DriverAllocationResultApplyConfiguration { + return &DriverAllocationResultApplyConfiguration{} +} + +// WithVendorRequestParameters sets the VendorRequestParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorRequestParameters field is set to the value of the last call. +func (b *DriverAllocationResultApplyConfiguration) WithVendorRequestParameters(value runtime.RawExtension) *DriverAllocationResultApplyConfiguration { + b.VendorRequestParameters = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go new file mode 100644 index 00000000000..8052915784a --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go @@ -0,0 +1,66 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DriverRequestsApplyConfiguration represents an declarative configuration of the DriverRequests type for use +// with apply. +type DriverRequestsApplyConfiguration struct { + DriverName *string `json:"driverName,omitempty"` + VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"` + Requests []ResourceRequestApplyConfiguration `json:"requests,omitempty"` +} + +// DriverRequestsApplyConfiguration constructs an declarative configuration of the DriverRequests type for use with +// apply. +func DriverRequests() *DriverRequestsApplyConfiguration { + return &DriverRequestsApplyConfiguration{} +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *DriverRequestsApplyConfiguration) WithDriverName(value string) *DriverRequestsApplyConfiguration { + b.DriverName = &value + return b +} + +// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorParameters field is set to the value of the last call. +func (b *DriverRequestsApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *DriverRequestsApplyConfiguration { + b.VendorParameters = &value + return b +} + +// WithRequests adds the given value to the Requests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Requests field. +func (b *DriverRequestsApplyConfiguration) WithRequests(values ...*ResourceRequestApplyConfiguration) *DriverRequestsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRequests") + } + b.Requests = append(b.Requests, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/noderesourceslice.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/noderesourceslice.go new file mode 100644 index 00000000000..a20245489a8 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/noderesourceslice.go @@ -0,0 +1,257 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// NodeResourceSliceApplyConfiguration represents an declarative configuration of the NodeResourceSlice type for use +// with apply. +type NodeResourceSliceApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + DriverName *string `json:"driverName,omitempty"` + v1alpha2.NodeResourceModel `json:",inline"` +} + +// NodeResourceSlice constructs an declarative configuration of the NodeResourceSlice type for use with +// apply. +func NodeResourceSlice(name string) *NodeResourceSliceApplyConfiguration { + b := &NodeResourceSliceApplyConfiguration{} + b.WithName(name) + b.WithKind("NodeResourceSlice") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b +} + +// ExtractNodeResourceSlice extracts the applied configuration owned by fieldManager from +// nodeResourceSlice. If no managedFields are found in nodeResourceSlice for fieldManager, a +// NodeResourceSliceApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// nodeResourceSlice must be a unmodified NodeResourceSlice API object that was retrieved from the Kubernetes API. +// ExtractNodeResourceSlice provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractNodeResourceSlice(nodeResourceSlice *v1alpha2.NodeResourceSlice, fieldManager string) (*NodeResourceSliceApplyConfiguration, error) { + return extractNodeResourceSlice(nodeResourceSlice, fieldManager, "") +} + +// ExtractNodeResourceSliceStatus is the same as ExtractNodeResourceSlice except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractNodeResourceSliceStatus(nodeResourceSlice *v1alpha2.NodeResourceSlice, fieldManager string) (*NodeResourceSliceApplyConfiguration, error) { + return extractNodeResourceSlice(nodeResourceSlice, fieldManager, "status") +} + +func extractNodeResourceSlice(nodeResourceSlice *v1alpha2.NodeResourceSlice, fieldManager string, subresource string) (*NodeResourceSliceApplyConfiguration, error) { + b := &NodeResourceSliceApplyConfiguration{} + err := managedfields.ExtractInto(nodeResourceSlice, internal.Parser().Type("io.k8s.api.resource.v1alpha2.NodeResourceSlice"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(nodeResourceSlice.Name) + + b.WithKind("NodeResourceSlice") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithKind(value string) *NodeResourceSliceApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithAPIVersion(value string) *NodeResourceSliceApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithName(value string) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithGenerateName(value string) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithNamespace(value string) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithUID(value types.UID) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithResourceVersion(value string) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithGeneration(value int64) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *NodeResourceSliceApplyConfiguration) WithLabels(entries map[string]string) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *NodeResourceSliceApplyConfiguration) WithAnnotations(entries map[string]string) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *NodeResourceSliceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *NodeResourceSliceApplyConfiguration) WithFinalizers(values ...string) *NodeResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *NodeResourceSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithNodeName sets the NodeName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeName field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithNodeName(value string) *NodeResourceSliceApplyConfiguration { + b.NodeName = &value + return b +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *NodeResourceSliceApplyConfiguration) WithDriverName(value string) *NodeResourceSliceApplyConfiguration { + b.DriverName = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..ea13570e335 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,272 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ResourceClaimParametersApplyConfiguration represents an declarative configuration of the ResourceClaimParameters type for use +// with apply. +type ResourceClaimParametersApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + GeneratedFrom *ResourceClaimParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"` + Shareable *bool `json:"shareable,omitempty"` + DriverRequests []DriverRequestsApplyConfiguration `json:"driverRequests,omitempty"` +} + +// ResourceClaimParameters constructs an declarative configuration of the ResourceClaimParameters type for use with +// apply. +func ResourceClaimParameters(name, namespace string) *ResourceClaimParametersApplyConfiguration { + b := &ResourceClaimParametersApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("ResourceClaimParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b +} + +// ExtractResourceClaimParameters extracts the applied configuration owned by fieldManager from +// resourceClaimParameters. If no managedFields are found in resourceClaimParameters for fieldManager, a +// ResourceClaimParametersApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// resourceClaimParameters must be a unmodified ResourceClaimParameters API object that was retrieved from the Kubernetes API. +// ExtractResourceClaimParameters provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { + return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "") +} + +// ExtractResourceClaimParametersStatus is the same as ExtractResourceClaimParameters except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractResourceClaimParametersStatus(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { + return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "status") +} + +func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string, subresource string) (*ResourceClaimParametersApplyConfiguration, error) { + b := &ResourceClaimParametersApplyConfiguration{} + err := managedfields.ExtractInto(resourceClaimParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaimParameters"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(resourceClaimParameters.Name) + b.WithNamespace(resourceClaimParameters.Namespace) + + b.WithKind("ResourceClaimParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithKind(value string) *ResourceClaimParametersApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClaimParametersApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithName(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithGenerateName(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithNamespace(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithUID(value types.UID) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithGeneration(value int64) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ResourceClaimParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ResourceClaimParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ResourceClaimParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ResourceClaimParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ResourceClaimParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GeneratedFrom field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClaimParametersReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration { + b.GeneratedFrom = value + return b +} + +// WithShareable sets the Shareable field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Shareable field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithShareable(value bool) *ResourceClaimParametersApplyConfiguration { + b.Shareable = &value + return b +} + +// WithDriverRequests adds the given value to the DriverRequests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the DriverRequests field. +func (b *ResourceClaimParametersApplyConfiguration) WithDriverRequests(values ...*DriverRequestsApplyConfiguration) *ResourceClaimParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithDriverRequests") + } + b.DriverRequests = append(b.DriverRequests, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go index 724c9e88e00..364fda9d006 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go @@ -36,6 +36,7 @@ type ResourceClassApplyConfiguration struct { DriverName *string `json:"driverName,omitempty"` ParametersRef *ResourceClassParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"` SuitableNodes *corev1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"` + StructuredParameters *bool `json:"structuredParameters,omitempty"` } // ResourceClass constructs an declarative configuration of the ResourceClass type for use with @@ -264,3 +265,11 @@ func (b *ResourceClassApplyConfiguration) WithSuitableNodes(value *corev1.NodeSe b.SuitableNodes = value return b } + +// WithStructuredParameters sets the StructuredParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StructuredParameters field is set to the value of the last call. +func (b *ResourceClassApplyConfiguration) WithStructuredParameters(value bool) *ResourceClassApplyConfiguration { + b.StructuredParameters = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..028d0d612d9 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,277 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ResourceClassParametersApplyConfiguration represents an declarative configuration of the ResourceClassParameters type for use +// with apply. +type ResourceClassParametersApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + GeneratedFrom *ResourceClassParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"` + VendorParameters []VendorParametersApplyConfiguration `json:"vendorParameters,omitempty"` + Filters []ResourceFilterApplyConfiguration `json:"filters,omitempty"` +} + +// ResourceClassParameters constructs an declarative configuration of the ResourceClassParameters type for use with +// apply. +func ResourceClassParameters(name, namespace string) *ResourceClassParametersApplyConfiguration { + b := &ResourceClassParametersApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("ResourceClassParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b +} + +// ExtractResourceClassParameters extracts the applied configuration owned by fieldManager from +// resourceClassParameters. If no managedFields are found in resourceClassParameters for fieldManager, a +// ResourceClassParametersApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// resourceClassParameters must be a unmodified ResourceClassParameters API object that was retrieved from the Kubernetes API. +// ExtractResourceClassParameters provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { + return extractResourceClassParameters(resourceClassParameters, fieldManager, "") +} + +// ExtractResourceClassParametersStatus is the same as ExtractResourceClassParameters except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractResourceClassParametersStatus(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { + return extractResourceClassParameters(resourceClassParameters, fieldManager, "status") +} + +func extractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string, subresource string) (*ResourceClassParametersApplyConfiguration, error) { + b := &ResourceClassParametersApplyConfiguration{} + err := managedfields.ExtractInto(resourceClassParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClassParameters"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(resourceClassParameters.Name) + b.WithNamespace(resourceClassParameters.Namespace) + + b.WithKind("ResourceClassParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithKind(value string) *ResourceClassParametersApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClassParametersApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithName(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithGenerateName(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithNamespace(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithUID(value types.UID) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithGeneration(value int64) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ResourceClassParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ResourceClassParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ResourceClassParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ResourceClassParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ResourceClassParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GeneratedFrom field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClassParametersReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration { + b.GeneratedFrom = value + return b +} + +// WithVendorParameters adds the given value to the VendorParameters field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the VendorParameters field. +func (b *ResourceClassParametersApplyConfiguration) WithVendorParameters(values ...*VendorParametersApplyConfiguration) *ResourceClassParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithVendorParameters") + } + b.VendorParameters = append(b.VendorParameters, *values[i]) + } + return b +} + +// WithFilters adds the given value to the Filters field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Filters field. +func (b *ResourceClassParametersApplyConfiguration) WithFilters(values ...*ResourceFilterApplyConfiguration) *ResourceClassParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithFilters") + } + b.Filters = append(b.Filters, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go new file mode 100644 index 00000000000..2fd4ef89f16 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go @@ -0,0 +1,44 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" +) + +// ResourceFilterApplyConfiguration represents an declarative configuration of the ResourceFilter type for use +// with apply. +type ResourceFilterApplyConfiguration struct { + DriverName *string `json:"driverName,omitempty"` + v1alpha2.ResourceFilterModel `json:",inline"` +} + +// ResourceFilterApplyConfiguration constructs an declarative configuration of the ResourceFilter type for use with +// apply. +func ResourceFilter() *ResourceFilterApplyConfiguration { + return &ResourceFilterApplyConfiguration{} +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *ResourceFilterApplyConfiguration) WithDriverName(value string) *ResourceFilterApplyConfiguration { + b.DriverName = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go index 028cbaa1a7e..b4f3da735d0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go @@ -21,8 +21,9 @@ package v1alpha2 // ResourceHandleApplyConfiguration represents an declarative configuration of the ResourceHandle type for use // with apply. type ResourceHandleApplyConfiguration struct { - DriverName *string `json:"driverName,omitempty"` - Data *string `json:"data,omitempty"` + DriverName *string `json:"driverName,omitempty"` + Data *string `json:"data,omitempty"` + StructuredData *StructuredResourceHandleApplyConfiguration `json:"structuredData,omitempty"` } // ResourceHandleApplyConfiguration constructs an declarative configuration of the ResourceHandle type for use with @@ -46,3 +47,11 @@ func (b *ResourceHandleApplyConfiguration) WithData(value string) *ResourceHandl b.Data = &value return b } + +// WithStructuredData sets the StructuredData field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StructuredData field is set to the value of the last call. +func (b *ResourceHandleApplyConfiguration) WithStructuredData(value *StructuredResourceHandleApplyConfiguration) *ResourceHandleApplyConfiguration { + b.StructuredData = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go new file mode 100644 index 00000000000..971eace5be1 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go @@ -0,0 +1,45 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// ResourceRequestApplyConfiguration represents an declarative configuration of the ResourceRequest type for use +// with apply. +type ResourceRequestApplyConfiguration struct { + VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"` + v1alpha2.ResourceRequestModel `json:",inline"` +} + +// ResourceRequestApplyConfiguration constructs an declarative configuration of the ResourceRequest type for use with +// apply. +func ResourceRequest() *ResourceRequestApplyConfiguration { + return &ResourceRequestApplyConfiguration{} +} + +// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorParameters field is set to the value of the last call. +func (b *ResourceRequestApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *ResourceRequestApplyConfiguration { + b.VendorParameters = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go new file mode 100644 index 00000000000..e6efcbfef3c --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go @@ -0,0 +1,75 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// StructuredResourceHandleApplyConfiguration represents an declarative configuration of the StructuredResourceHandle type for use +// with apply. +type StructuredResourceHandleApplyConfiguration struct { + VendorClassParameters *runtime.RawExtension `json:"vendorClassParameters,omitempty"` + VendorClaimParameters *runtime.RawExtension `json:"vendorClaimParameters,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + Results []DriverAllocationResultApplyConfiguration `json:"results,omitempty"` +} + +// StructuredResourceHandleApplyConfiguration constructs an declarative configuration of the StructuredResourceHandle type for use with +// apply. +func StructuredResourceHandle() *StructuredResourceHandleApplyConfiguration { + return &StructuredResourceHandleApplyConfiguration{} +} + +// WithVendorClassParameters sets the VendorClassParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorClassParameters field is set to the value of the last call. +func (b *StructuredResourceHandleApplyConfiguration) WithVendorClassParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration { + b.VendorClassParameters = &value + return b +} + +// WithVendorClaimParameters sets the VendorClaimParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorClaimParameters field is set to the value of the last call. +func (b *StructuredResourceHandleApplyConfiguration) WithVendorClaimParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration { + b.VendorClaimParameters = &value + return b +} + +// WithNodeName sets the NodeName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeName field is set to the value of the last call. +func (b *StructuredResourceHandleApplyConfiguration) WithNodeName(value string) *StructuredResourceHandleApplyConfiguration { + b.NodeName = &value + return b +} + +// WithResults adds the given value to the Results field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Results field. +func (b *StructuredResourceHandleApplyConfiguration) WithResults(values ...*DriverAllocationResultApplyConfiguration) *StructuredResourceHandleApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithResults") + } + b.Results = append(b.Results, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go new file mode 100644 index 00000000000..f7a8ff9ecef --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// VendorParametersApplyConfiguration represents an declarative configuration of the VendorParameters type for use +// with apply. +type VendorParametersApplyConfiguration struct { + DriverName *string `json:"driverName,omitempty"` + Parameters *runtime.RawExtension `json:"parameters,omitempty"` +} + +// VendorParametersApplyConfiguration constructs an declarative configuration of the VendorParameters type for use with +// apply. +func VendorParameters() *VendorParametersApplyConfiguration { + return &VendorParametersApplyConfiguration{} +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *VendorParametersApplyConfiguration) WithDriverName(value string) *VendorParametersApplyConfiguration { + b.DriverName = &value + return b +} + +// WithParameters sets the Parameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Parameters field is set to the value of the last call. +func (b *VendorParametersApplyConfiguration) WithParameters(value runtime.RawExtension) *VendorParametersApplyConfiguration { + b.Parameters = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/utils.go b/staging/src/k8s.io/client-go/applyconfigurations/utils.go index 34677697497..847c94f8fac 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/utils.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/utils.go @@ -1523,6 +1523,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} { // Group=resource.k8s.io, Version=v1alpha2 case v1alpha2.SchemeGroupVersion.WithKind("AllocationResult"): return &resourcev1alpha2.AllocationResultApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("DriverAllocationResult"): + return &resourcev1alpha2.DriverAllocationResultApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("DriverRequests"): + return &resourcev1alpha2.DriverRequestsApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("NodeResourceSlice"): + return &resourcev1alpha2.NodeResourceSliceApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContext"): return &resourcev1alpha2.PodSchedulingContextApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"): @@ -1533,6 +1539,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &resourcev1alpha2.ResourceClaimApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"): return &resourcev1alpha2.ResourceClaimConsumerReferenceApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParameters"): + return &resourcev1alpha2.ResourceClaimParametersApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"): return &resourcev1alpha2.ResourceClaimParametersReferenceApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"): @@ -1547,10 +1555,20 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &resourcev1alpha2.ResourceClaimTemplateSpecApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("ResourceClass"): return &resourcev1alpha2.ResourceClassApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParameters"): + return &resourcev1alpha2.ResourceClassParametersApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParametersReference"): return &resourcev1alpha2.ResourceClassParametersReferenceApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("ResourceFilter"): + return &resourcev1alpha2.ResourceFilterApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("ResourceHandle"): return &resourcev1alpha2.ResourceHandleApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("ResourceRequest"): + return &resourcev1alpha2.ResourceRequestApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("StructuredResourceHandle"): + return &resourcev1alpha2.StructuredResourceHandleApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("VendorParameters"): + return &resourcev1alpha2.VendorParametersApplyConfiguration{} // Group=scheduling.k8s.io, Version=v1 case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"): diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go index 1e76cefd1a5..37e928e8dd3 100644 --- a/staging/src/k8s.io/client-go/informers/generic.go +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -362,14 +362,20 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil // Group=resource.k8s.io, Version=v1alpha2 + case v1alpha2.SchemeGroupVersion.WithResource("noderesourceslices"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().NodeResourceSlices().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("podschedulingcontexts"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().PodSchedulingContexts().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("resourceclaims"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaims().Informer()}, nil + case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimparameters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimParameters().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimTemplates().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("resourceclasses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClasses().Informer()}, nil + case v1alpha2.SchemeGroupVersion.WithResource("resourceclassparameters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClassParameters().Informer()}, nil // Group=scheduling.k8s.io, Version=v1 case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"): diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/interface.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha2/interface.go index 23f817c62eb..29d4a7c6630 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/interface.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha2/interface.go @@ -24,14 +24,20 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // NodeResourceSlices returns a NodeResourceSliceInformer. + NodeResourceSlices() NodeResourceSliceInformer // PodSchedulingContexts returns a PodSchedulingContextInformer. PodSchedulingContexts() PodSchedulingContextInformer // ResourceClaims returns a ResourceClaimInformer. ResourceClaims() ResourceClaimInformer + // ResourceClaimParameters returns a ResourceClaimParametersInformer. + ResourceClaimParameters() ResourceClaimParametersInformer // ResourceClaimTemplates returns a ResourceClaimTemplateInformer. ResourceClaimTemplates() ResourceClaimTemplateInformer // ResourceClasses returns a ResourceClassInformer. ResourceClasses() ResourceClassInformer + // ResourceClassParameters returns a ResourceClassParametersInformer. + ResourceClassParameters() ResourceClassParametersInformer } type version struct { @@ -45,6 +51,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// NodeResourceSlices returns a NodeResourceSliceInformer. +func (v *version) NodeResourceSlices() NodeResourceSliceInformer { + return &nodeResourceSliceInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // PodSchedulingContexts returns a PodSchedulingContextInformer. func (v *version) PodSchedulingContexts() PodSchedulingContextInformer { return &podSchedulingContextInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} @@ -55,6 +66,11 @@ func (v *version) ResourceClaims() ResourceClaimInformer { return &resourceClaimInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } +// ResourceClaimParameters returns a ResourceClaimParametersInformer. +func (v *version) ResourceClaimParameters() ResourceClaimParametersInformer { + return &resourceClaimParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // ResourceClaimTemplates returns a ResourceClaimTemplateInformer. func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer { return &resourceClaimTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} @@ -64,3 +80,8 @@ func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer { func (v *version) ResourceClasses() ResourceClassInformer { return &resourceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// ResourceClassParameters returns a ResourceClassParametersInformer. +func (v *version) ResourceClassParameters() ResourceClassParametersInformer { + return &resourceClassParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/noderesourceslice.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha2/noderesourceslice.go new file mode 100644 index 00000000000..e4e6197d182 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha2/noderesourceslice.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + time "time" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + cache "k8s.io/client-go/tools/cache" +) + +// NodeResourceSliceInformer provides access to a shared informer and lister for +// NodeResourceSlices. +type NodeResourceSliceInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha2.NodeResourceSliceLister +} + +type nodeResourceSliceInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewNodeResourceSliceInformer constructs a new informer for NodeResourceSlice type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewNodeResourceSliceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredNodeResourceSliceInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredNodeResourceSliceInformer constructs a new informer for NodeResourceSlice type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredNodeResourceSliceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceV1alpha2().NodeResourceSlices().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceV1alpha2().NodeResourceSlices().Watch(context.TODO(), options) + }, + }, + &resourcev1alpha2.NodeResourceSlice{}, + resyncPeriod, + indexers, + ) +} + +func (f *nodeResourceSliceInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredNodeResourceSliceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *nodeResourceSliceInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha2.NodeResourceSlice{}, f.defaultInformer) +} + +func (f *nodeResourceSliceInformer) Lister() v1alpha2.NodeResourceSliceLister { + return v1alpha2.NewNodeResourceSliceLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..3064ac9f559 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + time "time" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + cache "k8s.io/client-go/tools/cache" +) + +// ResourceClaimParametersInformer provides access to a shared informer and lister for +// ResourceClaimParameters. +type ResourceClaimParametersInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha2.ResourceClaimParametersLister +} + +type resourceClaimParametersInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewResourceClaimParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredResourceClaimParametersInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredResourceClaimParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceV1alpha2().ResourceClaimParameters(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceV1alpha2().ResourceClaimParameters(namespace).Watch(context.TODO(), options) + }, + }, + &resourcev1alpha2.ResourceClaimParameters{}, + resyncPeriod, + indexers, + ) +} + +func (f *resourceClaimParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredResourceClaimParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *resourceClaimParametersInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimParameters{}, f.defaultInformer) +} + +func (f *resourceClaimParametersInformer) Lister() v1alpha2.ResourceClaimParametersLister { + return v1alpha2.NewResourceClaimParametersLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..71fbefe1620 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + time "time" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + cache "k8s.io/client-go/tools/cache" +) + +// ResourceClassParametersInformer provides access to a shared informer and lister for +// ResourceClassParameters. +type ResourceClassParametersInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha2.ResourceClassParametersLister +} + +type resourceClassParametersInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewResourceClassParametersInformer constructs a new informer for ResourceClassParameters type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewResourceClassParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredResourceClassParametersInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredResourceClassParametersInformer constructs a new informer for ResourceClassParameters type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredResourceClassParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceV1alpha2().ResourceClassParameters(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceV1alpha2().ResourceClassParameters(namespace).Watch(context.TODO(), options) + }, + }, + &resourcev1alpha2.ResourceClassParameters{}, + resyncPeriod, + indexers, + ) +} + +func (f *resourceClassParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredResourceClassParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *resourceClassParametersInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha2.ResourceClassParameters{}, f.defaultInformer) +} + +func (f *resourceClassParametersInformer) Lister() v1alpha2.ResourceClassParametersLister { + return v1alpha2.NewResourceClassParametersLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_noderesourceslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_noderesourceslice.go new file mode 100644 index 00000000000..13ec45b6f4b --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_noderesourceslice.go @@ -0,0 +1,145 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + testing "k8s.io/client-go/testing" +) + +// FakeNodeResourceSlices implements NodeResourceSliceInterface +type FakeNodeResourceSlices struct { + Fake *FakeResourceV1alpha2 +} + +var noderesourceslicesResource = v1alpha2.SchemeGroupVersion.WithResource("noderesourceslices") + +var noderesourceslicesKind = v1alpha2.SchemeGroupVersion.WithKind("NodeResourceSlice") + +// Get takes name of the nodeResourceSlice, and returns the corresponding nodeResourceSlice object, and an error if there is any. +func (c *FakeNodeResourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.NodeResourceSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(noderesourceslicesResource, name), &v1alpha2.NodeResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.NodeResourceSlice), err +} + +// List takes label and field selectors, and returns the list of NodeResourceSlices that match those selectors. +func (c *FakeNodeResourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.NodeResourceSliceList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(noderesourceslicesResource, noderesourceslicesKind, opts), &v1alpha2.NodeResourceSliceList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.NodeResourceSliceList{ListMeta: obj.(*v1alpha2.NodeResourceSliceList).ListMeta} + for _, item := range obj.(*v1alpha2.NodeResourceSliceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested nodeResourceSlices. +func (c *FakeNodeResourceSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(noderesourceslicesResource, opts)) +} + +// Create takes the representation of a nodeResourceSlice and creates it. Returns the server's representation of the nodeResourceSlice, and an error, if there is any. +func (c *FakeNodeResourceSlices) Create(ctx context.Context, nodeResourceSlice *v1alpha2.NodeResourceSlice, opts v1.CreateOptions) (result *v1alpha2.NodeResourceSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(noderesourceslicesResource, nodeResourceSlice), &v1alpha2.NodeResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.NodeResourceSlice), err +} + +// Update takes the representation of a nodeResourceSlice and updates it. Returns the server's representation of the nodeResourceSlice, and an error, if there is any. +func (c *FakeNodeResourceSlices) Update(ctx context.Context, nodeResourceSlice *v1alpha2.NodeResourceSlice, opts v1.UpdateOptions) (result *v1alpha2.NodeResourceSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(noderesourceslicesResource, nodeResourceSlice), &v1alpha2.NodeResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.NodeResourceSlice), err +} + +// Delete takes name of the nodeResourceSlice and deletes it. Returns an error if one occurs. +func (c *FakeNodeResourceSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(noderesourceslicesResource, name, opts), &v1alpha2.NodeResourceSlice{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeNodeResourceSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(noderesourceslicesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.NodeResourceSliceList{}) + return err +} + +// Patch applies the patch and returns the patched nodeResourceSlice. +func (c *FakeNodeResourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.NodeResourceSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(noderesourceslicesResource, name, pt, data, subresources...), &v1alpha2.NodeResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.NodeResourceSlice), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied nodeResourceSlice. +func (c *FakeNodeResourceSlices) Apply(ctx context.Context, nodeResourceSlice *resourcev1alpha2.NodeResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.NodeResourceSlice, err error) { + if nodeResourceSlice == nil { + return nil, fmt.Errorf("nodeResourceSlice provided to Apply must not be nil") + } + data, err := json.Marshal(nodeResourceSlice) + if err != nil { + return nil, err + } + name := nodeResourceSlice.Name + if name == nil { + return nil, fmt.Errorf("nodeResourceSlice.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(noderesourceslicesResource, *name, types.ApplyPatchType, data), &v1alpha2.NodeResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.NodeResourceSlice), err +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go index 20538773208..c26af9ecd14 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go @@ -28,6 +28,10 @@ type FakeResourceV1alpha2 struct { *testing.Fake } +func (c *FakeResourceV1alpha2) NodeResourceSlices() v1alpha2.NodeResourceSliceInterface { + return &FakeNodeResourceSlices{c} +} + func (c *FakeResourceV1alpha2) PodSchedulingContexts(namespace string) v1alpha2.PodSchedulingContextInterface { return &FakePodSchedulingContexts{c, namespace} } @@ -36,6 +40,10 @@ func (c *FakeResourceV1alpha2) ResourceClaims(namespace string) v1alpha2.Resourc return &FakeResourceClaims{c, namespace} } +func (c *FakeResourceV1alpha2) ResourceClaimParameters(namespace string) v1alpha2.ResourceClaimParametersInterface { + return &FakeResourceClaimParameters{c, namespace} +} + func (c *FakeResourceV1alpha2) ResourceClaimTemplates(namespace string) v1alpha2.ResourceClaimTemplateInterface { return &FakeResourceClaimTemplates{c, namespace} } @@ -44,6 +52,10 @@ func (c *FakeResourceV1alpha2) ResourceClasses() v1alpha2.ResourceClassInterface return &FakeResourceClasses{c} } +func (c *FakeResourceV1alpha2) ResourceClassParameters(namespace string) v1alpha2.ResourceClassParametersInterface { + return &FakeResourceClassParameters{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeResourceV1alpha2) RESTClient() rest.Interface { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go new file mode 100644 index 00000000000..da32b5caec5 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go @@ -0,0 +1,154 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + testing "k8s.io/client-go/testing" +) + +// FakeResourceClaimParameters implements ResourceClaimParametersInterface +type FakeResourceClaimParameters struct { + Fake *FakeResourceV1alpha2 + ns string +} + +var resourceclaimparametersResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaimparameters") + +var resourceclaimparametersKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParameters") + +// Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any. +func (c *FakeResourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(resourceclaimparametersResource, c.ns, name), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} + +// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. +func (c *FakeResourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(resourceclaimparametersResource, resourceclaimparametersKind, c.ns, opts), &v1alpha2.ResourceClaimParametersList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.ResourceClaimParametersList{ListMeta: obj.(*v1alpha2.ResourceClaimParametersList).ListMeta} + for _, item := range obj.(*v1alpha2.ResourceClaimParametersList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested resourceClaimParameters. +func (c *FakeResourceClaimParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(resourceclaimparametersResource, c.ns, opts)) + +} + +// Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *FakeResourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(resourceclaimparametersResource, c.ns, resourceClaimParameters), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} + +// Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *FakeResourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(resourceclaimparametersResource, c.ns, resourceClaimParameters), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} + +// Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs. +func (c *FakeResourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(resourceclaimparametersResource, c.ns, name, opts), &v1alpha2.ResourceClaimParameters{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(resourceclaimparametersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClaimParametersList{}) + return err +} + +// Patch applies the patch and returns the patched resourceClaimParameters. +func (c *FakeResourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclaimparametersResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters. +func (c *FakeResourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + if resourceClaimParameters == nil { + return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil") + } + data, err := json.Marshal(resourceClaimParameters) + if err != nil { + return nil, err + } + name := resourceClaimParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclaimparametersResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go new file mode 100644 index 00000000000..c11762963f2 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go @@ -0,0 +1,154 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + testing "k8s.io/client-go/testing" +) + +// FakeResourceClassParameters implements ResourceClassParametersInterface +type FakeResourceClassParameters struct { + Fake *FakeResourceV1alpha2 + ns string +} + +var resourceclassparametersResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclassparameters") + +var resourceclassparametersKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParameters") + +// Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any. +func (c *FakeResourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClassParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(resourceclassparametersResource, c.ns, name), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} + +// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. +func (c *FakeResourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(resourceclassparametersResource, resourceclassparametersKind, c.ns, opts), &v1alpha2.ResourceClassParametersList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.ResourceClassParametersList{ListMeta: obj.(*v1alpha2.ResourceClassParametersList).ListMeta} + for _, item := range obj.(*v1alpha2.ResourceClassParametersList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested resourceClassParameters. +func (c *FakeResourceClassParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(resourceclassparametersResource, c.ns, opts)) + +} + +// Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *FakeResourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(resourceclassparametersResource, c.ns, resourceClassParameters), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} + +// Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *FakeResourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(resourceclassparametersResource, c.ns, resourceClassParameters), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} + +// Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs. +func (c *FakeResourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(resourceclassparametersResource, c.ns, name, opts), &v1alpha2.ResourceClassParameters{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(resourceclassparametersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClassParametersList{}) + return err +} + +// Patch applies the patch and returns the patched resourceClassParameters. +func (c *FakeResourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclassparametersResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters. +func (c *FakeResourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) { + if resourceClassParameters == nil { + return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil") + } + data, err := json.Marshal(resourceClassParameters) + if err != nil { + return nil, err + } + name := resourceClassParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclassparametersResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go index 2c02e9ce74e..abb4d70045c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go @@ -18,10 +18,16 @@ limitations under the License. package v1alpha2 +type NodeResourceSliceExpansion interface{} + type PodSchedulingContextExpansion interface{} type ResourceClaimExpansion interface{} +type ResourceClaimParametersExpansion interface{} + type ResourceClaimTemplateExpansion interface{} type ResourceClassExpansion interface{} + +type ResourceClassParametersExpansion interface{} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/noderesourceslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/noderesourceslice.go new file mode 100644 index 00000000000..491f63e7c48 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/noderesourceslice.go @@ -0,0 +1,197 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// NodeResourceSlicesGetter has a method to return a NodeResourceSliceInterface. +// A group's client should implement this interface. +type NodeResourceSlicesGetter interface { + NodeResourceSlices() NodeResourceSliceInterface +} + +// NodeResourceSliceInterface has methods to work with NodeResourceSlice resources. +type NodeResourceSliceInterface interface { + Create(ctx context.Context, nodeResourceSlice *v1alpha2.NodeResourceSlice, opts v1.CreateOptions) (*v1alpha2.NodeResourceSlice, error) + Update(ctx context.Context, nodeResourceSlice *v1alpha2.NodeResourceSlice, opts v1.UpdateOptions) (*v1alpha2.NodeResourceSlice, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.NodeResourceSlice, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.NodeResourceSliceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.NodeResourceSlice, err error) + Apply(ctx context.Context, nodeResourceSlice *resourcev1alpha2.NodeResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.NodeResourceSlice, err error) + NodeResourceSliceExpansion +} + +// nodeResourceSlices implements NodeResourceSliceInterface +type nodeResourceSlices struct { + client rest.Interface +} + +// newNodeResourceSlices returns a NodeResourceSlices +func newNodeResourceSlices(c *ResourceV1alpha2Client) *nodeResourceSlices { + return &nodeResourceSlices{ + client: c.RESTClient(), + } +} + +// Get takes name of the nodeResourceSlice, and returns the corresponding nodeResourceSlice object, and an error if there is any. +func (c *nodeResourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.NodeResourceSlice, err error) { + result = &v1alpha2.NodeResourceSlice{} + err = c.client.Get(). + Resource("noderesourceslices"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of NodeResourceSlices that match those selectors. +func (c *nodeResourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.NodeResourceSliceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.NodeResourceSliceList{} + err = c.client.Get(). + Resource("noderesourceslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested nodeResourceSlices. +func (c *nodeResourceSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("noderesourceslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a nodeResourceSlice and creates it. Returns the server's representation of the nodeResourceSlice, and an error, if there is any. +func (c *nodeResourceSlices) Create(ctx context.Context, nodeResourceSlice *v1alpha2.NodeResourceSlice, opts v1.CreateOptions) (result *v1alpha2.NodeResourceSlice, err error) { + result = &v1alpha2.NodeResourceSlice{} + err = c.client.Post(). + Resource("noderesourceslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(nodeResourceSlice). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a nodeResourceSlice and updates it. Returns the server's representation of the nodeResourceSlice, and an error, if there is any. +func (c *nodeResourceSlices) Update(ctx context.Context, nodeResourceSlice *v1alpha2.NodeResourceSlice, opts v1.UpdateOptions) (result *v1alpha2.NodeResourceSlice, err error) { + result = &v1alpha2.NodeResourceSlice{} + err = c.client.Put(). + Resource("noderesourceslices"). + Name(nodeResourceSlice.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(nodeResourceSlice). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the nodeResourceSlice and deletes it. Returns an error if one occurs. +func (c *nodeResourceSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("noderesourceslices"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *nodeResourceSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("noderesourceslices"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched nodeResourceSlice. +func (c *nodeResourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.NodeResourceSlice, err error) { + result = &v1alpha2.NodeResourceSlice{} + err = c.client.Patch(pt). + Resource("noderesourceslices"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied nodeResourceSlice. +func (c *nodeResourceSlices) Apply(ctx context.Context, nodeResourceSlice *resourcev1alpha2.NodeResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.NodeResourceSlice, err error) { + if nodeResourceSlice == nil { + return nil, fmt.Errorf("nodeResourceSlice provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(nodeResourceSlice) + if err != nil { + return nil, err + } + name := nodeResourceSlice.Name + if name == nil { + return nil, fmt.Errorf("nodeResourceSlice.Name must be provided to Apply") + } + result = &v1alpha2.NodeResourceSlice{} + err = c.client.Patch(types.ApplyPatchType). + Resource("noderesourceslices"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go index d5795fd6286..2a5c3585554 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go @@ -28,10 +28,13 @@ import ( type ResourceV1alpha2Interface interface { RESTClient() rest.Interface + NodeResourceSlicesGetter PodSchedulingContextsGetter ResourceClaimsGetter + ResourceClaimParametersGetter ResourceClaimTemplatesGetter ResourceClassesGetter + ResourceClassParametersGetter } // ResourceV1alpha2Client is used to interact with features provided by the resource.k8s.io group. @@ -39,6 +42,10 @@ type ResourceV1alpha2Client struct { restClient rest.Interface } +func (c *ResourceV1alpha2Client) NodeResourceSlices() NodeResourceSliceInterface { + return newNodeResourceSlices(c) +} + func (c *ResourceV1alpha2Client) PodSchedulingContexts(namespace string) PodSchedulingContextInterface { return newPodSchedulingContexts(c, namespace) } @@ -47,6 +54,10 @@ func (c *ResourceV1alpha2Client) ResourceClaims(namespace string) ResourceClaimI return newResourceClaims(c, namespace) } +func (c *ResourceV1alpha2Client) ResourceClaimParameters(namespace string) ResourceClaimParametersInterface { + return newResourceClaimParameters(c, namespace) +} + func (c *ResourceV1alpha2Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface { return newResourceClaimTemplates(c, namespace) } @@ -55,6 +66,10 @@ func (c *ResourceV1alpha2Client) ResourceClasses() ResourceClassInterface { return newResourceClasses(c) } +func (c *ResourceV1alpha2Client) ResourceClassParameters(namespace string) ResourceClassParametersInterface { + return newResourceClassParameters(c, namespace) +} + // NewForConfig creates a new ResourceV1alpha2Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..d08afcb611b --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,208 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ResourceClaimParametersGetter has a method to return a ResourceClaimParametersInterface. +// A group's client should implement this interface. +type ResourceClaimParametersGetter interface { + ResourceClaimParameters(namespace string) ResourceClaimParametersInterface +} + +// ResourceClaimParametersInterface has methods to work with ResourceClaimParameters resources. +type ResourceClaimParametersInterface interface { + Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClaimParameters, error) + Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClaimParameters, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaimParameters, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClaimParametersList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) + Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) + ResourceClaimParametersExpansion +} + +// resourceClaimParameters implements ResourceClaimParametersInterface +type resourceClaimParameters struct { + client rest.Interface + ns string +} + +// newResourceClaimParameters returns a ResourceClaimParameters +func newResourceClaimParameters(c *ResourceV1alpha2Client, namespace string) *resourceClaimParameters { + return &resourceClaimParameters{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any. +func (c *resourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. +func (c *resourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.ResourceClaimParametersList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resourceClaimParameters. +func (c *resourceClaimParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *resourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Post(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClaimParameters). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *resourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Put(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(resourceClaimParameters.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClaimParameters). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs. +func (c *resourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resourceClaimParameters. +func (c *resourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters. +func (c *resourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + if resourceClaimParameters == nil { + return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(resourceClaimParameters) + if err != nil { + return nil, err + } + name := resourceClaimParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply") + } + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..8ac9be0784a --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,208 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ResourceClassParametersGetter has a method to return a ResourceClassParametersInterface. +// A group's client should implement this interface. +type ResourceClassParametersGetter interface { + ResourceClassParameters(namespace string) ResourceClassParametersInterface +} + +// ResourceClassParametersInterface has methods to work with ResourceClassParameters resources. +type ResourceClassParametersInterface interface { + Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClassParameters, error) + Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClassParameters, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClassParameters, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClassParametersList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) + Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) + ResourceClassParametersExpansion +} + +// resourceClassParameters implements ResourceClassParametersInterface +type resourceClassParameters struct { + client rest.Interface + ns string +} + +// newResourceClassParameters returns a ResourceClassParameters +func newResourceClassParameters(c *ResourceV1alpha2Client, namespace string) *resourceClassParameters { + return &resourceClassParameters{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any. +func (c *resourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. +func (c *resourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.ResourceClassParametersList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resourceClassParameters. +func (c *resourceClassParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *resourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Post(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClassParameters). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *resourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Put(). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(resourceClassParameters.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClassParameters). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs. +func (c *resourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resourceClassParameters. +func (c *resourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters. +func (c *resourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) { + if resourceClassParameters == nil { + return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(resourceClassParameters) + if err != nil { + return nil, err + } + name := resourceClassParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply") + } + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go index 3b16e44290c..dd8a21755ff 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go @@ -18,6 +18,10 @@ limitations under the License. package v1alpha2 +// NodeResourceSliceListerExpansion allows custom methods to be added to +// NodeResourceSliceLister. +type NodeResourceSliceListerExpansion interface{} + // PodSchedulingContextListerExpansion allows custom methods to be added to // PodSchedulingContextLister. type PodSchedulingContextListerExpansion interface{} @@ -34,6 +38,14 @@ type ResourceClaimListerExpansion interface{} // ResourceClaimNamespaceLister. type ResourceClaimNamespaceListerExpansion interface{} +// ResourceClaimParametersListerExpansion allows custom methods to be added to +// ResourceClaimParametersLister. +type ResourceClaimParametersListerExpansion interface{} + +// ResourceClaimParametersNamespaceListerExpansion allows custom methods to be added to +// ResourceClaimParametersNamespaceLister. +type ResourceClaimParametersNamespaceListerExpansion interface{} + // ResourceClaimTemplateListerExpansion allows custom methods to be added to // ResourceClaimTemplateLister. type ResourceClaimTemplateListerExpansion interface{} @@ -45,3 +57,11 @@ type ResourceClaimTemplateNamespaceListerExpansion interface{} // ResourceClassListerExpansion allows custom methods to be added to // ResourceClassLister. type ResourceClassListerExpansion interface{} + +// ResourceClassParametersListerExpansion allows custom methods to be added to +// ResourceClassParametersLister. +type ResourceClassParametersListerExpansion interface{} + +// ResourceClassParametersNamespaceListerExpansion allows custom methods to be added to +// ResourceClassParametersNamespaceLister. +type ResourceClassParametersNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/noderesourceslice.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha2/noderesourceslice.go new file mode 100644 index 00000000000..f5853499a02 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha2/noderesourceslice.go @@ -0,0 +1,68 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// NodeResourceSliceLister helps list NodeResourceSlices. +// All objects returned here must be treated as read-only. +type NodeResourceSliceLister interface { + // List lists all NodeResourceSlices in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.NodeResourceSlice, err error) + // Get retrieves the NodeResourceSlice from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha2.NodeResourceSlice, error) + NodeResourceSliceListerExpansion +} + +// nodeResourceSliceLister implements the NodeResourceSliceLister interface. +type nodeResourceSliceLister struct { + indexer cache.Indexer +} + +// NewNodeResourceSliceLister returns a new NodeResourceSliceLister. +func NewNodeResourceSliceLister(indexer cache.Indexer) NodeResourceSliceLister { + return &nodeResourceSliceLister{indexer: indexer} +} + +// List lists all NodeResourceSlices in the indexer. +func (s *nodeResourceSliceLister) List(selector labels.Selector) (ret []*v1alpha2.NodeResourceSlice, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.NodeResourceSlice)) + }) + return ret, err +} + +// Get retrieves the NodeResourceSlice from the index for a given name. +func (s *nodeResourceSliceLister) Get(name string) (*v1alpha2.NodeResourceSlice, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha2.Resource("noderesourceslice"), name) + } + return obj.(*v1alpha2.NodeResourceSlice), nil +} diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..1a561ef7a58 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ResourceClaimParametersLister helps list ResourceClaimParameters. +// All objects returned here must be treated as read-only. +type ResourceClaimParametersLister interface { + // List lists all ResourceClaimParameters in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) + // ResourceClaimParameters returns an object that can list and get ResourceClaimParameters. + ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister + ResourceClaimParametersListerExpansion +} + +// resourceClaimParametersLister implements the ResourceClaimParametersLister interface. +type resourceClaimParametersLister struct { + indexer cache.Indexer +} + +// NewResourceClaimParametersLister returns a new ResourceClaimParametersLister. +func NewResourceClaimParametersLister(indexer cache.Indexer) ResourceClaimParametersLister { + return &resourceClaimParametersLister{indexer: indexer} +} + +// List lists all ResourceClaimParameters in the indexer. +func (s *resourceClaimParametersLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.ResourceClaimParameters)) + }) + return ret, err +} + +// ResourceClaimParameters returns an object that can list and get ResourceClaimParameters. +func (s *resourceClaimParametersLister) ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister { + return resourceClaimParametersNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ResourceClaimParametersNamespaceLister helps list and get ResourceClaimParameters. +// All objects returned here must be treated as read-only. +type ResourceClaimParametersNamespaceLister interface { + // List lists all ResourceClaimParameters in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) + // Get retrieves the ResourceClaimParameters from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha2.ResourceClaimParameters, error) + ResourceClaimParametersNamespaceListerExpansion +} + +// resourceClaimParametersNamespaceLister implements the ResourceClaimParametersNamespaceLister +// interface. +type resourceClaimParametersNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ResourceClaimParameters in the indexer for a given namespace. +func (s resourceClaimParametersNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.ResourceClaimParameters)) + }) + return ret, err +} + +// Get retrieves the ResourceClaimParameters from the indexer for a given namespace and name. +func (s resourceClaimParametersNamespaceLister) Get(name string) (*v1alpha2.ResourceClaimParameters, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha2.Resource("resourceclaimparameters"), name) + } + return obj.(*v1alpha2.ResourceClaimParameters), nil +} diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..26fb95e6d22 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ResourceClassParametersLister helps list ResourceClassParameters. +// All objects returned here must be treated as read-only. +type ResourceClassParametersLister interface { + // List lists all ResourceClassParameters in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) + // ResourceClassParameters returns an object that can list and get ResourceClassParameters. + ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister + ResourceClassParametersListerExpansion +} + +// resourceClassParametersLister implements the ResourceClassParametersLister interface. +type resourceClassParametersLister struct { + indexer cache.Indexer +} + +// NewResourceClassParametersLister returns a new ResourceClassParametersLister. +func NewResourceClassParametersLister(indexer cache.Indexer) ResourceClassParametersLister { + return &resourceClassParametersLister{indexer: indexer} +} + +// List lists all ResourceClassParameters in the indexer. +func (s *resourceClassParametersLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.ResourceClassParameters)) + }) + return ret, err +} + +// ResourceClassParameters returns an object that can list and get ResourceClassParameters. +func (s *resourceClassParametersLister) ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister { + return resourceClassParametersNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ResourceClassParametersNamespaceLister helps list and get ResourceClassParameters. +// All objects returned here must be treated as read-only. +type ResourceClassParametersNamespaceLister interface { + // List lists all ResourceClassParameters in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) + // Get retrieves the ResourceClassParameters from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha2.ResourceClassParameters, error) + ResourceClassParametersNamespaceListerExpansion +} + +// resourceClassParametersNamespaceLister implements the ResourceClassParametersNamespaceLister +// interface. +type resourceClassParametersNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ResourceClassParameters in the indexer for a given namespace. +func (s resourceClassParametersNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.ResourceClassParameters)) + }) + return ret, err +} + +// Get retrieves the ResourceClassParameters from the indexer for a given namespace and name. +func (s resourceClassParametersNamespaceLister) Get(name string) (*v1alpha2.ResourceClassParameters, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha2.Resource("resourceclassparameters"), name) + } + return obj.(*v1alpha2.ResourceClassParameters), nil +} diff --git a/test/integration/etcd/data.go b/test/integration/etcd/data.go index 9148909da6e..f3014e4e57e 100644 --- a/test/integration/etcd/data.go +++ b/test/integration/etcd/data.go @@ -446,6 +446,18 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes Stub: `{"metadata": {"name": "pod1name"}, "spec": {"selectedNode": "node1name", "potentialNodes": ["node1name", "node2name"]}}`, ExpectedEtcdPath: "/registry/podschedulingcontexts/" + namespace + "/pod1name", }, + gvr("resource.k8s.io", "v1alpha2", "resourceclassparameters"): { + Stub: `{"metadata": {"name": "class1parameters"}}`, + ExpectedEtcdPath: "/registry/resourceclassparameters/" + namespace + "/class1parameters", + }, + gvr("resource.k8s.io", "v1alpha2", "resourceclaimparameters"): { + Stub: `{"metadata": {"name": "claim1parameters"}}`, + ExpectedEtcdPath: "/registry/resourceclaimparameters/" + namespace + "/claim1parameters", + }, + gvr("resource.k8s.io", "v1alpha2", "noderesourceslices"): { + Stub: `{"metadata": {"name": "node1slice"}, "nodeName": "worker1", "driverName": "dra.example.com"}`, // TODO: add one structured parameter model + ExpectedEtcdPath: "/registry/noderesourceslices/node1slice", + }, // -- // k8s.io/apiserver/pkg/apis/apiserverinternal/v1alpha1