mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update kubernetes to latest
updating the kubernetes release to the latest in main go.mod Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
63c4c05b35
commit
5a66991bb3
749
vendor/k8s.io/api/resource/v1alpha2/generated.proto
generated
vendored
749
vendor/k8s.io/api/resource/v1alpha2/generated.proto
generated
vendored
@ -1,749 +0,0 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package k8s.io.api.resource.v1alpha2;
|
||||
|
||||
import "k8s.io/api/core/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "k8s.io/api/resource/v1alpha2";
|
||||
|
||||
// AllocationResult contains attributes of an allocated resource.
|
||||
message AllocationResult {
|
||||
// ResourceHandles contain the state associated with an allocation that
|
||||
// should be maintained throughout the lifetime of a claim. Each
|
||||
// ResourceHandle contains data that should be passed to a specific kubelet
|
||||
// plugin once it lands on a node. This data is returned by the driver
|
||||
// after a successful allocation and is opaque to Kubernetes. Driver
|
||||
// documentation may explain to users how to interpret this data if needed.
|
||||
//
|
||||
// Setting this field is optional. It has a maximum size of 32 entries.
|
||||
// If null (or empty), it is assumed this allocation will be processed by a
|
||||
// single kubelet plugin with no ResourceHandle data attached. The name of
|
||||
// the kubelet plugin invoked will match the DriverName set in the
|
||||
// ResourceClaimStatus this AllocationResult is embedded in.
|
||||
//
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
repeated ResourceHandle resourceHandles = 1;
|
||||
|
||||
// This field will get set by the resource driver after it has allocated
|
||||
// the resource to inform the scheduler where it can schedule Pods using
|
||||
// the ResourceClaim.
|
||||
//
|
||||
// Setting this field is optional. If null, the resource is available
|
||||
// everywhere.
|
||||
// +optional
|
||||
optional k8s.io.api.core.v1.NodeSelector availableOnNodes = 2;
|
||||
|
||||
// Shareable determines whether the resource supports more
|
||||
// than one consumer at a time.
|
||||
// +optional
|
||||
optional bool shareable = 3;
|
||||
}
|
||||
|
||||
// AllocationResultModel must have one and only one field set.
|
||||
message AllocationResultModel {
|
||||
// NamedResources describes the allocation result when using the named resources model.
|
||||
//
|
||||
// +optional
|
||||
optional NamedResourcesAllocationResult namedResources = 1;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
// NamedResourcesAllocationResult is used in AllocationResultModel.
|
||||
message NamedResourcesAllocationResult {
|
||||
// Name is the name of the selected resource instance.
|
||||
optional string name = 1;
|
||||
}
|
||||
|
||||
// NamedResourcesAttribute is a combination of an attribute name and its value.
|
||||
message NamedResourcesAttribute {
|
||||
// Name is unique identifier among all resource instances managed by
|
||||
// the driver on the node. It must be a DNS subdomain.
|
||||
optional string name = 1;
|
||||
|
||||
optional NamedResourcesAttributeValue attributeValue = 2;
|
||||
}
|
||||
|
||||
// NamedResourcesAttributeValue must have one and only one field set.
|
||||
message NamedResourcesAttributeValue {
|
||||
// QuantityValue is a quantity.
|
||||
optional k8s.io.apimachinery.pkg.api.resource.Quantity quantity = 6;
|
||||
|
||||
// BoolValue is a true/false value.
|
||||
optional bool bool = 2;
|
||||
|
||||
// IntValue is a 64-bit integer.
|
||||
optional int64 int = 7;
|
||||
|
||||
// IntSliceValue is an array of 64-bit integers.
|
||||
optional NamedResourcesIntSlice intSlice = 8;
|
||||
|
||||
// StringValue is a string.
|
||||
optional string string = 5;
|
||||
|
||||
// StringSliceValue is an array of strings.
|
||||
optional NamedResourcesStringSlice stringSlice = 9;
|
||||
|
||||
// VersionValue is a semantic version according to semver.org spec 2.0.0.
|
||||
optional string version = 10;
|
||||
}
|
||||
|
||||
// NamedResourcesFilter is used in ResourceFilterModel.
|
||||
message NamedResourcesFilter {
|
||||
// Selector is a CEL expression which must evaluate to true if a
|
||||
// resource instance is suitable. The language is as defined in
|
||||
// https://kubernetes.io/docs/reference/using-api/cel/
|
||||
//
|
||||
// In addition, for each type NamedResourcesin AttributeValue there is a map that
|
||||
// resolves to the corresponding value of the instance under evaluation.
|
||||
// For example:
|
||||
//
|
||||
// attributes.quantity["a"].isGreaterThan(quantity("0")) &&
|
||||
// attributes.stringslice["b"].isSorted()
|
||||
optional string selector = 1;
|
||||
}
|
||||
|
||||
// NamedResourcesInstance represents one individual hardware instance that can be selected based
|
||||
// on its attributes.
|
||||
message NamedResourcesInstance {
|
||||
// Name is unique identifier among all resource instances managed by
|
||||
// the driver on the node. It must be a DNS subdomain.
|
||||
optional string name = 1;
|
||||
|
||||
// Attributes defines the attributes of this resource instance.
|
||||
// The name of each attribute must be unique.
|
||||
//
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
repeated NamedResourcesAttribute attributes = 2;
|
||||
}
|
||||
|
||||
// NamedResourcesIntSlice contains a slice of 64-bit integers.
|
||||
message NamedResourcesIntSlice {
|
||||
// Ints is the slice of 64-bit integers.
|
||||
//
|
||||
// +listType=atomic
|
||||
repeated int64 ints = 1;
|
||||
}
|
||||
|
||||
// NamedResourcesRequest is used in ResourceRequestModel.
|
||||
message NamedResourcesRequest {
|
||||
// Selector is a CEL expression which must evaluate to true if a
|
||||
// resource instance is suitable. The language is as defined in
|
||||
// https://kubernetes.io/docs/reference/using-api/cel/
|
||||
//
|
||||
// In addition, for each type NamedResourcesin AttributeValue there is a map that
|
||||
// resolves to the corresponding value of the instance under evaluation.
|
||||
// For example:
|
||||
//
|
||||
// attributes.quantity["a"].isGreaterThan(quantity("0")) &&
|
||||
// attributes.stringslice["b"].isSorted()
|
||||
optional string selector = 1;
|
||||
}
|
||||
|
||||
// NamedResourcesResources is used in ResourceModel.
|
||||
message NamedResourcesResources {
|
||||
// The list of all individual resources instances currently available.
|
||||
//
|
||||
// +listType=atomic
|
||||
repeated NamedResourcesInstance instances = 1;
|
||||
}
|
||||
|
||||
// NamedResourcesStringSlice contains a slice of strings.
|
||||
message NamedResourcesStringSlice {
|
||||
// Strings is the slice of strings.
|
||||
//
|
||||
// +listType=atomic
|
||||
repeated string strings = 1;
|
||||
}
|
||||
|
||||
// PodSchedulingContext objects hold information that is needed to schedule
|
||||
// a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation
|
||||
// mode.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
message PodSchedulingContext {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec describes where resources for the Pod are needed.
|
||||
optional PodSchedulingContextSpec spec = 2;
|
||||
|
||||
// Status describes where resources for the Pod can be allocated.
|
||||
// +optional
|
||||
optional PodSchedulingContextStatus status = 3;
|
||||
}
|
||||
|
||||
// PodSchedulingContextList is a collection of Pod scheduling objects.
|
||||
message PodSchedulingContextList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of PodSchedulingContext objects.
|
||||
repeated PodSchedulingContext items = 2;
|
||||
}
|
||||
|
||||
// PodSchedulingContextSpec describes where resources for the Pod are needed.
|
||||
message PodSchedulingContextSpec {
|
||||
// SelectedNode is the node for which allocation of ResourceClaims that
|
||||
// are referenced by the Pod and that use "WaitForFirstConsumer"
|
||||
// allocation is to be attempted.
|
||||
// +optional
|
||||
optional string selectedNode = 1;
|
||||
|
||||
// PotentialNodes lists nodes where the Pod might be able to run.
|
||||
//
|
||||
// The size of this field is limited to 128. This is large enough for
|
||||
// many clusters. Larger clusters may need more attempts to find a node
|
||||
// that suits all pending resources. This may get increased in the
|
||||
// future, but not reduced.
|
||||
//
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
repeated string potentialNodes = 2;
|
||||
}
|
||||
|
||||
// PodSchedulingContextStatus describes where resources for the Pod can be allocated.
|
||||
message PodSchedulingContextStatus {
|
||||
// ResourceClaims describes resource availability for each
|
||||
// pod.spec.resourceClaim entry where the corresponding ResourceClaim
|
||||
// uses "WaitForFirstConsumer" allocation mode.
|
||||
//
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +optional
|
||||
repeated ResourceClaimSchedulingStatus resourceClaims = 1;
|
||||
}
|
||||
|
||||
// ResourceClaim describes which resources are needed by a resource consumer.
|
||||
// Its status tracks whether the resource has been allocated and what the
|
||||
// resulting attributes are.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
message ResourceClaim {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec describes the desired attributes of a resource that then needs
|
||||
// to be allocated. It can only be set once when creating the
|
||||
// ResourceClaim.
|
||||
optional ResourceClaimSpec spec = 2;
|
||||
|
||||
// Status describes whether the resource is available and with which
|
||||
// attributes.
|
||||
// +optional
|
||||
optional ResourceClaimStatus status = 3;
|
||||
}
|
||||
|
||||
// ResourceClaimConsumerReference contains enough information to let you
|
||||
// locate the consumer of a ResourceClaim. The user must be a resource in the same
|
||||
// namespace as the ResourceClaim.
|
||||
message ResourceClaimConsumerReference {
|
||||
// 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.
|
||||
// +optional
|
||||
optional string apiGroup = 1;
|
||||
|
||||
// Resource is the type of resource being referenced, for example "pods".
|
||||
optional string resource = 3;
|
||||
|
||||
// Name is the name of resource being referenced.
|
||||
optional string name = 4;
|
||||
|
||||
// UID identifies exactly one incarnation of the resource.
|
||||
optional string uid = 5;
|
||||
}
|
||||
|
||||
// ResourceClaimList is a collection of claims.
|
||||
message ResourceClaimList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of resource claims.
|
||||
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.
|
||||
message ResourceClaimParametersReference {
|
||||
// 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.
|
||||
// +optional
|
||||
optional string apiGroup = 1;
|
||||
|
||||
// Kind is the type of resource being referenced. This is the same
|
||||
// value as in the parameter object's metadata, for example "ConfigMap".
|
||||
optional string kind = 2;
|
||||
|
||||
// Name is the name of resource being referenced.
|
||||
optional string name = 3;
|
||||
}
|
||||
|
||||
// ResourceClaimSchedulingStatus contains information about one particular
|
||||
// ResourceClaim with "WaitForFirstConsumer" allocation mode.
|
||||
message ResourceClaimSchedulingStatus {
|
||||
// Name matches the pod.spec.resourceClaims[*].Name field.
|
||||
// +optional
|
||||
optional string name = 1;
|
||||
|
||||
// UnsuitableNodes lists nodes that the ResourceClaim cannot be
|
||||
// allocated for.
|
||||
//
|
||||
// The size of this field is limited to 128, the same as for
|
||||
// PodSchedulingSpec.PotentialNodes. This may get increased in the
|
||||
// future, but not reduced.
|
||||
//
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
repeated string unsuitableNodes = 2;
|
||||
}
|
||||
|
||||
// ResourceClaimSpec defines how a resource is to be allocated.
|
||||
message ResourceClaimSpec {
|
||||
// ResourceClassName references the driver and additional parameters
|
||||
// via the name of a ResourceClass that was created as part of the
|
||||
// driver deployment.
|
||||
optional string resourceClassName = 1;
|
||||
|
||||
// ParametersRef references a separate object with arbitrary parameters
|
||||
// that will be used by the driver when allocating a resource for the
|
||||
// claim.
|
||||
//
|
||||
// The object must be in the same namespace as the ResourceClaim.
|
||||
// +optional
|
||||
optional ResourceClaimParametersReference parametersRef = 2;
|
||||
|
||||
// Allocation can start immediately or when a Pod wants to use the
|
||||
// resource. "WaitForFirstConsumer" is the default.
|
||||
// +optional
|
||||
optional string allocationMode = 3;
|
||||
}
|
||||
|
||||
// ResourceClaimStatus tracks whether the resource has been allocated and what
|
||||
// the resulting attributes are.
|
||||
message ResourceClaimStatus {
|
||||
// DriverName is a copy of the driver name from the ResourceClass at
|
||||
// the time when allocation started.
|
||||
// +optional
|
||||
optional string driverName = 1;
|
||||
|
||||
// Allocation is set by the resource driver once a resource or set of
|
||||
// resources has been allocated successfully. If this is not specified, the
|
||||
// resources have not been allocated yet.
|
||||
// +optional
|
||||
optional AllocationResult allocation = 2;
|
||||
|
||||
// ReservedFor indicates which entities are currently allowed to use
|
||||
// the claim. A Pod which references a ResourceClaim which is not
|
||||
// reserved for that Pod will not be started.
|
||||
//
|
||||
// There can be at most 32 such reservations. This may get increased in
|
||||
// the future, but not reduced.
|
||||
//
|
||||
// +listType=map
|
||||
// +listMapKey=uid
|
||||
// +patchStrategy=merge
|
||||
// +patchMergeKey=uid
|
||||
// +optional
|
||||
repeated ResourceClaimConsumerReference reservedFor = 3;
|
||||
|
||||
// DeallocationRequested indicates that a ResourceClaim is to be
|
||||
// deallocated.
|
||||
//
|
||||
// The driver then must deallocate this claim and reset the field
|
||||
// together with clearing the Allocation field.
|
||||
//
|
||||
// While DeallocationRequested is set, no new consumers may be added to
|
||||
// ReservedFor.
|
||||
// +optional
|
||||
optional bool deallocationRequested = 4;
|
||||
}
|
||||
|
||||
// ResourceClaimTemplate is used to produce ResourceClaim objects.
|
||||
message ResourceClaimTemplate {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Describes the ResourceClaim that is to be generated.
|
||||
//
|
||||
// This field is immutable. A ResourceClaim will get created by the
|
||||
// control plane for a Pod when needed and then not get updated
|
||||
// anymore.
|
||||
optional ResourceClaimTemplateSpec spec = 2;
|
||||
}
|
||||
|
||||
// ResourceClaimTemplateList is a collection of claim templates.
|
||||
message ResourceClaimTemplateList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of resource claim templates.
|
||||
repeated ResourceClaimTemplate items = 2;
|
||||
}
|
||||
|
||||
// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
|
||||
message ResourceClaimTemplateSpec {
|
||||
// ObjectMeta may contain labels and annotations that will be copied into the PVC
|
||||
// when creating it. No other fields are allowed and will be rejected during
|
||||
// validation.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec for the ResourceClaim. The entire content is copied unchanged
|
||||
// into the ResourceClaim that gets created from this template. The
|
||||
// same fields as in a ResourceClaim are also valid here.
|
||||
optional ResourceClaimSpec spec = 2;
|
||||
}
|
||||
|
||||
// ResourceClass is used by administrators to influence how resources
|
||||
// are allocated.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
message ResourceClass {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// DriverName defines the name of the dynamic resource driver that is
|
||||
// used for allocation of a ResourceClaim that uses this class.
|
||||
//
|
||||
// Resource drivers have a unique name in forward domain order
|
||||
// (acme.example.com).
|
||||
optional string driverName = 2;
|
||||
|
||||
// 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.
|
||||
// +optional
|
||||
optional ResourceClassParametersReference parametersRef = 3;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
message ResourceClassList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of resource classes.
|
||||
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 {
|
||||
// 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.
|
||||
// +optional
|
||||
optional string apiGroup = 1;
|
||||
|
||||
// Kind is the type of resource being referenced. This is the same
|
||||
// value as in the parameter object's metadata.
|
||||
optional string kind = 2;
|
||||
|
||||
// Name is the name of resource being referenced.
|
||||
optional string name = 3;
|
||||
|
||||
// Namespace that contains the referenced resource. Must be empty
|
||||
// for cluster-scoped resources and non-empty for namespaced
|
||||
// resources.
|
||||
// +optional
|
||||
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 {
|
||||
// NamedResources describes a resource filter using the named resources model.
|
||||
//
|
||||
// +optional
|
||||
optional NamedResourcesFilter namedResources = 1;
|
||||
}
|
||||
|
||||
// ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.
|
||||
message ResourceHandle {
|
||||
// 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.
|
||||
optional string driverName = 1;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// The maximum size of this field is 16KiB. This may get increased in the
|
||||
// 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;
|
||||
}
|
||||
|
||||
// ResourceModel must have one and only one field set.
|
||||
message ResourceModel {
|
||||
// NamedResources describes available resources using the named resources model.
|
||||
//
|
||||
// +optional
|
||||
optional NamedResourcesResources namedResources = 1;
|
||||
}
|
||||
|
||||
// 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 {
|
||||
// NamedResources describes a request for resources with the named resources model.
|
||||
//
|
||||
// +optional
|
||||
optional NamedResourcesRequest namedResources = 1;
|
||||
}
|
||||
|
||||
// ResourceSlice provides information about available
|
||||
// resources on individual nodes.
|
||||
message ResourceSlice {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// NodeName identifies the node which provides the resources
|
||||
// if they are local to a node.
|
||||
//
|
||||
// A field selector can be used to list only ResourceSlice
|
||||
// objects with a certain node name.
|
||||
//
|
||||
// +optional
|
||||
optional string nodeName = 2;
|
||||
|
||||
// DriverName identifies the DRA driver providing the capacity information.
|
||||
// A field selector can be used to list only ResourceSlice
|
||||
// objects with a certain driver name.
|
||||
optional string driverName = 3;
|
||||
|
||||
optional ResourceModel resourceModel = 4;
|
||||
}
|
||||
|
||||
// ResourceSliceList is a collection of ResourceSlices.
|
||||
message ResourceSliceList {
|
||||
// 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 ResourceSlice items = 2;
|
||||
}
|
||||
|
||||
// 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
|
||||
// if the resources are local to a node.
|
||||
//
|
||||
// +optional
|
||||
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;
|
||||
}
|
||||
|
127
vendor/k8s.io/api/resource/v1alpha2/namedresources.go
generated
vendored
127
vendor/k8s.io/api/resource/v1alpha2/namedresources.go
generated
vendored
@ -1,127 +0,0 @@
|
||||
/*
|
||||
Copyright 2023 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 v1alpha2
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// NamedResourcesResources is used in ResourceModel.
|
||||
type NamedResourcesResources struct {
|
||||
// The list of all individual resources instances currently available.
|
||||
//
|
||||
// +listType=atomic
|
||||
Instances []NamedResourcesInstance `json:"instances" protobuf:"bytes,1,name=instances"`
|
||||
}
|
||||
|
||||
// NamedResourcesInstance represents one individual hardware instance that can be selected based
|
||||
// on its attributes.
|
||||
type NamedResourcesInstance struct {
|
||||
// Name is unique identifier among all resource instances managed by
|
||||
// the driver on the node. It must be a DNS subdomain.
|
||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
||||
|
||||
// Attributes defines the attributes of this resource instance.
|
||||
// The name of each attribute must be unique.
|
||||
//
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
Attributes []NamedResourcesAttribute `json:"attributes,omitempty" protobuf:"bytes,2,opt,name=attributes"`
|
||||
}
|
||||
|
||||
// NamedResourcesAttribute is a combination of an attribute name and its value.
|
||||
type NamedResourcesAttribute struct {
|
||||
// Name is unique identifier among all resource instances managed by
|
||||
// the driver on the node. It must be a DNS subdomain.
|
||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
||||
|
||||
NamedResourcesAttributeValue `json:",inline" protobuf:"bytes,2,opt,name=attributeValue"`
|
||||
}
|
||||
|
||||
// The Go field names below have a Value suffix to avoid a conflict between the
|
||||
// field "String" and the corresponding method. That method is required.
|
||||
// The Kubernetes API is defined without that suffix to keep it more natural.
|
||||
|
||||
// NamedResourcesAttributeValue must have one and only one field set.
|
||||
type NamedResourcesAttributeValue struct {
|
||||
// QuantityValue is a quantity.
|
||||
QuantityValue *resource.Quantity `json:"quantity,omitempty" protobuf:"bytes,6,opt,name=quantity"`
|
||||
// BoolValue is a true/false value.
|
||||
BoolValue *bool `json:"bool,omitempty" protobuf:"bytes,2,opt,name=bool"`
|
||||
// IntValue is a 64-bit integer.
|
||||
IntValue *int64 `json:"int,omitempty" protobuf:"varint,7,opt,name=int"`
|
||||
// IntSliceValue is an array of 64-bit integers.
|
||||
IntSliceValue *NamedResourcesIntSlice `json:"intSlice,omitempty" protobuf:"varint,8,rep,name=intSlice"`
|
||||
// StringValue is a string.
|
||||
StringValue *string `json:"string,omitempty" protobuf:"bytes,5,opt,name=string"`
|
||||
// StringSliceValue is an array of strings.
|
||||
StringSliceValue *NamedResourcesStringSlice `json:"stringSlice,omitempty" protobuf:"bytes,9,rep,name=stringSlice"`
|
||||
// VersionValue is a semantic version according to semver.org spec 2.0.0.
|
||||
VersionValue *string `json:"version,omitempty" protobuf:"bytes,10,opt,name=version"`
|
||||
}
|
||||
|
||||
// NamedResourcesIntSlice contains a slice of 64-bit integers.
|
||||
type NamedResourcesIntSlice struct {
|
||||
// Ints is the slice of 64-bit integers.
|
||||
//
|
||||
// +listType=atomic
|
||||
Ints []int64 `json:"ints" protobuf:"bytes,1,opt,name=ints"`
|
||||
}
|
||||
|
||||
// NamedResourcesStringSlice contains a slice of strings.
|
||||
type NamedResourcesStringSlice struct {
|
||||
// Strings is the slice of strings.
|
||||
//
|
||||
// +listType=atomic
|
||||
Strings []string `json:"strings" protobuf:"bytes,1,opt,name=strings"`
|
||||
}
|
||||
|
||||
// NamedResourcesRequest is used in ResourceRequestModel.
|
||||
type NamedResourcesRequest struct {
|
||||
// Selector is a CEL expression which must evaluate to true if a
|
||||
// resource instance is suitable. The language is as defined in
|
||||
// https://kubernetes.io/docs/reference/using-api/cel/
|
||||
//
|
||||
// In addition, for each type NamedResourcesin AttributeValue there is a map that
|
||||
// resolves to the corresponding value of the instance under evaluation.
|
||||
// For example:
|
||||
//
|
||||
// attributes.quantity["a"].isGreaterThan(quantity("0")) &&
|
||||
// attributes.stringslice["b"].isSorted()
|
||||
Selector string `json:"selector" protobuf:"bytes,1,name=selector"`
|
||||
}
|
||||
|
||||
// NamedResourcesFilter is used in ResourceFilterModel.
|
||||
type NamedResourcesFilter struct {
|
||||
// Selector is a CEL expression which must evaluate to true if a
|
||||
// resource instance is suitable. The language is as defined in
|
||||
// https://kubernetes.io/docs/reference/using-api/cel/
|
||||
//
|
||||
// In addition, for each type NamedResourcesin AttributeValue there is a map that
|
||||
// resolves to the corresponding value of the instance under evaluation.
|
||||
// For example:
|
||||
//
|
||||
// attributes.quantity["a"].isGreaterThan(quantity("0")) &&
|
||||
// attributes.stringslice["b"].isSorted()
|
||||
Selector string `json:"selector" protobuf:"bytes,1,name=selector"`
|
||||
}
|
||||
|
||||
// NamedResourcesAllocationResult is used in AllocationResultModel.
|
||||
type NamedResourcesAllocationResult struct {
|
||||
// Name is the name of the selected resource instance.
|
||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
||||
}
|
737
vendor/k8s.io/api/resource/v1alpha2/types.go
generated
vendored
737
vendor/k8s.io/api/resource/v1alpha2/types.go
generated
vendored
@ -1,737 +0,0 @@
|
||||
/*
|
||||
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 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
|
||||
|
||||
// ResourceClaim describes which resources are needed by a resource consumer.
|
||||
// Its status tracks whether the resource has been allocated and what the
|
||||
// resulting attributes are.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
type ResourceClaim struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec describes the desired attributes of a resource that then needs
|
||||
// to be allocated. It can only be set once when creating the
|
||||
// ResourceClaim.
|
||||
Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"`
|
||||
|
||||
// Status describes whether the resource is available and with which
|
||||
// attributes.
|
||||
// +optional
|
||||
Status ResourceClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// ResourceClaimSpec defines how a resource is to be allocated.
|
||||
type ResourceClaimSpec struct {
|
||||
// ResourceClassName references the driver and additional parameters
|
||||
// via the name of a ResourceClass that was created as part of the
|
||||
// driver deployment.
|
||||
ResourceClassName string `json:"resourceClassName" protobuf:"bytes,1,name=resourceClassName"`
|
||||
|
||||
// ParametersRef references a separate object with arbitrary parameters
|
||||
// that will be used by the driver when allocating a resource for the
|
||||
// claim.
|
||||
//
|
||||
// The object must be in the same namespace as the ResourceClaim.
|
||||
// +optional
|
||||
ParametersRef *ResourceClaimParametersReference `json:"parametersRef,omitempty" protobuf:"bytes,2,opt,name=parametersRef"`
|
||||
|
||||
// Allocation can start immediately or when a Pod wants to use the
|
||||
// resource. "WaitForFirstConsumer" is the default.
|
||||
// +optional
|
||||
AllocationMode AllocationMode `json:"allocationMode,omitempty" protobuf:"bytes,3,opt,name=allocationMode"`
|
||||
}
|
||||
|
||||
// AllocationMode describes whether a ResourceClaim gets allocated immediately
|
||||
// when it gets created (AllocationModeImmediate) or whether allocation is
|
||||
// delayed until it is needed for a Pod
|
||||
// (AllocationModeWaitForFirstConsumer). Other modes might get added in the
|
||||
// future.
|
||||
type AllocationMode string
|
||||
|
||||
const (
|
||||
// When a ResourceClaim has AllocationModeWaitForFirstConsumer, allocation is
|
||||
// delayed until a Pod gets scheduled that needs the ResourceClaim. The
|
||||
// scheduler will consider all resource requirements of that Pod and
|
||||
// trigger allocation for a node that fits the Pod.
|
||||
AllocationModeWaitForFirstConsumer AllocationMode = "WaitForFirstConsumer"
|
||||
|
||||
// When a ResourceClaim has AllocationModeImmediate, allocation starts
|
||||
// as soon as the ResourceClaim gets created. This is done without
|
||||
// considering the needs of Pods that will use the ResourceClaim
|
||||
// because those Pods are not known yet.
|
||||
AllocationModeImmediate AllocationMode = "Immediate"
|
||||
)
|
||||
|
||||
// ResourceClaimStatus tracks whether the resource has been allocated and what
|
||||
// the resulting attributes are.
|
||||
type ResourceClaimStatus struct {
|
||||
// DriverName is a copy of the driver name from the ResourceClass at
|
||||
// the time when allocation started.
|
||||
// +optional
|
||||
DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"`
|
||||
|
||||
// Allocation is set by the resource driver once a resource or set of
|
||||
// resources has been allocated successfully. If this is not specified, the
|
||||
// resources have not been allocated yet.
|
||||
// +optional
|
||||
Allocation *AllocationResult `json:"allocation,omitempty" protobuf:"bytes,2,opt,name=allocation"`
|
||||
|
||||
// ReservedFor indicates which entities are currently allowed to use
|
||||
// the claim. A Pod which references a ResourceClaim which is not
|
||||
// reserved for that Pod will not be started.
|
||||
//
|
||||
// There can be at most 32 such reservations. This may get increased in
|
||||
// the future, but not reduced.
|
||||
//
|
||||
// +listType=map
|
||||
// +listMapKey=uid
|
||||
// +patchStrategy=merge
|
||||
// +patchMergeKey=uid
|
||||
// +optional
|
||||
ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,3,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"`
|
||||
|
||||
// DeallocationRequested indicates that a ResourceClaim is to be
|
||||
// deallocated.
|
||||
//
|
||||
// The driver then must deallocate this claim and reset the field
|
||||
// together with clearing the Allocation field.
|
||||
//
|
||||
// While DeallocationRequested is set, no new consumers may be added to
|
||||
// ReservedFor.
|
||||
// +optional
|
||||
DeallocationRequested bool `json:"deallocationRequested,omitempty" protobuf:"varint,4,opt,name=deallocationRequested"`
|
||||
}
|
||||
|
||||
// ReservedForMaxSize is the maximum number of entries in
|
||||
// claim.status.reservedFor.
|
||||
const ResourceClaimReservedForMaxSize = 32
|
||||
|
||||
// AllocationResult contains attributes of an allocated resource.
|
||||
type AllocationResult struct {
|
||||
// ResourceHandles contain the state associated with an allocation that
|
||||
// should be maintained throughout the lifetime of a claim. Each
|
||||
// ResourceHandle contains data that should be passed to a specific kubelet
|
||||
// plugin once it lands on a node. This data is returned by the driver
|
||||
// after a successful allocation and is opaque to Kubernetes. Driver
|
||||
// documentation may explain to users how to interpret this data if needed.
|
||||
//
|
||||
// Setting this field is optional. It has a maximum size of 32 entries.
|
||||
// If null (or empty), it is assumed this allocation will be processed by a
|
||||
// single kubelet plugin with no ResourceHandle data attached. The name of
|
||||
// the kubelet plugin invoked will match the DriverName set in the
|
||||
// ResourceClaimStatus this AllocationResult is embedded in.
|
||||
//
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
ResourceHandles []ResourceHandle `json:"resourceHandles,omitempty" protobuf:"bytes,1,opt,name=resourceHandles"`
|
||||
|
||||
// This field will get set by the resource driver after it has allocated
|
||||
// the resource to inform the scheduler where it can schedule Pods using
|
||||
// the ResourceClaim.
|
||||
//
|
||||
// Setting this field is optional. If null, the resource is available
|
||||
// everywhere.
|
||||
// +optional
|
||||
AvailableOnNodes *v1.NodeSelector `json:"availableOnNodes,omitempty" protobuf:"bytes,2,opt,name=availableOnNodes"`
|
||||
|
||||
// Shareable determines whether the resource supports more
|
||||
// than one consumer at a time.
|
||||
// +optional
|
||||
Shareable bool `json:"shareable,omitempty" protobuf:"varint,3,opt,name=shareable"`
|
||||
}
|
||||
|
||||
// AllocationResultResourceHandlesMaxSize represents the maximum number of
|
||||
// entries in allocation.resourceHandles.
|
||||
const AllocationResultResourceHandlesMaxSize = 32
|
||||
|
||||
// ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.
|
||||
type ResourceHandle struct {
|
||||
// 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.
|
||||
DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// The maximum size of this field is 16KiB. This may get increased in the
|
||||
// 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
|
||||
// if the resources are local to a node.
|
||||
//
|
||||
// +optional
|
||||
NodeName string `json:"nodeName,omitempty" 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 {
|
||||
// NamedResources describes the allocation result when using the named resources model.
|
||||
//
|
||||
// +optional
|
||||
NamedResources *NamedResourcesAllocationResult `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
|
||||
// ResourceClaimList is a collection of claims.
|
||||
type ResourceClaimList 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 resource claims.
|
||||
Items []ResourceClaim `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.26
|
||||
|
||||
// PodSchedulingContext objects hold information that is needed to schedule
|
||||
// a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation
|
||||
// mode.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
type PodSchedulingContext struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec describes where resources for the Pod are needed.
|
||||
Spec PodSchedulingContextSpec `json:"spec" protobuf:"bytes,2,name=spec"`
|
||||
|
||||
// Status describes where resources for the Pod can be allocated.
|
||||
// +optional
|
||||
Status PodSchedulingContextStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// PodSchedulingContextSpec describes where resources for the Pod are needed.
|
||||
type PodSchedulingContextSpec struct {
|
||||
// SelectedNode is the node for which allocation of ResourceClaims that
|
||||
// are referenced by the Pod and that use "WaitForFirstConsumer"
|
||||
// allocation is to be attempted.
|
||||
// +optional
|
||||
SelectedNode string `json:"selectedNode,omitempty" protobuf:"bytes,1,opt,name=selectedNode"`
|
||||
|
||||
// PotentialNodes lists nodes where the Pod might be able to run.
|
||||
//
|
||||
// The size of this field is limited to 128. This is large enough for
|
||||
// many clusters. Larger clusters may need more attempts to find a node
|
||||
// that suits all pending resources. This may get increased in the
|
||||
// future, but not reduced.
|
||||
//
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
PotentialNodes []string `json:"potentialNodes,omitempty" protobuf:"bytes,2,opt,name=potentialNodes"`
|
||||
}
|
||||
|
||||
// PodSchedulingContextStatus describes where resources for the Pod can be allocated.
|
||||
type PodSchedulingContextStatus struct {
|
||||
// ResourceClaims describes resource availability for each
|
||||
// pod.spec.resourceClaim entry where the corresponding ResourceClaim
|
||||
// uses "WaitForFirstConsumer" allocation mode.
|
||||
//
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +optional
|
||||
ResourceClaims []ResourceClaimSchedulingStatus `json:"resourceClaims,omitempty" protobuf:"bytes,1,opt,name=resourceClaims"`
|
||||
|
||||
// If there ever is a need to support other kinds of resources
|
||||
// than ResourceClaim, then new fields could get added here
|
||||
// for those other resources.
|
||||
}
|
||||
|
||||
// ResourceClaimSchedulingStatus contains information about one particular
|
||||
// ResourceClaim with "WaitForFirstConsumer" allocation mode.
|
||||
type ResourceClaimSchedulingStatus struct {
|
||||
// Name matches the pod.spec.resourceClaims[*].Name field.
|
||||
// +optional
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||
|
||||
// UnsuitableNodes lists nodes that the ResourceClaim cannot be
|
||||
// allocated for.
|
||||
//
|
||||
// The size of this field is limited to 128, the same as for
|
||||
// PodSchedulingSpec.PotentialNodes. This may get increased in the
|
||||
// future, but not reduced.
|
||||
//
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
UnsuitableNodes []string `json:"unsuitableNodes,omitempty" protobuf:"bytes,2,opt,name=unsuitableNodes"`
|
||||
}
|
||||
|
||||
// PodSchedulingNodeListMaxSize defines the maximum number of entries in the
|
||||
// node lists that are stored in PodSchedulingContext objects. This limit is part
|
||||
// of the API.
|
||||
const PodSchedulingNodeListMaxSize = 128
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
|
||||
// PodSchedulingContextList is a collection of Pod scheduling objects.
|
||||
type PodSchedulingContextList 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 PodSchedulingContext objects.
|
||||
Items []PodSchedulingContext `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.26
|
||||
|
||||
// ResourceClass is used by administrators to influence how resources
|
||||
// are allocated.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
type ResourceClass struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// DriverName defines the name of the dynamic resource driver that is
|
||||
// used for allocation of a ResourceClaim that uses this class.
|
||||
//
|
||||
// Resource drivers have a unique name in forward domain order
|
||||
// (acme.example.com).
|
||||
DriverName string `json:"driverName" protobuf:"bytes,2,name=driverName"`
|
||||
|
||||
// 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.
|
||||
// +optional
|
||||
ParametersRef *ResourceClassParametersReference `json:"parametersRef,omitempty" protobuf:"bytes,3,opt,name=parametersRef"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// 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
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
|
||||
// ResourceClassList is a collection of classes.
|
||||
type ResourceClassList 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 resource classes.
|
||||
Items []ResourceClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// ResourceClassParametersReference contains enough information to let you
|
||||
// locate the parameters for a ResourceClass.
|
||||
type ResourceClassParametersReference struct {
|
||||
// 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.
|
||||
// +optional
|
||||
APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"`
|
||||
// Kind is the type of resource being referenced. This is the same
|
||||
// value as in the parameter object's metadata.
|
||||
Kind string `json:"kind" protobuf:"bytes,2,name=kind"`
|
||||
// Name is the name of resource being referenced.
|
||||
Name string `json:"name" protobuf:"bytes,3,name=name"`
|
||||
// Namespace that contains the referenced resource. Must be empty
|
||||
// for cluster-scoped resources and non-empty for namespaced
|
||||
// resources.
|
||||
// +optional
|
||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
|
||||
}
|
||||
|
||||
// ResourceClaimParametersReference contains enough information to let you
|
||||
// locate the parameters for a ResourceClaim. The object must be in the same
|
||||
// namespace as the ResourceClaim.
|
||||
type ResourceClaimParametersReference struct {
|
||||
// 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.
|
||||
// +optional
|
||||
APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"`
|
||||
// Kind is the type of resource being referenced. This is the same
|
||||
// value as in the parameter object's metadata, for example "ConfigMap".
|
||||
Kind string `json:"kind" protobuf:"bytes,2,name=kind"`
|
||||
// Name is the name of resource being referenced.
|
||||
Name string `json:"name" protobuf:"bytes,3,name=name"`
|
||||
}
|
||||
|
||||
// ResourceClaimConsumerReference contains enough information to let you
|
||||
// locate the consumer of a ResourceClaim. The user must be a resource in the same
|
||||
// namespace as the ResourceClaim.
|
||||
type ResourceClaimConsumerReference struct {
|
||||
// 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.
|
||||
// +optional
|
||||
APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"`
|
||||
// Resource is the type of resource being referenced, for example "pods".
|
||||
Resource string `json:"resource" protobuf:"bytes,3,name=resource"`
|
||||
// Name is the name of resource being referenced.
|
||||
Name string `json:"name" protobuf:"bytes,4,name=name"`
|
||||
// UID identifies exactly one incarnation of the resource.
|
||||
UID types.UID `json:"uid" protobuf:"bytes,5,name=uid"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
|
||||
// ResourceClaimTemplate is used to produce ResourceClaim objects.
|
||||
type ResourceClaimTemplate struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Describes the ResourceClaim that is to be generated.
|
||||
//
|
||||
// This field is immutable. A ResourceClaim will get created by the
|
||||
// control plane for a Pod when needed and then not get updated
|
||||
// anymore.
|
||||
Spec ResourceClaimTemplateSpec `json:"spec" protobuf:"bytes,2,name=spec"`
|
||||
}
|
||||
|
||||
// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
|
||||
type ResourceClaimTemplateSpec struct {
|
||||
// ObjectMeta may contain labels and annotations that will be copied into the PVC
|
||||
// when creating it. No other fields are allowed and will be rejected during
|
||||
// validation.
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec for the ResourceClaim. The entire content is copied unchanged
|
||||
// into the ResourceClaim that gets created from this template. The
|
||||
// same fields as in a ResourceClaim are also valid here.
|
||||
Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
|
||||
// ResourceClaimTemplateList is a collection of claim templates.
|
||||
type ResourceClaimTemplateList 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 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
|
||||
|
||||
// ResourceSlice provides information about available
|
||||
// resources on individual nodes.
|
||||
type ResourceSlice struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// NodeName identifies the node which provides the resources
|
||||
// if they are local to a node.
|
||||
//
|
||||
// A field selector can be used to list only ResourceSlice
|
||||
// objects with a certain node name.
|
||||
//
|
||||
// +optional
|
||||
NodeName string `json:"nodeName,omitempty" protobuf:"bytes,2,opt,name=nodeName"`
|
||||
|
||||
// DriverName identifies the DRA driver providing the capacity information.
|
||||
// A field selector can be used to list only ResourceSlice
|
||||
// objects with a certain driver name.
|
||||
DriverName string `json:"driverName" protobuf:"bytes,3,name=driverName"`
|
||||
|
||||
ResourceModel `json:",inline" protobuf:"bytes,4,name=resourceModel"`
|
||||
}
|
||||
|
||||
// ResourceModel must have one and only one field set.
|
||||
type ResourceModel struct {
|
||||
// NamedResources describes available resources using the named resources model.
|
||||
//
|
||||
// +optional
|
||||
NamedResources *NamedResourcesResources `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.30
|
||||
|
||||
// ResourceSliceList is a collection of ResourceSlices.
|
||||
type ResourceSliceList 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 []ResourceSlice `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 {
|
||||
// NamedResources describes a request for resources with the named resources model.
|
||||
//
|
||||
// +optional
|
||||
NamedResources *NamedResourcesRequest `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"`
|
||||
}
|
||||
|
||||
// +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 {
|
||||
// NamedResources describes a resource filter using the named resources model.
|
||||
//
|
||||
// +optional
|
||||
NamedResources *NamedResourcesFilter `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"`
|
||||
}
|
||||
|
||||
// +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"`
|
||||
}
|
395
vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go
generated
vendored
395
vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go
generated
vendored
@ -1,395 +0,0 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
package v1alpha2
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-codegen.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_AllocationResult = map[string]string{
|
||||
"": "AllocationResult contains attributes of an allocated resource.",
|
||||
"resourceHandles": "ResourceHandles contain the state associated with an allocation that should be maintained throughout the lifetime of a claim. Each ResourceHandle contains data that should be passed to a specific kubelet plugin once it lands on a node. This data is returned by the driver after a successful allocation and is opaque to Kubernetes. Driver documentation may explain to users how to interpret this data if needed.\n\nSetting this field is optional. It has a maximum size of 32 entries. If null (or empty), it is assumed this allocation will be processed by a single kubelet plugin with no ResourceHandle data attached. The name of the kubelet plugin invoked will match the DriverName set in the ResourceClaimStatus this AllocationResult is embedded in.",
|
||||
"availableOnNodes": "This field will get set by the resource driver after it has allocated the resource to inform the scheduler where it can schedule Pods using the ResourceClaim.\n\nSetting this field is optional. If null, the resource is available everywhere.",
|
||||
"shareable": "Shareable determines whether the resource supports more than one consumer at a time.",
|
||||
}
|
||||
|
||||
func (AllocationResult) SwaggerDoc() map[string]string {
|
||||
return map_AllocationResult
|
||||
}
|
||||
|
||||
var map_AllocationResultModel = map[string]string{
|
||||
"": "AllocationResultModel must have one and only one field set.",
|
||||
"namedResources": "NamedResources describes the allocation result when using the named resources model.",
|
||||
}
|
||||
|
||||
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_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",
|
||||
"spec": "Spec describes where resources for the Pod are needed.",
|
||||
"status": "Status describes where resources for the Pod can be allocated.",
|
||||
}
|
||||
|
||||
func (PodSchedulingContext) SwaggerDoc() map[string]string {
|
||||
return map_PodSchedulingContext
|
||||
}
|
||||
|
||||
var map_PodSchedulingContextList = map[string]string{
|
||||
"": "PodSchedulingContextList is a collection of Pod scheduling objects.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of PodSchedulingContext objects.",
|
||||
}
|
||||
|
||||
func (PodSchedulingContextList) SwaggerDoc() map[string]string {
|
||||
return map_PodSchedulingContextList
|
||||
}
|
||||
|
||||
var map_PodSchedulingContextSpec = map[string]string{
|
||||
"": "PodSchedulingContextSpec describes where resources for the Pod are needed.",
|
||||
"selectedNode": "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.",
|
||||
"potentialNodes": "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.",
|
||||
}
|
||||
|
||||
func (PodSchedulingContextSpec) SwaggerDoc() map[string]string {
|
||||
return map_PodSchedulingContextSpec
|
||||
}
|
||||
|
||||
var map_PodSchedulingContextStatus = map[string]string{
|
||||
"": "PodSchedulingContextStatus describes where resources for the Pod can be allocated.",
|
||||
"resourceClaims": "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.",
|
||||
}
|
||||
|
||||
func (PodSchedulingContextStatus) SwaggerDoc() map[string]string {
|
||||
return map_PodSchedulingContextStatus
|
||||
}
|
||||
|
||||
var map_ResourceClaim = map[string]string{
|
||||
"": "ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
|
||||
"metadata": "Standard object metadata",
|
||||
"spec": "Spec describes the desired attributes of a resource that then needs to be allocated. It can only be set once when creating the ResourceClaim.",
|
||||
"status": "Status describes whether the resource is available and with which attributes.",
|
||||
}
|
||||
|
||||
func (ResourceClaim) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaim
|
||||
}
|
||||
|
||||
var map_ResourceClaimConsumerReference = map[string]string{
|
||||
"": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource 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.",
|
||||
"resource": "Resource is the type of resource being referenced, for example \"pods\".",
|
||||
"name": "Name is the name of resource being referenced.",
|
||||
"uid": "UID identifies exactly one incarnation of the resource.",
|
||||
}
|
||||
|
||||
func (ResourceClaimConsumerReference) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimConsumerReference
|
||||
}
|
||||
|
||||
var map_ResourceClaimList = map[string]string{
|
||||
"": "ResourceClaimList is a collection of claims.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of resource claims.",
|
||||
}
|
||||
|
||||
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.",
|
||||
"kind": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata, for example \"ConfigMap\".",
|
||||
"name": "Name is the name of resource being referenced.",
|
||||
}
|
||||
|
||||
func (ResourceClaimParametersReference) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimParametersReference
|
||||
}
|
||||
|
||||
var map_ResourceClaimSchedulingStatus = map[string]string{
|
||||
"": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.",
|
||||
"name": "Name matches the pod.spec.resourceClaims[*].Name field.",
|
||||
"unsuitableNodes": "UnsuitableNodes lists nodes that the ResourceClaim cannot be allocated for.\n\nThe size of this field is limited to 128, the same as for PodSchedulingSpec.PotentialNodes. This may get increased in the future, but not reduced.",
|
||||
}
|
||||
|
||||
func (ResourceClaimSchedulingStatus) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimSchedulingStatus
|
||||
}
|
||||
|
||||
var map_ResourceClaimSpec = map[string]string{
|
||||
"": "ResourceClaimSpec defines how a resource is to be allocated.",
|
||||
"resourceClassName": "ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.",
|
||||
"parametersRef": "ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.\n\nThe object must be in the same namespace as the ResourceClaim.",
|
||||
"allocationMode": "Allocation can start immediately or when a Pod wants to use the resource. \"WaitForFirstConsumer\" is the default.",
|
||||
}
|
||||
|
||||
func (ResourceClaimSpec) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimSpec
|
||||
}
|
||||
|
||||
var map_ResourceClaimStatus = map[string]string{
|
||||
"": "ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.",
|
||||
"driverName": "DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.",
|
||||
"allocation": "Allocation is set by the resource driver once a resource or set of resources has been allocated successfully. If this is not specified, the resources have not been allocated yet.",
|
||||
"reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.",
|
||||
"deallocationRequested": "DeallocationRequested indicates that a ResourceClaim is to be deallocated.\n\nThe driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nWhile DeallocationRequested is set, no new consumers may be added to ReservedFor.",
|
||||
}
|
||||
|
||||
func (ResourceClaimStatus) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimStatus
|
||||
}
|
||||
|
||||
var map_ResourceClaimTemplate = map[string]string{
|
||||
"": "ResourceClaimTemplate is used to produce ResourceClaim objects.",
|
||||
"metadata": "Standard object metadata",
|
||||
"spec": "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.",
|
||||
}
|
||||
|
||||
func (ResourceClaimTemplate) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimTemplate
|
||||
}
|
||||
|
||||
var map_ResourceClaimTemplateList = map[string]string{
|
||||
"": "ResourceClaimTemplateList is a collection of claim templates.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of resource claim templates.",
|
||||
}
|
||||
|
||||
func (ResourceClaimTemplateList) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimTemplateList
|
||||
}
|
||||
|
||||
var map_ResourceClaimTemplateSpec = map[string]string{
|
||||
"": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.",
|
||||
"metadata": "ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.",
|
||||
"spec": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.",
|
||||
}
|
||||
|
||||
func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimTemplateSpec
|
||||
}
|
||||
|
||||
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.",
|
||||
"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 {
|
||||
return map_ResourceClass
|
||||
}
|
||||
|
||||
var map_ResourceClassList = map[string]string{
|
||||
"": "ResourceClassList is a collection of classes.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of resource classes.",
|
||||
}
|
||||
|
||||
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.",
|
||||
"kind": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata.",
|
||||
"name": "Name is the name of resource being referenced.",
|
||||
"namespace": "Namespace that contains the referenced resource. Must be empty for cluster-scoped resources and non-empty for namespaced resources.",
|
||||
}
|
||||
|
||||
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.",
|
||||
"namedResources": "NamedResources describes a resource filter using the named resources model.",
|
||||
}
|
||||
|
||||
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.",
|
||||
"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_ResourceModel = map[string]string{
|
||||
"": "ResourceModel must have one and only one field set.",
|
||||
"namedResources": "NamedResources describes available resources using the named resources model.",
|
||||
}
|
||||
|
||||
func (ResourceModel) SwaggerDoc() map[string]string {
|
||||
return map_ResourceModel
|
||||
}
|
||||
|
||||
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.",
|
||||
"namedResources": "NamedResources describes a request for resources with the named resources model.",
|
||||
}
|
||||
|
||||
func (ResourceRequestModel) SwaggerDoc() map[string]string {
|
||||
return map_ResourceRequestModel
|
||||
}
|
||||
|
||||
var map_ResourceSlice = map[string]string{
|
||||
"": "ResourceSlice provides information about available resources on individual nodes.",
|
||||
"metadata": "Standard object metadata",
|
||||
"nodeName": "NodeName identifies the node which provides the resources if they are local to a node.\n\nA field selector can be used to list only ResourceSlice 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 ResourceSlice objects with a certain driver name.",
|
||||
}
|
||||
|
||||
func (ResourceSlice) SwaggerDoc() map[string]string {
|
||||
return map_ResourceSlice
|
||||
}
|
||||
|
||||
var map_ResourceSliceList = map[string]string{
|
||||
"": "ResourceSliceList is a collection of ResourceSlices.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of node resource capacity objects.",
|
||||
}
|
||||
|
||||
func (ResourceSliceList) SwaggerDoc() map[string]string {
|
||||
return map_ResourceSliceList
|
||||
}
|
||||
|
||||
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 if the resources are local to a node.",
|
||||
"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
|
@ -20,5 +20,5 @@ limitations under the License.
|
||||
|
||||
// +groupName=resource.k8s.io
|
||||
|
||||
// Package v1alpha2 is the v1alpha2 version of the resource API.
|
||||
package v1alpha2 // import "k8s.io/api/resource/v1alpha2"
|
||||
// Package v1alpha3 is the v1alpha3 version of the resource API.
|
||||
package v1alpha3 // import "k8s.io/api/resource/v1alpha3"
|
File diff suppressed because it is too large
Load Diff
912
vendor/k8s.io/api/resource/v1alpha3/generated.proto
generated
vendored
Normal file
912
vendor/k8s.io/api/resource/v1alpha3/generated.proto
generated
vendored
Normal file
@ -0,0 +1,912 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package k8s.io.api.resource.v1alpha3;
|
||||
|
||||
import "k8s.io/api/core/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "k8s.io/api/resource/v1alpha3";
|
||||
|
||||
// AllocationResult contains attributes of an allocated resource.
|
||||
message AllocationResult {
|
||||
// Devices is the result of allocating devices.
|
||||
//
|
||||
// +optional
|
||||
optional DeviceAllocationResult devices = 1;
|
||||
|
||||
// NodeSelector defines where the allocated resources are available. If
|
||||
// unset, they are available everywhere.
|
||||
//
|
||||
// +optional
|
||||
optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 3;
|
||||
|
||||
// Controller is the name of the DRA driver which handled the
|
||||
// allocation. That driver is also responsible for deallocating the
|
||||
// claim. It is empty when the claim can be deallocated without
|
||||
// involving a driver.
|
||||
//
|
||||
// A driver may allocate devices provided by other drivers, so this
|
||||
// driver name here can be different from the driver names listed for
|
||||
// the results.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRAControlPlaneController
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +featureGate=DRAControlPlaneController
|
||||
optional string controller = 4;
|
||||
}
|
||||
|
||||
// BasicDevice defines one device instance.
|
||||
message BasicDevice {
|
||||
// Attributes defines the set of attributes for this device.
|
||||
// The name of each attribute must be unique in that set.
|
||||
//
|
||||
// The maximum number of attributes and capacities combined is 32.
|
||||
//
|
||||
// +optional
|
||||
map<string, DeviceAttribute> attributes = 1;
|
||||
|
||||
// Capacity defines the set of capacities for this device.
|
||||
// The name of each capacity must be unique in that set.
|
||||
//
|
||||
// The maximum number of attributes and capacities combined is 32.
|
||||
//
|
||||
// +optional
|
||||
map<string, .k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 2;
|
||||
}
|
||||
|
||||
// CELDeviceSelector contains a CEL expression for selecting a device.
|
||||
message CELDeviceSelector {
|
||||
// Expression is a CEL expression which evaluates a single device. It
|
||||
// must evaluate to true when the device under consideration satisfies
|
||||
// the desired criteria, and false when it does not. Any other result
|
||||
// is an error and causes allocation of devices to abort.
|
||||
//
|
||||
// The expression's input is an object named "device", which carries
|
||||
// the following properties:
|
||||
// - driver (string): the name of the driver which defines this device.
|
||||
// - attributes (map[string]object): the device's attributes, grouped by prefix
|
||||
// (e.g. device.attributes["dra.example.com"] evaluates to an object with all
|
||||
// of the attributes which were prefixed by "dra.example.com".
|
||||
// - capacity (map[string]object): the device's capacities, grouped by prefix.
|
||||
//
|
||||
// Example: Consider a device with driver="dra.example.com", which exposes
|
||||
// two attributes named "model" and "ext.example.com/family" and which
|
||||
// exposes one capacity named "modules". This input to this expression
|
||||
// would have the following fields:
|
||||
//
|
||||
// device.driver
|
||||
// device.attributes["dra.example.com"].model
|
||||
// device.attributes["ext.example.com"].family
|
||||
// device.capacity["dra.example.com"].modules
|
||||
//
|
||||
// The device.driver field can be used to check for a specific driver,
|
||||
// either as a high-level precondition (i.e. you only want to consider
|
||||
// devices from this driver) or as part of a multi-clause expression
|
||||
// that is meant to consider devices from different drivers.
|
||||
//
|
||||
// The value type of each attribute is defined by the device
|
||||
// definition, and users who write these expressions must consult the
|
||||
// documentation for their specific drivers. The value type of each
|
||||
// capacity is Quantity.
|
||||
//
|
||||
// If an unknown prefix is used as a lookup in either device.attributes
|
||||
// or device.capacity, an empty map will be returned. Any reference to
|
||||
// an unknown field will cause an evaluation error and allocation to
|
||||
// abort.
|
||||
//
|
||||
// A robust expression should check for the existence of attributes
|
||||
// before referencing them.
|
||||
//
|
||||
// For ease of use, the cel.bind() function is enabled, and can be used
|
||||
// to simplify expressions that access multiple attributes with the
|
||||
// same domain. For example:
|
||||
//
|
||||
// cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
|
||||
//
|
||||
// +required
|
||||
optional string expression = 1;
|
||||
}
|
||||
|
||||
// Device represents one individual hardware instance that can be selected based
|
||||
// on its attributes. Besides the name, exactly one field must be set.
|
||||
message Device {
|
||||
// Name is unique identifier among all devices managed by
|
||||
// the driver in the pool. It must be a DNS label.
|
||||
//
|
||||
// +required
|
||||
optional string name = 1;
|
||||
|
||||
// Basic defines one device instance.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=deviceType
|
||||
optional BasicDevice basic = 2;
|
||||
}
|
||||
|
||||
// DeviceAllocationConfiguration gets embedded in an AllocationResult.
|
||||
message DeviceAllocationConfiguration {
|
||||
// Source records whether the configuration comes from a class and thus
|
||||
// is not something that a normal user would have been able to set
|
||||
// or from a claim.
|
||||
//
|
||||
// +required
|
||||
optional string source = 1;
|
||||
|
||||
// Requests lists the names of requests where the configuration applies.
|
||||
// If empty, its applies to all requests.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated string requests = 2;
|
||||
|
||||
optional DeviceConfiguration deviceConfiguration = 3;
|
||||
}
|
||||
|
||||
// DeviceAllocationResult is the result of allocating devices.
|
||||
message DeviceAllocationResult {
|
||||
// Results lists all allocated devices.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceRequestAllocationResult results = 1;
|
||||
|
||||
// This field is a combination of all the claim and class configuration parameters.
|
||||
// Drivers can distinguish between those based on a flag.
|
||||
//
|
||||
// This includes configuration parameters for drivers which have no allocated
|
||||
// devices in the result because it is up to the drivers which configuration
|
||||
// parameters they support. They can silently ignore unknown configuration
|
||||
// parameters.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceAllocationConfiguration config = 2;
|
||||
}
|
||||
|
||||
// DeviceAttribute must have exactly one field set.
|
||||
message DeviceAttribute {
|
||||
// IntValue is a number.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=ValueType
|
||||
optional int64 int = 2;
|
||||
|
||||
// BoolValue is a true/false value.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=ValueType
|
||||
optional bool bool = 3;
|
||||
|
||||
// StringValue is a string. Must not be longer than 64 characters.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=ValueType
|
||||
optional string string = 4;
|
||||
|
||||
// VersionValue is a semantic version according to semver.org spec 2.0.0.
|
||||
// Must not be longer than 64 characters.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=ValueType
|
||||
optional string version = 5;
|
||||
}
|
||||
|
||||
// DeviceClaim defines how to request devices with a ResourceClaim.
|
||||
message DeviceClaim {
|
||||
// Requests represent individual requests for distinct devices which
|
||||
// must all be satisfied. If empty, nothing needs to be allocated.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceRequest requests = 1;
|
||||
|
||||
// These constraints must be satisfied by the set of devices that get
|
||||
// allocated for the claim.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceConstraint constraints = 2;
|
||||
|
||||
// This field holds configuration for multiple potential drivers which
|
||||
// could satisfy requests in this claim. It is ignored while allocating
|
||||
// the claim.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceClaimConfiguration config = 3;
|
||||
}
|
||||
|
||||
// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
|
||||
message DeviceClaimConfiguration {
|
||||
// Requests lists the names of requests where the configuration applies.
|
||||
// If empty, it applies to all requests.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated string requests = 1;
|
||||
|
||||
optional DeviceConfiguration deviceConfiguration = 2;
|
||||
}
|
||||
|
||||
// DeviceClass is a vendor- or admin-provided resource that contains
|
||||
// device configuration and selectors. It can be referenced in
|
||||
// the device requests of a claim to apply these presets.
|
||||
// Cluster scoped.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
message DeviceClass {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec defines what can be allocated and how to configure it.
|
||||
//
|
||||
// This is mutable. Consumers have to be prepared for classes changing
|
||||
// at any time, either because they get updated or replaced. Claim
|
||||
// allocations are done once based on whatever was set in classes at
|
||||
// the time of allocation.
|
||||
//
|
||||
// Changing the spec automatically increments the metadata.generation number.
|
||||
optional DeviceClassSpec spec = 2;
|
||||
}
|
||||
|
||||
// DeviceClassConfiguration is used in DeviceClass.
|
||||
message DeviceClassConfiguration {
|
||||
optional DeviceConfiguration deviceConfiguration = 1;
|
||||
}
|
||||
|
||||
// DeviceClassList is a collection of classes.
|
||||
message DeviceClassList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of resource classes.
|
||||
repeated DeviceClass items = 2;
|
||||
}
|
||||
|
||||
// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated
|
||||
// and how to configure it.
|
||||
message DeviceClassSpec {
|
||||
// Each selector must be satisfied by a device which is claimed via this class.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceSelector selectors = 1;
|
||||
|
||||
// Config defines configuration parameters that apply to each device that is claimed via this class.
|
||||
// Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor
|
||||
// configuration applies to exactly one driver.
|
||||
//
|
||||
// They are passed to the driver, but are not considered while allocating the claim.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceClassConfiguration config = 2;
|
||||
|
||||
// Only nodes matching the selector will be considered by the scheduler
|
||||
// when trying to find a Node that fits a Pod when that Pod uses
|
||||
// a claim that has not been allocated yet *and* that claim
|
||||
// gets allocated through a control plane controller. It is ignored
|
||||
// when the claim does not use a control plane controller
|
||||
// for allocation.
|
||||
//
|
||||
// Setting this field is optional. If unset, all Nodes are candidates.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRAControlPlaneController
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +featureGate=DRAControlPlaneController
|
||||
optional .k8s.io.api.core.v1.NodeSelector suitableNodes = 3;
|
||||
}
|
||||
|
||||
// DeviceConfiguration must have exactly one field set. It gets embedded
|
||||
// inline in some other structs which have other fields, so field names must
|
||||
// not conflict with those.
|
||||
message DeviceConfiguration {
|
||||
// Opaque provides driver-specific configuration parameters.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=ConfigurationType
|
||||
optional OpaqueDeviceConfiguration opaque = 1;
|
||||
}
|
||||
|
||||
// DeviceConstraint must have exactly one field set besides Requests.
|
||||
message DeviceConstraint {
|
||||
// Requests is a list of the one or more requests in this claim which
|
||||
// must co-satisfy this constraint. If a request is fulfilled by
|
||||
// multiple devices, then all of the devices must satisfy the
|
||||
// constraint. If this is not specified, this constraint applies to all
|
||||
// requests in this claim.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated string requests = 1;
|
||||
|
||||
// MatchAttribute requires that all devices in question have this
|
||||
// attribute and that its type and value are the same across those
|
||||
// devices.
|
||||
//
|
||||
// For example, if you specified "dra.example.com/numa" (a hypothetical example!),
|
||||
// then only devices in the same NUMA node will be chosen. A device which
|
||||
// does not have that attribute will not be chosen. All devices should
|
||||
// use a value of the same type for this attribute because that is part of
|
||||
// its specification, but if one device doesn't, then it also will not be
|
||||
// chosen.
|
||||
//
|
||||
// Must include the domain qualifier.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=ConstraintType
|
||||
optional string matchAttribute = 2;
|
||||
}
|
||||
|
||||
// DeviceRequest is a request for devices required for a claim.
|
||||
// This is typically a request for a single resource like a device, but can
|
||||
// also ask for several identical devices.
|
||||
//
|
||||
// A DeviceClassName is currently required. Clients must check that it is
|
||||
// indeed set. It's absence indicates that something changed in a way that
|
||||
// is not supported by the client yet, in which case it must refuse to
|
||||
// handle the request.
|
||||
message DeviceRequest {
|
||||
// Name can be used to reference this request in a pod.spec.containers[].resources.claims
|
||||
// entry and in a constraint of the claim.
|
||||
//
|
||||
// Must be a DNS label.
|
||||
//
|
||||
// +required
|
||||
optional string name = 1;
|
||||
|
||||
// DeviceClassName references a specific DeviceClass, which can define
|
||||
// additional configuration and selectors to be inherited by this
|
||||
// request.
|
||||
//
|
||||
// A class is required. Which classes are available depends on the cluster.
|
||||
//
|
||||
// Administrators may use this to restrict which devices may get
|
||||
// requested by only installing classes with selectors for permitted
|
||||
// devices. If users are free to request anything without restrictions,
|
||||
// then administrators can create an empty DeviceClass for users
|
||||
// to reference.
|
||||
//
|
||||
// +required
|
||||
optional string deviceClassName = 2;
|
||||
|
||||
// Selectors define criteria which must be satisfied by a specific
|
||||
// device in order for that device to be considered for this
|
||||
// request. All selectors must be satisfied for a device to be
|
||||
// considered.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceSelector selectors = 3;
|
||||
|
||||
// AllocationMode and its related fields define how devices are allocated
|
||||
// to satisfy this request. Supported values are:
|
||||
//
|
||||
// - ExactCount: This request is for a specific number of devices.
|
||||
// This is the default. The exact number is provided in the
|
||||
// count field.
|
||||
//
|
||||
// - All: This request is for all of the matching devices in a pool.
|
||||
// Allocation will fail if some devices are already allocated,
|
||||
// unless adminAccess is requested.
|
||||
//
|
||||
// If AlloctionMode is not specified, the default mode is ExactCount. If
|
||||
// the mode is ExactCount and count is not specified, the default count is
|
||||
// one. Any other requests must specify this field.
|
||||
//
|
||||
// More modes may get added in the future. Clients must refuse to handle
|
||||
// requests with unknown modes.
|
||||
//
|
||||
// +optional
|
||||
optional string allocationMode = 4;
|
||||
|
||||
// Count is used only when the count mode is "ExactCount". Must be greater than zero.
|
||||
// If AllocationMode is ExactCount and this field is not specified, the default is one.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=AllocationMode
|
||||
optional int64 count = 5;
|
||||
|
||||
// AdminAccess indicates that this is a claim for administrative access
|
||||
// to the device(s). Claims with AdminAccess are expected to be used for
|
||||
// monitoring or other management services for a device. They ignore
|
||||
// all ordinary claims to the device with respect to access modes and
|
||||
// any resource allocations.
|
||||
//
|
||||
// +optional
|
||||
// +default=false
|
||||
optional bool adminAccess = 6;
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResult contains the allocation result for one request.
|
||||
message DeviceRequestAllocationResult {
|
||||
// Request is the name of the request in the claim which caused this
|
||||
// device to be allocated. Multiple devices may have been allocated
|
||||
// per request.
|
||||
//
|
||||
// +required
|
||||
optional string request = 1;
|
||||
|
||||
// Driver specifies the name of the DRA driver whose kubelet
|
||||
// plugin should be invoked to process the allocation once the claim is
|
||||
// needed on a node.
|
||||
//
|
||||
// Must be a DNS subdomain and should end with a DNS domain owned by the
|
||||
// vendor of the driver.
|
||||
//
|
||||
// +required
|
||||
optional string driver = 2;
|
||||
|
||||
// This name together with the driver name and the device name field
|
||||
// identify which device was allocated (`<driver name>/<pool name>/<device name>`).
|
||||
//
|
||||
// Must not be longer than 253 characters and may contain one or more
|
||||
// DNS sub-domains separated by slashes.
|
||||
//
|
||||
// +required
|
||||
optional string pool = 3;
|
||||
|
||||
// Device references one device instance via its name in the driver's
|
||||
// resource pool. It must be a DNS label.
|
||||
//
|
||||
// +required
|
||||
optional string device = 4;
|
||||
}
|
||||
|
||||
// DeviceSelector must have exactly one field set.
|
||||
message DeviceSelector {
|
||||
// CEL contains a CEL expression for selecting a device.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=SelectorType
|
||||
optional CELDeviceSelector cel = 1;
|
||||
}
|
||||
|
||||
// OpaqueDeviceConfiguration contains configuration parameters for a driver
|
||||
// in a format defined by the driver vendor.
|
||||
message OpaqueDeviceConfiguration {
|
||||
// Driver is used to determine which kubelet plugin needs
|
||||
// to be passed these configuration parameters.
|
||||
//
|
||||
// An admission policy provided by the driver developer could use this
|
||||
// to decide whether it needs to validate them.
|
||||
//
|
||||
// Must be a DNS subdomain and should end with a DNS domain owned by the
|
||||
// vendor of the driver.
|
||||
//
|
||||
// +required
|
||||
optional string driver = 1;
|
||||
|
||||
// Parameters can contain arbitrary data. It is the responsibility of
|
||||
// the driver developer to handle validation and versioning. Typically this
|
||||
// includes self-identification and a version ("kind" + "apiVersion" for
|
||||
// Kubernetes types), with conversion between different versions.
|
||||
//
|
||||
// +required
|
||||
optional .k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 2;
|
||||
}
|
||||
|
||||
// PodSchedulingContext objects hold information that is needed to schedule
|
||||
// a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation
|
||||
// mode.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DRAControlPlaneController
|
||||
// feature gate.
|
||||
message PodSchedulingContext {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec describes where resources for the Pod are needed.
|
||||
optional PodSchedulingContextSpec spec = 2;
|
||||
|
||||
// Status describes where resources for the Pod can be allocated.
|
||||
//
|
||||
// +optional
|
||||
optional PodSchedulingContextStatus status = 3;
|
||||
}
|
||||
|
||||
// PodSchedulingContextList is a collection of Pod scheduling objects.
|
||||
message PodSchedulingContextList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of PodSchedulingContext objects.
|
||||
repeated PodSchedulingContext items = 2;
|
||||
}
|
||||
|
||||
// PodSchedulingContextSpec describes where resources for the Pod are needed.
|
||||
message PodSchedulingContextSpec {
|
||||
// SelectedNode is the node for which allocation of ResourceClaims that
|
||||
// are referenced by the Pod and that use "WaitForFirstConsumer"
|
||||
// allocation is to be attempted.
|
||||
//
|
||||
// +optional
|
||||
optional string selectedNode = 1;
|
||||
|
||||
// PotentialNodes lists nodes where the Pod might be able to run.
|
||||
//
|
||||
// The size of this field is limited to 128. This is large enough for
|
||||
// many clusters. Larger clusters may need more attempts to find a node
|
||||
// that suits all pending resources. This may get increased in the
|
||||
// future, but not reduced.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated string potentialNodes = 2;
|
||||
}
|
||||
|
||||
// PodSchedulingContextStatus describes where resources for the Pod can be allocated.
|
||||
message PodSchedulingContextStatus {
|
||||
// ResourceClaims describes resource availability for each
|
||||
// pod.spec.resourceClaim entry where the corresponding ResourceClaim
|
||||
// uses "WaitForFirstConsumer" allocation mode.
|
||||
//
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +optional
|
||||
repeated ResourceClaimSchedulingStatus resourceClaims = 1;
|
||||
}
|
||||
|
||||
// ResourceClaim describes a request for access to resources in the cluster,
|
||||
// for use by workloads. For example, if a workload needs an accelerator device
|
||||
// with specific properties, this is how that request is expressed. The status
|
||||
// stanza tracks whether this claim has been satisfied and what specific
|
||||
// resources have been allocated.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
message ResourceClaim {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec describes what is being requested and how to configure it.
|
||||
// The spec is immutable.
|
||||
optional ResourceClaimSpec spec = 2;
|
||||
|
||||
// Status describes whether the claim is ready to use and what has been allocated.
|
||||
// +optional
|
||||
optional ResourceClaimStatus status = 3;
|
||||
}
|
||||
|
||||
// ResourceClaimConsumerReference contains enough information to let you
|
||||
// locate the consumer of a ResourceClaim. The user must be a resource in the same
|
||||
// namespace as the ResourceClaim.
|
||||
message ResourceClaimConsumerReference {
|
||||
// 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.
|
||||
// +optional
|
||||
optional string apiGroup = 1;
|
||||
|
||||
// Resource is the type of resource being referenced, for example "pods".
|
||||
// +required
|
||||
optional string resource = 3;
|
||||
|
||||
// Name is the name of resource being referenced.
|
||||
// +required
|
||||
optional string name = 4;
|
||||
|
||||
// UID identifies exactly one incarnation of the resource.
|
||||
// +required
|
||||
optional string uid = 5;
|
||||
}
|
||||
|
||||
// ResourceClaimList is a collection of claims.
|
||||
message ResourceClaimList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of resource claims.
|
||||
repeated ResourceClaim items = 2;
|
||||
}
|
||||
|
||||
// ResourceClaimSchedulingStatus contains information about one particular
|
||||
// ResourceClaim with "WaitForFirstConsumer" allocation mode.
|
||||
message ResourceClaimSchedulingStatus {
|
||||
// Name matches the pod.spec.resourceClaims[*].Name field.
|
||||
//
|
||||
// +required
|
||||
optional string name = 1;
|
||||
|
||||
// UnsuitableNodes lists nodes that the ResourceClaim cannot be
|
||||
// allocated for.
|
||||
//
|
||||
// The size of this field is limited to 128, the same as for
|
||||
// PodSchedulingSpec.PotentialNodes. This may get increased in the
|
||||
// future, but not reduced.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated string unsuitableNodes = 2;
|
||||
}
|
||||
|
||||
// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
|
||||
message ResourceClaimSpec {
|
||||
// Devices defines how to request devices.
|
||||
//
|
||||
// +optional
|
||||
optional DeviceClaim devices = 1;
|
||||
|
||||
// Controller is the name of the DRA driver that is meant
|
||||
// to handle allocation of this claim. If empty, allocation is handled
|
||||
// by the scheduler while scheduling a pod.
|
||||
//
|
||||
// Must be a DNS subdomain and should end with a DNS domain owned by the
|
||||
// vendor of the driver.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRAControlPlaneController
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +featureGate=DRAControlPlaneController
|
||||
optional string controller = 2;
|
||||
}
|
||||
|
||||
// ResourceClaimStatus tracks whether the resource has been allocated and what
|
||||
// the result of that was.
|
||||
message ResourceClaimStatus {
|
||||
// Allocation is set once the claim has been allocated successfully.
|
||||
//
|
||||
// +optional
|
||||
optional AllocationResult allocation = 1;
|
||||
|
||||
// ReservedFor indicates which entities are currently allowed to use
|
||||
// the claim. A Pod which references a ResourceClaim which is not
|
||||
// reserved for that Pod will not be started. A claim that is in
|
||||
// use or might be in use because it has been reserved must not get
|
||||
// deallocated.
|
||||
//
|
||||
// In a cluster with multiple scheduler instances, two pods might get
|
||||
// scheduled concurrently by different schedulers. When they reference
|
||||
// the same ResourceClaim which already has reached its maximum number
|
||||
// of consumers, only one pod can be scheduled.
|
||||
//
|
||||
// Both schedulers try to add their pod to the claim.status.reservedFor
|
||||
// field, but only the update that reaches the API server first gets
|
||||
// stored. The other one fails with an error and the scheduler
|
||||
// which issued it knows that it must put the pod back into the queue,
|
||||
// waiting for the ResourceClaim to become usable again.
|
||||
//
|
||||
// There can be at most 32 such reservations. This may get increased in
|
||||
// the future, but not reduced.
|
||||
//
|
||||
// +optional
|
||||
// +listType=map
|
||||
// +listMapKey=uid
|
||||
// +patchStrategy=merge
|
||||
// +patchMergeKey=uid
|
||||
repeated ResourceClaimConsumerReference reservedFor = 2;
|
||||
|
||||
// Indicates that a claim is to be deallocated. While this is set,
|
||||
// no new consumers may be added to ReservedFor.
|
||||
//
|
||||
// This is only used if the claim needs to be deallocated by a DRA driver.
|
||||
// That driver then must deallocate this claim and reset the field
|
||||
// together with clearing the Allocation field.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRAControlPlaneController
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +featureGate=DRAControlPlaneController
|
||||
optional bool deallocationRequested = 3;
|
||||
}
|
||||
|
||||
// ResourceClaimTemplate is used to produce ResourceClaim objects.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
message ResourceClaimTemplate {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Describes the ResourceClaim that is to be generated.
|
||||
//
|
||||
// This field is immutable. A ResourceClaim will get created by the
|
||||
// control plane for a Pod when needed and then not get updated
|
||||
// anymore.
|
||||
optional ResourceClaimTemplateSpec spec = 2;
|
||||
}
|
||||
|
||||
// ResourceClaimTemplateList is a collection of claim templates.
|
||||
message ResourceClaimTemplateList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of resource claim templates.
|
||||
repeated ResourceClaimTemplate items = 2;
|
||||
}
|
||||
|
||||
// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
|
||||
message ResourceClaimTemplateSpec {
|
||||
// ObjectMeta may contain labels and annotations that will be copied into the PVC
|
||||
// when creating it. No other fields are allowed and will be rejected during
|
||||
// validation.
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec for the ResourceClaim. The entire content is copied unchanged
|
||||
// into the ResourceClaim that gets created from this template. The
|
||||
// same fields as in a ResourceClaim are also valid here.
|
||||
optional ResourceClaimSpec spec = 2;
|
||||
}
|
||||
|
||||
// ResourcePool describes the pool that ResourceSlices belong to.
|
||||
message ResourcePool {
|
||||
// Name is used to identify the pool. For node-local devices, this
|
||||
// is often the node name, but this is not required.
|
||||
//
|
||||
// It must not be longer than 253 characters and must consist of one or more DNS sub-domains
|
||||
// separated by slashes. This field is immutable.
|
||||
//
|
||||
// +required
|
||||
optional string name = 1;
|
||||
|
||||
// Generation tracks the change in a pool over time. Whenever a driver
|
||||
// changes something about one or more of the resources in a pool, it
|
||||
// must change the generation in all ResourceSlices which are part of
|
||||
// that pool. Consumers of ResourceSlices should only consider
|
||||
// resources from the pool with the highest generation number. The
|
||||
// generation may be reset by drivers, which should be fine for
|
||||
// consumers, assuming that all ResourceSlices in a pool are updated to
|
||||
// match or deleted.
|
||||
//
|
||||
// Combined with ResourceSliceCount, this mechanism enables consumers to
|
||||
// detect pools which are comprised of multiple ResourceSlices and are
|
||||
// in an incomplete state.
|
||||
//
|
||||
// +required
|
||||
optional int64 generation = 2;
|
||||
|
||||
// ResourceSliceCount is the total number of ResourceSlices in the pool at this
|
||||
// generation number. Must be greater than zero.
|
||||
//
|
||||
// Consumers can use this to check whether they have seen all ResourceSlices
|
||||
// belonging to the same pool.
|
||||
//
|
||||
// +required
|
||||
optional int64 resourceSliceCount = 3;
|
||||
}
|
||||
|
||||
// ResourceSlice represents one or more resources in a pool of similar resources,
|
||||
// managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many
|
||||
// ResourceSlices comprise a pool is determined by the driver.
|
||||
//
|
||||
// At the moment, the only supported resources are devices with attributes and capacities.
|
||||
// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name.
|
||||
// The ResourceSlice in which a device gets published may change over time. The unique identifier
|
||||
// for a device is the tuple <driver name>, <pool name>, <device name>.
|
||||
//
|
||||
// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number
|
||||
// and updates all ResourceSlices with that new number and new resource definitions. A consumer
|
||||
// must only use ResourceSlices with the highest generation number and ignore all others.
|
||||
//
|
||||
// When allocating all resources in a pool matching certain criteria or when
|
||||
// looking for the best solution among several different alternatives, a
|
||||
// consumer should check the number of ResourceSlices in a pool (included in
|
||||
// each ResourceSlice) to determine whether its view of a pool is complete and
|
||||
// if not, should wait until the driver has completed updating the pool.
|
||||
//
|
||||
// For resources that are not local to a node, the node name is not set. Instead,
|
||||
// the driver may use a node selector to specify where the devices are available.
|
||||
//
|
||||
// This is an alpha type and requires enabling the DynamicResourceAllocation
|
||||
// feature gate.
|
||||
message ResourceSlice {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Contains the information published by the driver.
|
||||
//
|
||||
// Changing the spec automatically increments the metadata.generation number.
|
||||
optional ResourceSliceSpec spec = 2;
|
||||
}
|
||||
|
||||
// ResourceSliceList is a collection of ResourceSlices.
|
||||
message ResourceSliceList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta listMeta = 1;
|
||||
|
||||
// Items is the list of resource ResourceSlices.
|
||||
repeated ResourceSlice items = 2;
|
||||
}
|
||||
|
||||
// ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
|
||||
message ResourceSliceSpec {
|
||||
// Driver identifies the DRA driver providing the capacity information.
|
||||
// A field selector can be used to list only ResourceSlice
|
||||
// objects with a certain driver name.
|
||||
//
|
||||
// Must be a DNS subdomain and should end with a DNS domain owned by the
|
||||
// vendor of the driver. This field is immutable.
|
||||
//
|
||||
// +required
|
||||
optional string driver = 1;
|
||||
|
||||
// Pool describes the pool that this ResourceSlice belongs to.
|
||||
//
|
||||
// +required
|
||||
optional ResourcePool pool = 2;
|
||||
|
||||
// NodeName identifies the node which provides the resources in this pool.
|
||||
// A field selector can be used to list only ResourceSlice
|
||||
// objects belonging to a certain node.
|
||||
//
|
||||
// This field can be used to limit access from nodes to ResourceSlices with
|
||||
// the same node name. It also indicates to autoscalers that adding
|
||||
// new nodes of the same type as some old node might also make new
|
||||
// resources available.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector and AllNodes must be set.
|
||||
// This field is immutable.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=NodeSelection
|
||||
optional string nodeName = 3;
|
||||
|
||||
// NodeSelector defines which nodes have access to the resources in the pool,
|
||||
// when that pool is not limited to a single node.
|
||||
//
|
||||
// Must use exactly one term.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector and AllNodes must be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=NodeSelection
|
||||
optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 4;
|
||||
|
||||
// AllNodes indicates that all nodes have access to the resources in the pool.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector and AllNodes must be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=NodeSelection
|
||||
optional bool allNodes = 5;
|
||||
|
||||
// Devices lists some or all of the devices in this pool.
|
||||
//
|
||||
// Must not have more than 128 entries.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated Device devices = 6;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha2
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@ -26,7 +26,7 @@ import (
|
||||
const GroupName = "resource.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha3"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
@ -44,8 +44,8 @@ var (
|
||||
// Adds the list of known types to the given scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&ResourceClass{},
|
||||
&ResourceClassList{},
|
||||
&DeviceClass{},
|
||||
&DeviceClassList{},
|
||||
&ResourceClaim{},
|
||||
&ResourceClaimList{},
|
||||
&ResourceClaimTemplate{},
|
||||
@ -54,15 +54,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&PodSchedulingContextList{},
|
||||
&ResourceSlice{},
|
||||
&ResourceSliceList{},
|
||||
&ResourceClaimParameters{},
|
||||
&ResourceClaimParametersList{},
|
||||
&ResourceClassParameters{},
|
||||
&ResourceClassParametersList{},
|
||||
)
|
||||
|
||||
// Add common types
|
||||
scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{})
|
||||
|
||||
// Add the watch version that applies
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
1048
vendor/k8s.io/api/resource/v1alpha3/types.go
generated
vendored
Normal file
1048
vendor/k8s.io/api/resource/v1alpha3/types.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
404
vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go
generated
vendored
Normal file
404
vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go
generated
vendored
Normal file
@ -0,0 +1,404 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
package v1alpha3
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-codegen.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_AllocationResult = map[string]string{
|
||||
"": "AllocationResult contains attributes of an allocated resource.",
|
||||
"devices": "Devices is the result of allocating devices.",
|
||||
"nodeSelector": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.",
|
||||
"controller": "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.",
|
||||
}
|
||||
|
||||
func (AllocationResult) SwaggerDoc() map[string]string {
|
||||
return map_AllocationResult
|
||||
}
|
||||
|
||||
var map_BasicDevice = map[string]string{
|
||||
"": "BasicDevice defines one device instance.",
|
||||
"attributes": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"capacity": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
}
|
||||
|
||||
func (BasicDevice) SwaggerDoc() map[string]string {
|
||||
return map_BasicDevice
|
||||
}
|
||||
|
||||
var map_CELDeviceSelector = map[string]string{
|
||||
"": "CELDeviceSelector contains a CEL expression for selecting a device.",
|
||||
"expression": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)",
|
||||
}
|
||||
|
||||
func (CELDeviceSelector) SwaggerDoc() map[string]string {
|
||||
return map_CELDeviceSelector
|
||||
}
|
||||
|
||||
var map_Device = map[string]string{
|
||||
"": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.",
|
||||
"name": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.",
|
||||
"basic": "Basic defines one device instance.",
|
||||
}
|
||||
|
||||
func (Device) SwaggerDoc() map[string]string {
|
||||
return map_Device
|
||||
}
|
||||
|
||||
var map_DeviceAllocationConfiguration = map[string]string{
|
||||
"": "DeviceAllocationConfiguration gets embedded in an AllocationResult.",
|
||||
"source": "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.",
|
||||
"requests": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.",
|
||||
}
|
||||
|
||||
func (DeviceAllocationConfiguration) SwaggerDoc() map[string]string {
|
||||
return map_DeviceAllocationConfiguration
|
||||
}
|
||||
|
||||
var map_DeviceAllocationResult = map[string]string{
|
||||
"": "DeviceAllocationResult is the result of allocating devices.",
|
||||
"results": "Results lists all allocated devices.",
|
||||
"config": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.",
|
||||
}
|
||||
|
||||
func (DeviceAllocationResult) SwaggerDoc() map[string]string {
|
||||
return map_DeviceAllocationResult
|
||||
}
|
||||
|
||||
var map_DeviceAttribute = map[string]string{
|
||||
"": "DeviceAttribute must have exactly one field set.",
|
||||
"int": "IntValue is a number.",
|
||||
"bool": "BoolValue is a true/false value.",
|
||||
"string": "StringValue is a string. Must not be longer than 64 characters.",
|
||||
"version": "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.",
|
||||
}
|
||||
|
||||
func (DeviceAttribute) SwaggerDoc() map[string]string {
|
||||
return map_DeviceAttribute
|
||||
}
|
||||
|
||||
var map_DeviceClaim = map[string]string{
|
||||
"": "DeviceClaim defines how to request devices with a ResourceClaim.",
|
||||
"requests": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.",
|
||||
"constraints": "These constraints must be satisfied by the set of devices that get allocated for the claim.",
|
||||
"config": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.",
|
||||
}
|
||||
|
||||
func (DeviceClaim) SwaggerDoc() map[string]string {
|
||||
return map_DeviceClaim
|
||||
}
|
||||
|
||||
var map_DeviceClaimConfiguration = map[string]string{
|
||||
"": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.",
|
||||
"requests": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.",
|
||||
}
|
||||
|
||||
func (DeviceClaimConfiguration) SwaggerDoc() map[string]string {
|
||||
return map_DeviceClaimConfiguration
|
||||
}
|
||||
|
||||
var map_DeviceClass = map[string]string{
|
||||
"": "DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
|
||||
"metadata": "Standard object metadata",
|
||||
"spec": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number.",
|
||||
}
|
||||
|
||||
func (DeviceClass) SwaggerDoc() map[string]string {
|
||||
return map_DeviceClass
|
||||
}
|
||||
|
||||
var map_DeviceClassConfiguration = map[string]string{
|
||||
"": "DeviceClassConfiguration is used in DeviceClass.",
|
||||
}
|
||||
|
||||
func (DeviceClassConfiguration) SwaggerDoc() map[string]string {
|
||||
return map_DeviceClassConfiguration
|
||||
}
|
||||
|
||||
var map_DeviceClassList = map[string]string{
|
||||
"": "DeviceClassList is a collection of classes.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of resource classes.",
|
||||
}
|
||||
|
||||
func (DeviceClassList) SwaggerDoc() map[string]string {
|
||||
return map_DeviceClassList
|
||||
}
|
||||
|
||||
var map_DeviceClassSpec = map[string]string{
|
||||
"": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.",
|
||||
"selectors": "Each selector must be satisfied by a device which is claimed via this class.",
|
||||
"config": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.",
|
||||
"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 claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.\n\nSetting this field is optional. If unset, all Nodes are candidates.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceClassSpec) SwaggerDoc() map[string]string {
|
||||
return map_DeviceClassSpec
|
||||
}
|
||||
|
||||
var map_DeviceConfiguration = map[string]string{
|
||||
"": "DeviceConfiguration must have exactly one field set. It gets embedded inline in some other structs which have other fields, so field names must not conflict with those.",
|
||||
"opaque": "Opaque provides driver-specific configuration parameters.",
|
||||
}
|
||||
|
||||
func (DeviceConfiguration) SwaggerDoc() map[string]string {
|
||||
return map_DeviceConfiguration
|
||||
}
|
||||
|
||||
var map_DeviceConstraint = map[string]string{
|
||||
"": "DeviceConstraint must have exactly one field set besides Requests.",
|
||||
"requests": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.",
|
||||
"matchAttribute": "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.",
|
||||
}
|
||||
|
||||
func (DeviceConstraint) SwaggerDoc() map[string]string {
|
||||
return map_DeviceConstraint
|
||||
}
|
||||
|
||||
var map_DeviceRequest = map[string]string{
|
||||
"": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.",
|
||||
"name": "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nMust be a DNS label.",
|
||||
"deviceClassName": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.",
|
||||
"selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.",
|
||||
"allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.",
|
||||
"count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.",
|
||||
"adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.",
|
||||
}
|
||||
|
||||
func (DeviceRequest) SwaggerDoc() map[string]string {
|
||||
return map_DeviceRequest
|
||||
}
|
||||
|
||||
var map_DeviceRequestAllocationResult = map[string]string{
|
||||
"": "DeviceRequestAllocationResult contains the allocation result for one request.",
|
||||
"request": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.",
|
||||
"driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
|
||||
"pool": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
|
||||
"device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
|
||||
}
|
||||
|
||||
func (DeviceRequestAllocationResult) SwaggerDoc() map[string]string {
|
||||
return map_DeviceRequestAllocationResult
|
||||
}
|
||||
|
||||
var map_DeviceSelector = map[string]string{
|
||||
"": "DeviceSelector must have exactly one field set.",
|
||||
"cel": "CEL contains a CEL expression for selecting a device.",
|
||||
}
|
||||
|
||||
func (DeviceSelector) SwaggerDoc() map[string]string {
|
||||
return map_DeviceSelector
|
||||
}
|
||||
|
||||
var map_OpaqueDeviceConfiguration = map[string]string{
|
||||
"": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.",
|
||||
"driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
|
||||
"parameters": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.",
|
||||
}
|
||||
|
||||
func (OpaqueDeviceConfiguration) SwaggerDoc() map[string]string {
|
||||
return map_OpaqueDeviceConfiguration
|
||||
}
|
||||
|
||||
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 DRAControlPlaneController feature gate.",
|
||||
"metadata": "Standard object metadata",
|
||||
"spec": "Spec describes where resources for the Pod are needed.",
|
||||
"status": "Status describes where resources for the Pod can be allocated.",
|
||||
}
|
||||
|
||||
func (PodSchedulingContext) SwaggerDoc() map[string]string {
|
||||
return map_PodSchedulingContext
|
||||
}
|
||||
|
||||
var map_PodSchedulingContextList = map[string]string{
|
||||
"": "PodSchedulingContextList is a collection of Pod scheduling objects.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of PodSchedulingContext objects.",
|
||||
}
|
||||
|
||||
func (PodSchedulingContextList) SwaggerDoc() map[string]string {
|
||||
return map_PodSchedulingContextList
|
||||
}
|
||||
|
||||
var map_PodSchedulingContextSpec = map[string]string{
|
||||
"": "PodSchedulingContextSpec describes where resources for the Pod are needed.",
|
||||
"selectedNode": "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.",
|
||||
"potentialNodes": "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.",
|
||||
}
|
||||
|
||||
func (PodSchedulingContextSpec) SwaggerDoc() map[string]string {
|
||||
return map_PodSchedulingContextSpec
|
||||
}
|
||||
|
||||
var map_PodSchedulingContextStatus = map[string]string{
|
||||
"": "PodSchedulingContextStatus describes where resources for the Pod can be allocated.",
|
||||
"resourceClaims": "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.",
|
||||
}
|
||||
|
||||
func (PodSchedulingContextStatus) SwaggerDoc() map[string]string {
|
||||
return map_PodSchedulingContextStatus
|
||||
}
|
||||
|
||||
var map_ResourceClaim = map[string]string{
|
||||
"": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
|
||||
"metadata": "Standard object metadata",
|
||||
"spec": "Spec describes what is being requested and how to configure it. The spec is immutable.",
|
||||
"status": "Status describes whether the claim is ready to use and what has been allocated.",
|
||||
}
|
||||
|
||||
func (ResourceClaim) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaim
|
||||
}
|
||||
|
||||
var map_ResourceClaimConsumerReference = map[string]string{
|
||||
"": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource 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.",
|
||||
"resource": "Resource is the type of resource being referenced, for example \"pods\".",
|
||||
"name": "Name is the name of resource being referenced.",
|
||||
"uid": "UID identifies exactly one incarnation of the resource.",
|
||||
}
|
||||
|
||||
func (ResourceClaimConsumerReference) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimConsumerReference
|
||||
}
|
||||
|
||||
var map_ResourceClaimList = map[string]string{
|
||||
"": "ResourceClaimList is a collection of claims.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of resource claims.",
|
||||
}
|
||||
|
||||
func (ResourceClaimList) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimList
|
||||
}
|
||||
|
||||
var map_ResourceClaimSchedulingStatus = map[string]string{
|
||||
"": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.",
|
||||
"name": "Name matches the pod.spec.resourceClaims[*].Name field.",
|
||||
"unsuitableNodes": "UnsuitableNodes lists nodes that the ResourceClaim cannot be allocated for.\n\nThe size of this field is limited to 128, the same as for PodSchedulingSpec.PotentialNodes. This may get increased in the future, but not reduced.",
|
||||
}
|
||||
|
||||
func (ResourceClaimSchedulingStatus) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimSchedulingStatus
|
||||
}
|
||||
|
||||
var map_ResourceClaimSpec = map[string]string{
|
||||
"": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.",
|
||||
"devices": "Devices defines how to request devices.",
|
||||
"controller": "Controller is the name of the DRA driver that is meant to handle allocation of this claim. If empty, allocation is handled by the scheduler while scheduling a pod.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.",
|
||||
}
|
||||
|
||||
func (ResourceClaimSpec) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimSpec
|
||||
}
|
||||
|
||||
var map_ResourceClaimStatus = map[string]string{
|
||||
"": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.",
|
||||
"allocation": "Allocation is set once the claim has been allocated successfully.",
|
||||
"reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.",
|
||||
"deallocationRequested": "Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.\n\nThis is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.",
|
||||
}
|
||||
|
||||
func (ResourceClaimStatus) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimStatus
|
||||
}
|
||||
|
||||
var map_ResourceClaimTemplate = map[string]string{
|
||||
"": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
|
||||
"metadata": "Standard object metadata",
|
||||
"spec": "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.",
|
||||
}
|
||||
|
||||
func (ResourceClaimTemplate) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimTemplate
|
||||
}
|
||||
|
||||
var map_ResourceClaimTemplateList = map[string]string{
|
||||
"": "ResourceClaimTemplateList is a collection of claim templates.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of resource claim templates.",
|
||||
}
|
||||
|
||||
func (ResourceClaimTemplateList) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimTemplateList
|
||||
}
|
||||
|
||||
var map_ResourceClaimTemplateSpec = map[string]string{
|
||||
"": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.",
|
||||
"metadata": "ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.",
|
||||
"spec": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.",
|
||||
}
|
||||
|
||||
func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string {
|
||||
return map_ResourceClaimTemplateSpec
|
||||
}
|
||||
|
||||
var map_ResourcePool = map[string]string{
|
||||
"": "ResourcePool describes the pool that ResourceSlices belong to.",
|
||||
"name": "Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.\n\nIt must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.",
|
||||
"generation": "Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.\n\nCombined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.",
|
||||
"resourceSliceCount": "ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.\n\nConsumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.",
|
||||
}
|
||||
|
||||
func (ResourcePool) SwaggerDoc() map[string]string {
|
||||
return map_ResourcePool
|
||||
}
|
||||
|
||||
var map_ResourceSlice = map[string]string{
|
||||
"": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>.\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
|
||||
"metadata": "Standard object metadata",
|
||||
"spec": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number.",
|
||||
}
|
||||
|
||||
func (ResourceSlice) SwaggerDoc() map[string]string {
|
||||
return map_ResourceSlice
|
||||
}
|
||||
|
||||
var map_ResourceSliceList = map[string]string{
|
||||
"": "ResourceSliceList is a collection of ResourceSlices.",
|
||||
"listMeta": "Standard list metadata",
|
||||
"items": "Items is the list of resource ResourceSlices.",
|
||||
}
|
||||
|
||||
func (ResourceSliceList) SwaggerDoc() map[string]string {
|
||||
return map_ResourceSliceList
|
||||
}
|
||||
|
||||
var map_ResourceSliceSpec = map[string]string{
|
||||
"": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.",
|
||||
"driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.",
|
||||
"pool": "Pool describes the pool that this ResourceSlice belongs to.",
|
||||
"nodeName": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.",
|
||||
"nodeSelector": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.",
|
||||
"allNodes": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.",
|
||||
"devices": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.",
|
||||
}
|
||||
|
||||
func (ResourceSliceSpec) SwaggerDoc() map[string]string {
|
||||
return map_ResourceSliceSpec
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user