Documentation ¶
Overview ¶
Package resource contains the latest (or "internal") version of the Kubernetes resource API objects.
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type AllocationConfigSource
- type AllocationResult
- type BasicDevice
- type CELDeviceSelector
- type Device
- type DeviceAllocationConfiguration
- type DeviceAllocationMode
- type DeviceAllocationResult
- type DeviceAttribute
- type DeviceClaim
- type DeviceClaimConfiguration
- type DeviceClass
- type DeviceClassConfiguration
- type DeviceClassList
- type DeviceClassSpec
- type DeviceConfiguration
- type DeviceConstraint
- type DeviceRequest
- type DeviceRequestAllocationResult
- type DeviceSelector
- type FullyQualifiedName
- type OpaqueDeviceConfiguration
- type PodSchedulingContext
- type PodSchedulingContextList
- type PodSchedulingContextSpec
- type PodSchedulingContextStatus
- type QualifiedName
- type ResourceClaim
- type ResourceClaimConsumerReference
- type ResourceClaimList
- type ResourceClaimSchedulingStatus
- type ResourceClaimSpec
- type ResourceClaimStatus
- type ResourceClaimTemplate
- type ResourceClaimTemplateList
- type ResourceClaimTemplateSpec
- type ResourcePool
- type ResourceSlice
- type ResourceSliceList
- type ResourceSliceSpec
Constants ¶
const ( // ResourceSliceSelectorNodeName can be used in a [metav1.ListOptions] // field selector to filter based on [ResourceSliceSpec.NodeName]. ResourceSliceSelectorNodeName = "spec.nodeName" // ResourceSliceSelectorDriver can be used in a [metav1.ListOptions] // field selector to filter based on [ResourceSliceSpec.Driver]. ResourceSliceSelectorDriver = "spec.driver" )
const ( DeviceRequestsMaxSize = AllocationResultsMaxSize DeviceConstraintsMaxSize = 32 DeviceConfigMaxSize = 32 )
const ( DeviceAllocationModeExactCount = DeviceAllocationMode("ExactCount") DeviceAllocationModeAll = DeviceAllocationMode("All") )
Valid [DeviceRequest.CountMode] values.
const ( AllocationConfigSourceClass = "FromClass" AllocationConfigSourceClaim = "FromClaim" )
Valid [DeviceAllocationConfiguration.Source] values.
const AllocationResultsMaxSize = 32
AllocationResultsMaxSize represents the maximum number of entries in allocation.devices.results.
const DeviceAttributeMaxValueLength = 64
DeviceAttributeMaxValueLength is the maximum length of a string or version attribute value.
const DeviceMaxIDLength = 32
DeviceMaxIDLength is the maximum length of the identifier in a device attribute or capacity name (`<domain>/<ID>`).
const (
DeviceSelectorsMaxSize = 32
)
const ( // Finalizer is the finalizer that gets set for claims // which were allocated through a builtin controller. // Reserved for use by Kubernetes, DRA driver controllers must // use their own finalizer. Finalizer = "resource.kubernetes.io/delete-protection" )
const GroupName = "resource.k8s.io"
GroupName is the group name use in this package
const PodSchedulingNodeListMaxSize = 128
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 PoolNameMaxLength = validation.DNS1123SubdomainMaxLength // Same as for a single node name.
const ResourceClaimReservedForMaxSize = 32
ReservedForMaxSize is the maximum number of entries in claim.status.reservedFor.
const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32
Limit for the sum of the number of entries in both ResourceSlices.
const ResourceSliceMaxDevices = 128
Variables ¶
var ( // SchemeBuilder object to register various known types SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme represents a func that can be used to apply all the registered // funcs in a scheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AllocationConfigSource ¶ added in v1.31.0
type AllocationConfigSource string
type AllocationResult ¶
type AllocationResult struct { // Devices is the result of allocating devices. // // +optional Devices DeviceAllocationResult // NodeSelector defines where the allocated resources are available. If // unset, they are available everywhere. // // +optional NodeSelector *core.NodeSelector // 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 Controller string }
AllocationResult contains attributes of an allocated resource.
func (*AllocationResult) DeepCopy ¶
func (in *AllocationResult) DeepCopy() *AllocationResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResult.
func (*AllocationResult) DeepCopyInto ¶
func (in *AllocationResult) DeepCopyInto(out *AllocationResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BasicDevice ¶ added in v1.31.0
type BasicDevice struct { // 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 Attributes map[QualifiedName]DeviceAttribute // 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 Capacity map[QualifiedName]resource.Quantity }
BasicDevice defines one device instance.
func (*BasicDevice) DeepCopy ¶ added in v1.31.0
func (in *BasicDevice) DeepCopy() *BasicDevice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicDevice.
func (*BasicDevice) DeepCopyInto ¶ added in v1.31.0
func (in *BasicDevice) DeepCopyInto(out *BasicDevice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CELDeviceSelector ¶ added in v1.31.0
type CELDeviceSelector struct { // 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 Expression string }
CELDeviceSelector contains a CEL expression for selecting a device.
func (*CELDeviceSelector) DeepCopy ¶ added in v1.31.0
func (in *CELDeviceSelector) DeepCopy() *CELDeviceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CELDeviceSelector.
func (*CELDeviceSelector) DeepCopyInto ¶ added in v1.31.0
func (in *CELDeviceSelector) DeepCopyInto(out *CELDeviceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Device ¶ added in v1.31.0
type Device struct { // Name is unique identifier among all devices managed by // the driver in the pool. It must be a DNS label. // // +required Name string // Basic defines one device instance. // // +optional // +oneOf=deviceType Basic *BasicDevice }
Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.
func (*Device) DeepCopy ¶ added in v1.31.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device.
func (*Device) DeepCopyInto ¶ added in v1.31.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceAllocationConfiguration ¶ added in v1.31.0
type DeviceAllocationConfiguration struct { // 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 Source AllocationConfigSource // Requests lists the names of requests where the configuration applies. // If empty, its applies to all requests. // // +optional // +listType=atomic Requests []string DeviceConfiguration // inline }
DeviceAllocationConfiguration gets embedded in an AllocationResult.
func (*DeviceAllocationConfiguration) DeepCopy ¶ added in v1.31.0
func (in *DeviceAllocationConfiguration) DeepCopy() *DeviceAllocationConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationConfiguration.
func (*DeviceAllocationConfiguration) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceAllocationConfiguration) DeepCopyInto(out *DeviceAllocationConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceAllocationMode ¶ added in v1.31.0
type DeviceAllocationMode string
type DeviceAllocationResult ¶ added in v1.31.0
type DeviceAllocationResult struct { // Results lists all allocated devices. // // +optional // +listType=atomic Results []DeviceRequestAllocationResult // 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 Config []DeviceAllocationConfiguration }
DeviceAllocationResult is the result of allocating devices.
func (*DeviceAllocationResult) DeepCopy ¶ added in v1.31.0
func (in *DeviceAllocationResult) DeepCopy() *DeviceAllocationResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationResult.
func (*DeviceAllocationResult) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceAllocationResult) DeepCopyInto(out *DeviceAllocationResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceAttribute ¶ added in v1.31.0
type DeviceAttribute struct { // IntValue is a number. // // +optional // +oneOf=ValueType IntValue *int64 // BoolValue is a true/false value. // // +optional // +oneOf=ValueType BoolValue *bool // StringValue is a string. Must not be longer than 64 characters. // // +optional // +oneOf=ValueType StringValue *string // VersionValue is a semantic version according to semver.org spec 2.0.0. // Must not be longer than 64 characters. // // +optional // +oneOf=ValueType VersionValue *string }
DeviceAttribute must have exactly one field set.
func (*DeviceAttribute) DeepCopy ¶ added in v1.31.0
func (in *DeviceAttribute) DeepCopy() *DeviceAttribute
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAttribute.
func (*DeviceAttribute) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceAttribute) DeepCopyInto(out *DeviceAttribute)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceClaim ¶ added in v1.31.0
type DeviceClaim struct { // Requests represent individual requests for distinct devices which // must all be satisfied. If empty, nothing needs to be allocated. // // +optional // +listType=atomic Requests []DeviceRequest // These constraints must be satisfied by the set of devices that get // allocated for the claim. // // +optional // +listType=atomic Constraints []DeviceConstraint // 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 Config []DeviceClaimConfiguration }
DeviceClaim defines how to request devices with a ResourceClaim.
func (*DeviceClaim) DeepCopy ¶ added in v1.31.0
func (in *DeviceClaim) DeepCopy() *DeviceClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaim.
func (*DeviceClaim) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceClaimConfiguration ¶ added in v1.31.0
type DeviceClaimConfiguration struct { // Requests lists the names of requests where the configuration applies. // If empty, it applies to all requests. // // +optional // +listType=atomic Requests []string DeviceConfiguration // inline }
DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
func (*DeviceClaimConfiguration) DeepCopy ¶ added in v1.31.0
func (in *DeviceClaimConfiguration) DeepCopy() *DeviceClaimConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaimConfiguration.
func (*DeviceClaimConfiguration) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceClaimConfiguration) DeepCopyInto(out *DeviceClaimConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceClass ¶ added in v1.31.0
type DeviceClass struct { metav1.TypeMeta // Standard object metadata // +optional metav1.ObjectMeta // 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. Spec DeviceClassSpec }
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.
func (*DeviceClass) DeepCopy ¶ added in v1.31.0
func (in *DeviceClass) DeepCopy() *DeviceClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClass.
func (*DeviceClass) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceClass) DeepCopyInto(out *DeviceClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeviceClass) DeepCopyObject ¶ added in v1.31.0
func (in *DeviceClass) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeviceClassConfiguration ¶ added in v1.31.0
type DeviceClassConfiguration struct {
DeviceConfiguration // inline
}
DeviceClassConfiguration is used in DeviceClass.
func (*DeviceClassConfiguration) DeepCopy ¶ added in v1.31.0
func (in *DeviceClassConfiguration) DeepCopy() *DeviceClassConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassConfiguration.
func (*DeviceClassConfiguration) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceClassConfiguration) DeepCopyInto(out *DeviceClassConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceClassList ¶ added in v1.31.0
type DeviceClassList struct { metav1.TypeMeta // Standard list metadata // +optional metav1.ListMeta // Items is the list of resource classes. Items []DeviceClass }
DeviceClassList is a collection of classes.
func (*DeviceClassList) DeepCopy ¶ added in v1.31.0
func (in *DeviceClassList) DeepCopy() *DeviceClassList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassList.
func (*DeviceClassList) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceClassList) DeepCopyInto(out *DeviceClassList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeviceClassList) DeepCopyObject ¶ added in v1.31.0
func (in *DeviceClassList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeviceClassSpec ¶ added in v1.31.0
type DeviceClassSpec struct { // Each selector must be satisfied by a device which is claimed via this class. // // +optional // +listType=atomic Selectors []DeviceSelector // 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 Config []DeviceClassConfiguration // 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 SuitableNodes *core.NodeSelector }
DeviceClassSpec is used in a DeviceClass to define what can be allocated and how to configure it.
func (*DeviceClassSpec) DeepCopy ¶ added in v1.31.0
func (in *DeviceClassSpec) DeepCopy() *DeviceClassSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassSpec.
func (*DeviceClassSpec) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceClassSpec) DeepCopyInto(out *DeviceClassSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceConfiguration ¶ added in v1.31.0
type DeviceConfiguration struct { // Opaque provides driver-specific configuration parameters. // // +optional // +oneOf=ConfigurationType Opaque *OpaqueDeviceConfiguration }
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.
func (*DeviceConfiguration) DeepCopy ¶ added in v1.31.0
func (in *DeviceConfiguration) DeepCopy() *DeviceConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConfiguration.
func (*DeviceConfiguration) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceConfiguration) DeepCopyInto(out *DeviceConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceConstraint ¶ added in v1.31.0
type DeviceConstraint struct { // 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 Requests []string // 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 MatchAttribute *FullyQualifiedName }
DeviceConstraint must have exactly one field set besides Requests.
func (*DeviceConstraint) DeepCopy ¶ added in v1.31.0
func (in *DeviceConstraint) DeepCopy() *DeviceConstraint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConstraint.
func (*DeviceConstraint) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceConstraint) DeepCopyInto(out *DeviceConstraint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceRequest ¶ added in v1.31.0
type DeviceRequest struct { // 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 Name string // 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 DeviceClassName string // 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 Selectors []DeviceSelector // 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 AllocationMode DeviceAllocationMode // 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 Count int64 // 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 AdminAccess bool }
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.
func (*DeviceRequest) DeepCopy ¶ added in v1.31.0
func (in *DeviceRequest) DeepCopy() *DeviceRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequest.
func (*DeviceRequest) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceRequestAllocationResult ¶ added in v1.31.0
type DeviceRequestAllocationResult struct { // 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 Request string // 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 Driver string // 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 Pool string // Device references one device instance via its name in the driver's // resource pool. It must be a DNS label. // // +required Device string }
DeviceRequestAllocationResult contains the allocation result for one request.
func (*DeviceRequestAllocationResult) DeepCopy ¶ added in v1.31.0
func (in *DeviceRequestAllocationResult) DeepCopy() *DeviceRequestAllocationResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequestAllocationResult.
func (*DeviceRequestAllocationResult) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocationResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceSelector ¶ added in v1.31.0
type DeviceSelector struct { // CEL contains a CEL expression for selecting a device. // // +optional // +oneOf=SelectorType CEL *CELDeviceSelector }
DeviceSelector must have exactly one field set.
func (*DeviceSelector) DeepCopy ¶ added in v1.31.0
func (in *DeviceSelector) DeepCopy() *DeviceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSelector.
func (*DeviceSelector) DeepCopyInto ¶ added in v1.31.0
func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FullyQualifiedName ¶ added in v1.31.0
type FullyQualifiedName string
FullyQualifiedName is a QualifiedName where the domain is set.
type OpaqueDeviceConfiguration ¶ added in v1.31.0
type OpaqueDeviceConfiguration struct { // 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 Driver string // 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 Parameters runtime.RawExtension }
OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.
func (*OpaqueDeviceConfiguration) DeepCopy ¶ added in v1.31.0
func (in *OpaqueDeviceConfiguration) DeepCopy() *OpaqueDeviceConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpaqueDeviceConfiguration.
func (*OpaqueDeviceConfiguration) DeepCopyInto ¶ added in v1.31.0
func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSchedulingContext ¶ added in v1.27.0
type PodSchedulingContext struct { metav1.TypeMeta // Standard object metadata // +optional metav1.ObjectMeta // Spec describes where resources for the Pod are needed. Spec PodSchedulingContextSpec // Status describes where resources for the Pod can be allocated. // // +optional Status PodSchedulingContextStatus }
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.
func (*PodSchedulingContext) DeepCopy ¶ added in v1.27.0
func (in *PodSchedulingContext) DeepCopy() *PodSchedulingContext
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingContext.
func (*PodSchedulingContext) DeepCopyInto ¶ added in v1.27.0
func (in *PodSchedulingContext) DeepCopyInto(out *PodSchedulingContext)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodSchedulingContext) DeepCopyObject ¶ added in v1.27.0
func (in *PodSchedulingContext) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodSchedulingContextList ¶ added in v1.27.0
type PodSchedulingContextList struct { metav1.TypeMeta // Standard list metadata // +optional metav1.ListMeta // Items is the list of PodSchedulingContext objects. Items []PodSchedulingContext }
PodSchedulingContextList is a collection of Pod scheduling objects.
func (*PodSchedulingContextList) DeepCopy ¶ added in v1.27.0
func (in *PodSchedulingContextList) DeepCopy() *PodSchedulingContextList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingContextList.
func (*PodSchedulingContextList) DeepCopyInto ¶ added in v1.27.0
func (in *PodSchedulingContextList) DeepCopyInto(out *PodSchedulingContextList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodSchedulingContextList) DeepCopyObject ¶ added in v1.27.0
func (in *PodSchedulingContextList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodSchedulingContextSpec ¶ added in v1.27.0
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 // 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 PotentialNodes []string }
PodSchedulingContextSpec describes where resources for the Pod are needed.
func (*PodSchedulingContextSpec) DeepCopy ¶ added in v1.27.0
func (in *PodSchedulingContextSpec) DeepCopy() *PodSchedulingContextSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingContextSpec.
func (*PodSchedulingContextSpec) DeepCopyInto ¶ added in v1.27.0
func (in *PodSchedulingContextSpec) DeepCopyInto(out *PodSchedulingContextSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSchedulingContextStatus ¶ added in v1.27.0
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 }
PodSchedulingContextStatus describes where resources for the Pod can be allocated.
func (*PodSchedulingContextStatus) DeepCopy ¶ added in v1.27.0
func (in *PodSchedulingContextStatus) DeepCopy() *PodSchedulingContextStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingContextStatus.
func (*PodSchedulingContextStatus) DeepCopyInto ¶ added in v1.27.0
func (in *PodSchedulingContextStatus) DeepCopyInto(out *PodSchedulingContextStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QualifiedName ¶ added in v1.31.0
type QualifiedName string
QualifiedName is the name of a device attribute or capacity.
Attributes and capacities are defined either by the owner of the specific driver (usually the vendor) or by some 3rd party (e.g. the Kubernetes project). Because they are sometimes compared across devices, a given name is expected to mean the same thing and have the same type on all devices.
Names must be either a C identifier (e.g. "theName") or a DNS subdomain followed by a slash ("/") followed by a C identifier (e.g. "dra.example.com/theName"). Names which do not include the domain prefix are assumed to be part of the driver's domain. Attributes or capacities defined by 3rd parties must include the domain prefix.
The maximum length for the DNS subdomain is 63 characters (same as for driver names) and the maximum length of the C identifier is 32.
type ResourceClaim ¶
type ResourceClaim struct { metav1.TypeMeta // Standard object metadata // +optional metav1.ObjectMeta // Spec describes what is being requested and how to configure it. // The spec is immutable. Spec ResourceClaimSpec // Status describes whether the claim is ready to use and what has been allocated. // +optional Status ResourceClaimStatus }
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.
func (*ResourceClaim) DeepCopy ¶
func (in *ResourceClaim) DeepCopy() *ResourceClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaim.
func (*ResourceClaim) DeepCopyInto ¶
func (in *ResourceClaim) DeepCopyInto(out *ResourceClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceClaim) DeepCopyObject ¶
func (in *ResourceClaim) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceClaimConsumerReference ¶
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 // Resource is the type of resource being referenced, for example "pods". // +required Resource string // Name is the name of resource being referenced. // +required Name string // UID identifies exactly one incarnation of the resource. // +required UID types.UID }
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.
func (*ResourceClaimConsumerReference) DeepCopy ¶
func (in *ResourceClaimConsumerReference) DeepCopy() *ResourceClaimConsumerReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimConsumerReference.
func (*ResourceClaimConsumerReference) DeepCopyInto ¶
func (in *ResourceClaimConsumerReference) DeepCopyInto(out *ResourceClaimConsumerReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceClaimList ¶
type ResourceClaimList struct { metav1.TypeMeta // Standard list metadata // +optional metav1.ListMeta // Items is the list of resource claims. Items []ResourceClaim }
ResourceClaimList is a collection of claims.
func (*ResourceClaimList) DeepCopy ¶
func (in *ResourceClaimList) DeepCopy() *ResourceClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimList.
func (*ResourceClaimList) DeepCopyInto ¶
func (in *ResourceClaimList) DeepCopyInto(out *ResourceClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceClaimList) DeepCopyObject ¶
func (in *ResourceClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceClaimSchedulingStatus ¶
type ResourceClaimSchedulingStatus struct { // Name matches the pod.spec.resourceClaims[*].Name field. // // +required Name string // 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 UnsuitableNodes []string }
ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with "WaitForFirstConsumer" allocation mode.
func (*ResourceClaimSchedulingStatus) DeepCopy ¶
func (in *ResourceClaimSchedulingStatus) DeepCopy() *ResourceClaimSchedulingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSchedulingStatus.
func (*ResourceClaimSchedulingStatus) DeepCopyInto ¶
func (in *ResourceClaimSchedulingStatus) DeepCopyInto(out *ResourceClaimSchedulingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceClaimSpec ¶
type ResourceClaimSpec struct { // Devices defines how to request devices. // // +optional Devices DeviceClaim // 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 Controller string }
ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
func (*ResourceClaimSpec) DeepCopy ¶
func (in *ResourceClaimSpec) DeepCopy() *ResourceClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSpec.
func (*ResourceClaimSpec) DeepCopyInto ¶
func (in *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceClaimStatus ¶
type ResourceClaimStatus struct { // Allocation is set once the claim has been allocated successfully. // // +optional Allocation *AllocationResult // 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 ReservedFor []ResourceClaimConsumerReference // 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 DeallocationRequested bool }
ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
func (*ResourceClaimStatus) DeepCopy ¶
func (in *ResourceClaimStatus) DeepCopy() *ResourceClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimStatus.
func (*ResourceClaimStatus) DeepCopyInto ¶
func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceClaimTemplate ¶
type ResourceClaimTemplate struct { metav1.TypeMeta // Standard object metadata // +optional metav1.ObjectMeta // 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 }
ResourceClaimTemplate is used to produce ResourceClaim objects.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
func (*ResourceClaimTemplate) DeepCopy ¶
func (in *ResourceClaimTemplate) DeepCopy() *ResourceClaimTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplate.
func (*ResourceClaimTemplate) DeepCopyInto ¶
func (in *ResourceClaimTemplate) DeepCopyInto(out *ResourceClaimTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceClaimTemplate) DeepCopyObject ¶
func (in *ResourceClaimTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceClaimTemplateList ¶
type ResourceClaimTemplateList struct { metav1.TypeMeta // Standard list metadata // +optional metav1.ListMeta // Items is the list of resource claim templates. Items []ResourceClaimTemplate }
ResourceClaimTemplateList is a collection of claim templates.
func (*ResourceClaimTemplateList) DeepCopy ¶
func (in *ResourceClaimTemplateList) DeepCopy() *ResourceClaimTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateList.
func (*ResourceClaimTemplateList) DeepCopyInto ¶
func (in *ResourceClaimTemplateList) DeepCopyInto(out *ResourceClaimTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceClaimTemplateList) DeepCopyObject ¶
func (in *ResourceClaimTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceClaimTemplateSpec ¶
type ResourceClaimTemplateSpec struct { // ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim // when creating it. No other fields are allowed and will be rejected during // validation. // +optional metav1.ObjectMeta // 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 }
ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
func (*ResourceClaimTemplateSpec) DeepCopy ¶
func (in *ResourceClaimTemplateSpec) DeepCopy() *ResourceClaimTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateSpec.
func (*ResourceClaimTemplateSpec) DeepCopyInto ¶
func (in *ResourceClaimTemplateSpec) DeepCopyInto(out *ResourceClaimTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourcePool ¶ added in v1.31.0
type ResourcePool struct { // 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 Name string // 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 Generation int64 // 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 ResourceSliceCount int64 }
ResourcePool describes the pool that ResourceSlices belong to.
func (*ResourcePool) DeepCopy ¶ added in v1.31.0
func (in *ResourcePool) DeepCopy() *ResourcePool
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePool.
func (*ResourcePool) DeepCopyInto ¶ added in v1.31.0
func (in *ResourcePool) DeepCopyInto(out *ResourcePool)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSlice ¶ added in v1.30.0
type ResourceSlice struct { metav1.TypeMeta // Standard object metadata // +optional metav1.ObjectMeta // Contains the information published by the driver. // // Changing the spec automatically increments the metadata.generation number. Spec ResourceSliceSpec }
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.
func (*ResourceSlice) DeepCopy ¶ added in v1.30.0
func (in *ResourceSlice) DeepCopy() *ResourceSlice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSlice.
func (*ResourceSlice) DeepCopyInto ¶ added in v1.30.0
func (in *ResourceSlice) DeepCopyInto(out *ResourceSlice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceSlice) DeepCopyObject ¶ added in v1.30.0
func (in *ResourceSlice) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceSliceList ¶ added in v1.30.0
type ResourceSliceList struct { metav1.TypeMeta // Standard list metadata // +optional metav1.ListMeta // Items is the list of resource ResourceSlices. Items []ResourceSlice }
ResourceSliceList is a collection of ResourceSlices.
func (*ResourceSliceList) DeepCopy ¶ added in v1.30.0
func (in *ResourceSliceList) DeepCopy() *ResourceSliceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceList.
func (*ResourceSliceList) DeepCopyInto ¶ added in v1.30.0
func (in *ResourceSliceList) DeepCopyInto(out *ResourceSliceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceSliceList) DeepCopyObject ¶ added in v1.30.0
func (in *ResourceSliceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceSliceSpec ¶ added in v1.31.0
type ResourceSliceSpec struct { // 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 Driver string // Pool describes the pool that this ResourceSlice belongs to. // // +required Pool ResourcePool // 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 NodeName string // 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 NodeSelector *core.NodeSelector // 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 AllNodes bool // Devices lists some or all of the devices in this pool. // // Must not have more than 128 entries. // // +optional // +listType=atomic Devices []Device }
ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
func (*ResourceSliceSpec) DeepCopy ¶ added in v1.31.0
func (in *ResourceSliceSpec) DeepCopy() *ResourceSliceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceSpec.
func (*ResourceSliceSpec) DeepCopyInto ¶ added in v1.31.0
func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Directories ¶
Path | Synopsis |
---|---|
Package install installs the resource API, making it available as an option to all of the API encoding/decoding machinery.
|
Package install installs the resource API, making it available as an option to all of the API encoding/decoding machinery. |
Package v1alpha3 is the v1alpha3 version of the resource API.
|
Package v1alpha3 is the v1alpha3 version of the resource API. |