k8s_pb/api/resource/v1beta2/
mod.rs

1// This file is @generated by prost-build.
2/// AllocatedDeviceStatus contains the status of an allocated device, if the
3/// driver chooses to report it. This may include driver-specific information.
4///
5/// The combination of Driver, Pool, Device, and ShareID must match the corresponding key
6/// in Status.Allocation.Devices.
7#[derive(Clone, PartialEq, ::prost::Message)]
8pub struct AllocatedDeviceStatus {
9    /// Driver specifies the name of the DRA driver whose kubelet
10    /// plugin should be invoked to process the allocation once the claim is
11    /// needed on a node.
12    ///
13    /// Must be a DNS subdomain and should end with a DNS domain owned by the
14    /// vendor of the driver. It should use only lower case characters.
15    ///
16    /// +required
17    #[prost(string, optional, tag = "1")]
18    pub driver: ::core::option::Option<::prost::alloc::string::String>,
19    /// This name together with the driver name and the device name field
20    /// identify which device was allocated (`<driver name>/<pool name>/<device name>`).
21    ///
22    /// Must not be longer than 253 characters and may contain one or more
23    /// DNS sub-domains separated by slashes.
24    ///
25    /// +required
26    #[prost(string, optional, tag = "2")]
27    pub pool: ::core::option::Option<::prost::alloc::string::String>,
28    /// Device references one device instance via its name in the driver's
29    /// resource pool. It must be a DNS label.
30    ///
31    /// +required
32    #[prost(string, optional, tag = "3")]
33    pub device: ::core::option::Option<::prost::alloc::string::String>,
34    /// ShareID uniquely identifies an individual allocation share of the device.
35    ///
36    /// +optional
37    /// +featureGate=DRAConsumableCapacity
38    /// +k8s:optional
39    /// +k8s:format=k8s-uuid
40    #[prost(string, optional, tag = "7")]
41    pub share_id: ::core::option::Option<::prost::alloc::string::String>,
42    /// Conditions contains the latest observation of the device's state.
43    /// If the device has been configured according to the class and claim
44    /// config references, the `Ready` condition should be True.
45    ///
46    /// Must not contain more than 8 entries.
47    ///
48    /// +optional
49    /// +listType=map
50    /// +listMapKey=type
51    #[prost(message, repeated, tag = "4")]
52    pub conditions:
53        ::prost::alloc::vec::Vec<super::super::super::apimachinery::pkg::apis::meta::v1::Condition>,
54    /// Data contains arbitrary driver-specific data.
55    ///
56    /// The length of the raw data must be smaller or equal to 10 Ki.
57    ///
58    /// +optional
59    #[prost(message, optional, tag = "5")]
60    pub data: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
61    /// NetworkData contains network-related information specific to the device.
62    ///
63    /// +optional
64    /// +k8s:optional
65    #[prost(message, optional, tag = "6")]
66    pub network_data: ::core::option::Option<NetworkDeviceData>,
67}
68/// AllocationResult contains attributes of an allocated resource.
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct AllocationResult {
71    /// Devices is the result of allocating devices.
72    ///
73    /// +optional
74    #[prost(message, optional, tag = "1")]
75    pub devices: ::core::option::Option<DeviceAllocationResult>,
76    /// NodeSelector defines where the allocated resources are available. If
77    /// unset, they are available everywhere.
78    ///
79    /// +optional
80    #[prost(message, optional, tag = "3")]
81    pub node_selector: ::core::option::Option<super::super::core::v1::NodeSelector>,
82    /// AllocationTimestamp stores the time when the resources were allocated.
83    /// This field is not guaranteed to be set, in which case that time is unknown.
84    ///
85    /// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
86    /// feature gate.
87    ///
88    /// +optional
89    /// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
90    #[prost(message, optional, tag = "5")]
91    pub allocation_timestamp:
92        ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
93}
94/// CELDeviceSelector contains a CEL expression for selecting a device.
95#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
96pub struct CelDeviceSelector {
97    /// Expression is a CEL expression which evaluates a single device. It
98    /// must evaluate to true when the device under consideration satisfies
99    /// the desired criteria, and false when it does not. Any other result
100    /// is an error and causes allocation of devices to abort.
101    ///
102    /// The expression's input is an object named "device", which carries
103    /// the following properties:
104    ///   - driver (string): the name of the driver which defines this device.
105    ///   - attributes (map\[string\]object): the device's attributes, grouped by prefix
106    ///     (e.g. device.attributes\["dra.example.com"\] evaluates to an object with all
107    ///     of the attributes which were prefixed by "dra.example.com".
108    ///   - capacity (map\[string\]object): the device's capacities, grouped by prefix.
109    ///   - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device
110    ///     (v1.34+ with the DRAConsumableCapacity feature enabled).
111    ///
112    /// Example: Consider a device with driver="dra.example.com", which exposes
113    /// two attributes named "model" and "ext.example.com/family" and which
114    /// exposes one capacity named "modules". This input to this expression
115    /// would have the following fields:
116    ///
117    ///      device.driver
118    ///      device.attributes\["dra.example.com"\].model
119    ///      device.attributes\["ext.example.com"\].family
120    ///      device.capacity\["dra.example.com"\].modules
121    ///
122    /// The device.driver field can be used to check for a specific driver,
123    /// either as a high-level precondition (i.e. you only want to consider
124    /// devices from this driver) or as part of a multi-clause expression
125    /// that is meant to consider devices from different drivers.
126    ///
127    /// The value type of each attribute is defined by the device
128    /// definition, and users who write these expressions must consult the
129    /// documentation for their specific drivers. The value type of each
130    /// capacity is Quantity.
131    ///
132    /// If an unknown prefix is used as a lookup in either device.attributes
133    /// or device.capacity, an empty map will be returned. Any reference to
134    /// an unknown field will cause an evaluation error and allocation to
135    /// abort.
136    ///
137    /// A robust expression should check for the existence of attributes
138    /// before referencing them.
139    ///
140    /// For ease of use, the cel.bind() function is enabled, and can be used
141    /// to simplify expressions that access multiple attributes with the
142    /// same domain. For example:
143    ///
144    ///      cel.bind(dra, device.attributes\["dra.example.com"\], dra.someBool && dra.anotherBool)
145    ///
146    /// The length of the expression must be smaller or equal to 10 Ki. The
147    /// cost of evaluating it is also limited based on the estimated number
148    /// of logical steps.
149    ///
150    /// +required
151    #[prost(string, optional, tag = "1")]
152    pub expression: ::core::option::Option<::prost::alloc::string::String>,
153}
154/// CapacityRequestPolicy defines how requests consume device capacity.
155///
156/// Must not set more than one ValidRequestValues.
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct CapacityRequestPolicy {
159    /// Default specifies how much of this capacity is consumed by a request
160    /// that does not contain an entry for it in DeviceRequest's Capacity.
161    ///
162    /// +optional
163    #[prost(message, optional, tag = "1")]
164    pub default: ::core::option::Option<super::super::super::apimachinery::pkg::api::resource::Quantity>,
165    /// ValidValues defines a set of acceptable quantity values in consuming requests.
166    ///
167    /// Must not contain more than 10 entries.
168    /// Must be sorted in ascending order.
169    ///
170    /// If this field is set,
171    /// Default must be defined and it must be included in ValidValues list.
172    ///
173    /// If the requested amount does not match any valid value but smaller than some valid values,
174    /// the scheduler calculates the smallest valid value that is greater than or equal to the request.
175    /// That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues).
176    ///
177    /// If the requested amount exceeds all valid values, the request violates the policy,
178    /// and this device cannot be allocated.
179    ///
180    /// +optional
181    /// +listType=atomic
182    /// +oneOf=ValidRequestValues
183    #[prost(message, repeated, tag = "3")]
184    pub valid_values:
185        ::prost::alloc::vec::Vec<super::super::super::apimachinery::pkg::api::resource::Quantity>,
186    /// ValidRange defines an acceptable quantity value range in consuming requests.
187    ///
188    /// If this field is set,
189    /// Default must be defined and it must fall within the defined ValidRange.
190    ///
191    /// If the requested amount does not fall within the defined range, the request violates the policy,
192    /// and this device cannot be allocated.
193    ///
194    /// If the request doesn't contain this capacity entry, Default value is used.
195    ///
196    /// +optional
197    /// +oneOf=ValidRequestValues
198    #[prost(message, optional, tag = "4")]
199    pub valid_range: ::core::option::Option<CapacityRequestPolicyRange>,
200}
201/// CapacityRequestPolicyRange defines a valid range for consumable capacity values.
202///
203///    - If the requested amount is less than Min, it is rounded up to the Min value.
204///    - If Step is set and the requested amount is between Min and Max but not aligned with Step,
205///      it will be rounded up to the next value equal to Min + (n * Step).
206///    - If Step is not set, the requested amount is used as-is if it falls within the range Min to Max (if set).
207///    - If the requested or rounded amount exceeds Max (if set), the request does not satisfy the policy,
208///      and the device cannot be allocated.
209#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
210pub struct CapacityRequestPolicyRange {
211    /// Min specifies the minimum capacity allowed for a consumption request.
212    ///
213    /// Min must be greater than or equal to zero,
214    /// and less than or equal to the capacity value.
215    /// requestPolicy.default must be more than or equal to the minimum.
216    ///
217    /// +required
218    #[prost(message, optional, tag = "1")]
219    pub min: ::core::option::Option<super::super::super::apimachinery::pkg::api::resource::Quantity>,
220    /// Max defines the upper limit for capacity that can be requested.
221    ///
222    /// Max must be less than or equal to the capacity value.
223    /// Min and requestPolicy.default must be less than or equal to the maximum.
224    ///
225    /// +optional
226    #[prost(message, optional, tag = "2")]
227    pub max: ::core::option::Option<super::super::super::apimachinery::pkg::api::resource::Quantity>,
228    /// Step defines the step size between valid capacity amounts within the range.
229    ///
230    /// Max (if set) and requestPolicy.default must be a multiple of Step.
231    /// Min + Step must be less than or equal to the capacity value.
232    ///
233    /// +optional
234    #[prost(message, optional, tag = "3")]
235    pub step: ::core::option::Option<super::super::super::apimachinery::pkg::api::resource::Quantity>,
236}
237/// CapacityRequirements defines the capacity requirements for a specific device request.
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct CapacityRequirements {
240    /// Requests represent individual device resource requests for distinct resources,
241    /// all of which must be provided by the device.
242    ///
243    /// This value is used as an additional filtering condition against the available capacity on the device.
244    /// This is semantically equivalent to a CEL selector with
245    /// `device.capacity\[<domain>\].<name>.compareTo(quantity(<request quantity>)) >= 0`.
246    /// For example, device.capacity\['test-driver.cdi.k8s.io'\].counters.compareTo(quantity('2')) >= 0.
247    ///
248    /// When a requestPolicy is defined, the requested amount is adjusted upward
249    /// to the nearest valid value based on the policy.
250    /// If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows—
251    /// the device is considered ineligible for allocation.
252    ///
253    /// For any capacity that is not explicitly requested:
254    /// - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity
255    ///    (i.e., the whole device is claimed).
256    /// - If a requestPolicy is set, the default consumed capacity is determined according to that policy.
257    ///
258    /// If the device allows multiple allocation,
259    /// the aggregated amount across all requests must not exceed the capacity value.
260    /// The consumed capacity, which may be adjusted based on the requestPolicy if defined,
261    /// is recorded in the resource claim’s status.devices\[*\].consumedCapacity field.
262    ///
263    /// +optional
264    #[prost(btree_map = "string, message", tag = "1")]
265    pub requests: ::prost::alloc::collections::BTreeMap<
266        ::prost::alloc::string::String,
267        super::super::super::apimachinery::pkg::api::resource::Quantity,
268    >,
269}
270/// Counter describes a quantity associated with a device.
271#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
272pub struct Counter {
273    /// Value defines how much of a certain device counter is available.
274    ///
275    /// +required
276    #[prost(message, optional, tag = "1")]
277    pub value: ::core::option::Option<super::super::super::apimachinery::pkg::api::resource::Quantity>,
278}
279/// CounterSet defines a named set of counters
280/// that are available to be used by devices defined in the
281/// ResourcePool.
282///
283/// The counters are not allocatable by themselves, but
284/// can be referenced by devices. When a device is allocated,
285/// the portion of counters it uses will no longer be available for use
286/// by other devices.
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct CounterSet {
289    /// Name defines the name of the counter set.
290    /// It must be a DNS label.
291    ///
292    /// +required
293    /// +k8s:required
294    /// +k8s:format=k8s-short-name
295    #[prost(string, optional, tag = "1")]
296    pub name: ::core::option::Option<::prost::alloc::string::String>,
297    /// Counters defines the set of counters for this CounterSet
298    /// The name of each counter must be unique in that set and must be a DNS label.
299    ///
300    /// The maximum number of counters is 32.
301    ///
302    /// +required
303    #[prost(btree_map = "string, message", tag = "2")]
304    pub counters: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, Counter>,
305}
306/// Device represents one individual hardware instance that can be selected based
307/// on its attributes. Besides the name, exactly one field must be set.
308#[derive(Clone, PartialEq, ::prost::Message)]
309pub struct Device {
310    /// Name is unique identifier among all devices managed by
311    /// the driver in the pool. It must be a DNS label.
312    ///
313    /// +required
314    #[prost(string, optional, tag = "1")]
315    pub name: ::core::option::Option<::prost::alloc::string::String>,
316    /// Attributes defines the set of attributes for this device.
317    /// The name of each attribute must be unique in that set.
318    ///
319    /// The maximum number of attributes and capacities combined is 32.
320    ///
321    /// +optional
322    #[prost(btree_map = "string, message", tag = "2")]
323    pub attributes: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, DeviceAttribute>,
324    /// Capacity defines the set of capacities for this device.
325    /// The name of each capacity must be unique in that set.
326    ///
327    /// The maximum number of attributes and capacities combined is 32.
328    ///
329    /// +optional
330    #[prost(btree_map = "string, message", tag = "3")]
331    pub capacity: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, DeviceCapacity>,
332    /// ConsumesCounters defines a list of references to sharedCounters
333    /// and the set of counters that the device will
334    /// consume from those counter sets.
335    ///
336    /// There can only be a single entry per counterSet.
337    ///
338    /// The maximum number of device counter consumptions per
339    /// device is 2.
340    ///
341    /// +optional
342    /// +k8s:optional
343    /// +listType=atomic
344    /// +k8s:listType=atomic
345    /// +k8s:unique=map
346    /// +k8s:listMapKey=counterSet
347    /// +featureGate=DRAPartitionableDevices
348    /// +k8s:maxItems=2
349    #[prost(message, repeated, tag = "4")]
350    pub consumes_counters: ::prost::alloc::vec::Vec<DeviceCounterConsumption>,
351    /// NodeName identifies the node where the device is available.
352    ///
353    /// Must only be set if Spec.PerDeviceNodeSelection is set to true.
354    /// At most one of NodeName, NodeSelector and AllNodes can be set.
355    ///
356    /// +optional
357    /// +oneOf=DeviceNodeSelection
358    /// +featureGate=DRAPartitionableDevices
359    #[prost(string, optional, tag = "5")]
360    pub node_name: ::core::option::Option<::prost::alloc::string::String>,
361    /// NodeSelector defines the nodes where the device is available.
362    ///
363    /// Must use exactly one term.
364    ///
365    /// Must only be set if Spec.PerDeviceNodeSelection is set to true.
366    /// At most one of NodeName, NodeSelector and AllNodes can be set.
367    ///
368    /// +optional
369    /// +oneOf=DeviceNodeSelection
370    /// +featureGate=DRAPartitionableDevices
371    #[prost(message, optional, tag = "6")]
372    pub node_selector: ::core::option::Option<super::super::core::v1::NodeSelector>,
373    /// AllNodes indicates that all nodes have access to the device.
374    ///
375    /// Must only be set if Spec.PerDeviceNodeSelection is set to true.
376    /// At most one of NodeName, NodeSelector and AllNodes can be set.
377    ///
378    /// +optional
379    /// +oneOf=DeviceNodeSelection
380    /// +featureGate=DRAPartitionableDevices
381    #[prost(bool, optional, tag = "7")]
382    pub all_nodes: ::core::option::Option<bool>,
383    /// If specified, these are the driver-defined taints.
384    ///
385    /// The maximum number of taints is 16. If taints are set for
386    /// any device in a ResourceSlice, then the maximum number of
387    /// allowed devices per ResourceSlice is 64 instead of 128.
388    ///
389    /// This is an alpha field and requires enabling the DRADeviceTaints
390    /// feature gate.
391    ///
392    /// +optional
393    /// +listType=atomic
394    /// +featureGate=DRADeviceTaints
395    #[prost(message, repeated, tag = "8")]
396    pub taints: ::prost::alloc::vec::Vec<DeviceTaint>,
397    /// BindsToNode indicates if the usage of an allocation involving this device
398    /// has to be limited to exactly the node that was chosen when allocating the claim.
399    /// If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector
400    /// to match the node where the allocation was made.
401    ///
402    /// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
403    /// feature gates.
404    ///
405    /// +optional
406    /// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
407    #[prost(bool, optional, tag = "9")]
408    pub binds_to_node: ::core::option::Option<bool>,
409    /// BindingConditions defines the conditions for proceeding with binding.
410    /// All of these conditions must be set in the per-device status
411    /// conditions with a value of True to proceed with binding the pod to the node
412    /// while scheduling the pod.
413    ///
414    /// The maximum number of binding conditions is 4.
415    ///
416    /// The conditions must be a valid condition type string.
417    ///
418    /// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
419    /// feature gates.
420    ///
421    /// +optional
422    /// +listType=atomic
423    /// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
424    /// +k8s:optional
425    /// +k8s:maxItems=4
426    #[prost(string, repeated, tag = "10")]
427    pub binding_conditions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
428    /// BindingFailureConditions defines the conditions for binding failure.
429    /// They may be set in the per-device status conditions.
430    /// If any is set to "True", a binding failure occurred.
431    ///
432    /// The maximum number of binding failure conditions is 4.
433    ///
434    /// The conditions must be a valid condition type string.
435    ///
436    /// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
437    /// feature gates.
438    ///
439    /// +optional
440    /// +listType=atomic
441    /// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
442    /// +k8s:optional
443    /// +k8s:maxItems=4
444    #[prost(string, repeated, tag = "11")]
445    pub binding_failure_conditions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
446    /// AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests.
447    ///
448    /// If AllowMultipleAllocations is set to true, the device can be allocated more than once,
449    /// and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not.
450    ///
451    /// +optional
452    /// +featureGate=DRAConsumableCapacity
453    #[prost(bool, optional, tag = "12")]
454    pub allow_multiple_allocations: ::core::option::Option<bool>,
455}
456/// DeviceAllocationConfiguration gets embedded in an AllocationResult.
457#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
458pub struct DeviceAllocationConfiguration {
459    /// Source records whether the configuration comes from a class and thus
460    /// is not something that a normal user would have been able to set
461    /// or from a claim.
462    ///
463    /// +required
464    /// +k8s:required
465    #[prost(string, optional, tag = "1")]
466    pub source: ::core::option::Option<::prost::alloc::string::String>,
467    /// Requests lists the names of requests where the configuration applies.
468    /// If empty, its applies to all requests.
469    ///
470    /// References to subrequests must include the name of the main request
471    /// and may include the subrequest using the format <main request>\[/<subrequest>\]. If just
472    /// the main request is given, the configuration applies to all subrequests.
473    ///
474    /// +optional
475    /// +listType=atomic
476    /// +k8s:optional
477    /// +k8s:listType=atomic
478    /// +k8s:unique=set
479    /// +k8s:maxItems=32
480    #[prost(string, repeated, tag = "2")]
481    pub requests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
482    #[prost(message, optional, tag = "3")]
483    pub device_configuration: ::core::option::Option<DeviceConfiguration>,
484}
485/// DeviceAllocationResult is the result of allocating devices.
486#[derive(Clone, PartialEq, ::prost::Message)]
487pub struct DeviceAllocationResult {
488    /// Results lists all allocated devices.
489    ///
490    /// +optional
491    /// +listType=atomic
492    /// +k8s:optional
493    /// +k8s:maxItems=32
494    #[prost(message, repeated, tag = "1")]
495    pub results: ::prost::alloc::vec::Vec<DeviceRequestAllocationResult>,
496    /// This field is a combination of all the claim and class configuration parameters.
497    /// Drivers can distinguish between those based on a flag.
498    ///
499    /// This includes configuration parameters for drivers which have no allocated
500    /// devices in the result because it is up to the drivers which configuration
501    /// parameters they support. They can silently ignore unknown configuration
502    /// parameters.
503    ///
504    /// +optional
505    /// +listType=atomic
506    /// +k8s:optional
507    /// +k8s:maxItems=64
508    #[prost(message, repeated, tag = "2")]
509    pub config: ::prost::alloc::vec::Vec<DeviceAllocationConfiguration>,
510}
511/// DeviceAttribute must have exactly one field set.
512#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
513pub struct DeviceAttribute {
514    /// IntValue is a number.
515    ///
516    /// +optional
517    /// +k8s:optional
518    /// +k8s:unionMember
519    #[prost(int64, optional, tag = "2")]
520    pub int: ::core::option::Option<i64>,
521    /// BoolValue is a true/false value.
522    ///
523    /// +optional
524    /// +k8s:optional
525    /// +k8s:unionMember
526    #[prost(bool, optional, tag = "3")]
527    pub bool: ::core::option::Option<bool>,
528    /// StringValue is a string. Must not be longer than 64 characters.
529    ///
530    /// +optional
531    /// +k8s:optional
532    /// +k8s:unionMember
533    #[prost(string, optional, tag = "4")]
534    pub string: ::core::option::Option<::prost::alloc::string::String>,
535    /// VersionValue is a semantic version according to semver.org spec 2.0.0.
536    /// Must not be longer than 64 characters.
537    ///
538    /// +optional
539    /// +k8s:optional
540    /// +k8s:unionMember
541    #[prost(string, optional, tag = "5")]
542    pub version: ::core::option::Option<::prost::alloc::string::String>,
543}
544/// DeviceCapacity describes a quantity associated with a device.
545#[derive(Clone, PartialEq, ::prost::Message)]
546pub struct DeviceCapacity {
547    /// Value defines how much of a certain capacity that device has.
548    ///
549    /// This field reflects the fixed total capacity and does not change.
550    /// The consumed amount is tracked separately by scheduler
551    /// and does not affect this value.
552    ///
553    /// +required
554    #[prost(message, optional, tag = "1")]
555    pub value: ::core::option::Option<super::super::super::apimachinery::pkg::api::resource::Quantity>,
556    /// RequestPolicy defines how this DeviceCapacity must be consumed
557    /// when the device is allowed to be shared by multiple allocations.
558    ///
559    /// The Device must have allowMultipleAllocations set to true in order to set a requestPolicy.
560    ///
561    /// If unset, capacity requests are unconstrained:
562    /// requests can consume any amount of capacity, as long as the total consumed
563    /// across all allocations does not exceed the device's defined capacity.
564    /// If request is also unset, default is the full capacity value.
565    ///
566    /// +optional
567    /// +featureGate=DRAConsumableCapacity
568    #[prost(message, optional, tag = "2")]
569    pub request_policy: ::core::option::Option<CapacityRequestPolicy>,
570}
571/// DeviceClaim defines how to request devices with a ResourceClaim.
572#[derive(Clone, PartialEq, ::prost::Message)]
573pub struct DeviceClaim {
574    /// Requests represent individual requests for distinct devices which
575    /// must all be satisfied. If empty, nothing needs to be allocated.
576    ///
577    /// +optional
578    /// +listType=atomic
579    /// +k8s:optional
580    /// +k8s:listType=atomic
581    /// +k8s:unique=map
582    /// +k8s:listMapKey=name
583    /// +k8s:maxItems=32
584    #[prost(message, repeated, tag = "1")]
585    pub requests: ::prost::alloc::vec::Vec<DeviceRequest>,
586    /// These constraints must be satisfied by the set of devices that get
587    /// allocated for the claim.
588    ///
589    /// +optional
590    /// +listType=atomic
591    /// +k8s:optional
592    /// +k8s:maxItems=32
593    #[prost(message, repeated, tag = "2")]
594    pub constraints: ::prost::alloc::vec::Vec<DeviceConstraint>,
595    /// This field holds configuration for multiple potential drivers which
596    /// could satisfy requests in this claim. It is ignored while allocating
597    /// the claim.
598    ///
599    /// +optional
600    /// +listType=atomic
601    /// +k8s:optional
602    /// +k8s:maxItems=32
603    #[prost(message, repeated, tag = "3")]
604    pub config: ::prost::alloc::vec::Vec<DeviceClaimConfiguration>,
605}
606/// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
607#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
608pub struct DeviceClaimConfiguration {
609    /// Requests lists the names of requests where the configuration applies.
610    /// If empty, it applies to all requests.
611    ///
612    /// References to subrequests must include the name of the main request
613    /// and may include the subrequest using the format <main request>\[/<subrequest>\]. If just
614    /// the main request is given, the configuration applies to all subrequests.
615    ///
616    /// +optional
617    /// +listType=atomic
618    /// +k8s:optional
619    /// +k8s:listType=atomic
620    /// +k8s:unique=set
621    /// +k8s:maxItems=32
622    #[prost(string, repeated, tag = "1")]
623    pub requests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
624    #[prost(message, optional, tag = "2")]
625    pub device_configuration: ::core::option::Option<DeviceConfiguration>,
626}
627/// DeviceClass is a vendor- or admin-provided resource that contains
628/// device configuration and selectors. It can be referenced in
629/// the device requests of a claim to apply these presets.
630/// Cluster scoped.
631///
632/// This is an alpha type and requires enabling the DynamicResourceAllocation
633/// feature gate.
634#[derive(Clone, PartialEq, ::prost::Message)]
635pub struct DeviceClass {
636    /// Standard object metadata
637    /// +optional
638    /// +k8s:subfield(name)=+k8s:optional
639    /// +k8s:subfield(name)=+k8s:format=k8s-long-name
640    #[prost(message, optional, tag = "1")]
641    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
642    /// Spec defines what can be allocated and how to configure it.
643    ///
644    /// This is mutable. Consumers have to be prepared for classes changing
645    /// at any time, either because they get updated or replaced. Claim
646    /// allocations are done once based on whatever was set in classes at
647    /// the time of allocation.
648    ///
649    /// Changing the spec automatically increments the metadata.generation number.
650    #[prost(message, optional, tag = "2")]
651    pub spec: ::core::option::Option<DeviceClassSpec>,
652}
653/// DeviceClassConfiguration is used in DeviceClass.
654#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
655pub struct DeviceClassConfiguration {
656    #[prost(message, optional, tag = "1")]
657    pub device_configuration: ::core::option::Option<DeviceConfiguration>,
658}
659/// DeviceClassList is a collection of classes.
660#[derive(Clone, PartialEq, ::prost::Message)]
661pub struct DeviceClassList {
662    /// Standard list metadata
663    /// +optional
664    #[prost(message, optional, tag = "1")]
665    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
666    /// Items is the list of resource classes.
667    #[prost(message, repeated, tag = "2")]
668    pub items: ::prost::alloc::vec::Vec<DeviceClass>,
669}
670/// DeviceClassSpec is used in a \[DeviceClass\] to define what can be allocated
671/// and how to configure it.
672#[derive(Clone, PartialEq, ::prost::Message)]
673pub struct DeviceClassSpec {
674    /// Each selector must be satisfied by a device which is claimed via this class.
675    ///
676    /// +optional
677    /// +listType=atomic
678    /// +k8s:optional
679    /// +k8s:maxItems=32
680    #[prost(message, repeated, tag = "1")]
681    pub selectors: ::prost::alloc::vec::Vec<DeviceSelector>,
682    /// Config defines configuration parameters that apply to each device that is claimed via this class.
683    /// Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor
684    /// configuration applies to exactly one driver.
685    ///
686    /// They are passed to the driver, but are not considered while allocating the claim.
687    ///
688    /// +optional
689    /// +listType=atomic
690    /// +k8s:optional
691    /// +k8s:maxItems=32
692    #[prost(message, repeated, tag = "2")]
693    pub config: ::prost::alloc::vec::Vec<DeviceClassConfiguration>,
694    /// ExtendedResourceName is the extended resource name for the devices of this class.
695    /// The devices of this class can be used to satisfy a pod's extended resource requests.
696    /// It has the same format as the name of a pod's extended resource.
697    /// It should be unique among all the device classes in a cluster.
698    /// If two device classes have the same name, then the class created later
699    /// is picked to satisfy a pod's extended resource requests.
700    /// If two classes are created at the same time, then the name of the class
701    /// lexicographically sorted first is picked.
702    ///
703    /// This is an alpha field.
704    /// +optional
705    /// +featureGate=DRAExtendedResource
706    /// +k8s:optional
707    /// +k8s:format=k8s-extended-resource-name
708    #[prost(string, optional, tag = "4")]
709    pub extended_resource_name: ::core::option::Option<::prost::alloc::string::String>,
710}
711/// DeviceConfiguration must have exactly one field set. It gets embedded
712/// inline in some other structs which have other fields, so field names must
713/// not conflict with those.
714#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
715pub struct DeviceConfiguration {
716    /// Opaque provides driver-specific configuration parameters.
717    ///
718    /// +optional
719    /// +oneOf=ConfigurationType
720    /// +k8s:optional
721    #[prost(message, optional, tag = "1")]
722    pub opaque: ::core::option::Option<OpaqueDeviceConfiguration>,
723}
724/// DeviceConstraint must have exactly one field set besides Requests.
725#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
726pub struct DeviceConstraint {
727    /// Requests is a list of the one or more requests in this claim which
728    /// must co-satisfy this constraint. If a request is fulfilled by
729    /// multiple devices, then all of the devices must satisfy the
730    /// constraint. If this is not specified, this constraint applies to all
731    /// requests in this claim.
732    ///
733    /// References to subrequests must include the name of the main request
734    /// and may include the subrequest using the format <main request>\[/<subrequest>\]. If just
735    /// the main request is given, the constraint applies to all subrequests.
736    ///
737    /// +optional
738    /// +listType=atomic
739    /// +k8s:optional
740    /// +k8s:listType=atomic
741    /// +k8s:unique=set
742    /// +k8s:maxItems=32
743    #[prost(string, repeated, tag = "1")]
744    pub requests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
745    /// MatchAttribute requires that all devices in question have this
746    /// attribute and that its type and value are the same across those
747    /// devices.
748    ///
749    /// For example, if you specified "dra.example.com/numa" (a hypothetical example!),
750    /// then only devices in the same NUMA node will be chosen. A device which
751    /// does not have that attribute will not be chosen. All devices should
752    /// use a value of the same type for this attribute because that is part of
753    /// its specification, but if one device doesn't, then it also will not be
754    /// chosen.
755    ///
756    /// Must include the domain qualifier.
757    ///
758    /// +optional
759    /// +oneOf=ConstraintType
760    /// +k8s:optional
761    /// +k8s:format=k8s-resource-fully-qualified-name
762    #[prost(string, optional, tag = "2")]
763    pub match_attribute: ::core::option::Option<::prost::alloc::string::String>,
764    /// DistinctAttribute requires that all devices in question have this
765    /// attribute and that its type and value are unique across those devices.
766    ///
767    /// This acts as the inverse of MatchAttribute.
768    ///
769    /// This constraint is used to avoid allocating multiple requests to the same device
770    /// by ensuring attribute-level differentiation.
771    ///
772    /// This is useful for scenarios where resource requests must be fulfilled by separate physical devices.
773    /// For example, a container requests two network interfaces that must be allocated from two different physical NICs.
774    ///
775    /// +optional
776    /// +oneOf=ConstraintType
777    /// +featureGate=DRAConsumableCapacity
778    #[prost(string, optional, tag = "3")]
779    pub distinct_attribute: ::core::option::Option<::prost::alloc::string::String>,
780}
781/// DeviceCounterConsumption defines a set of counters that
782/// a device will consume from a CounterSet.
783#[derive(Clone, PartialEq, ::prost::Message)]
784pub struct DeviceCounterConsumption {
785    /// CounterSet is the name of the set from which the
786    /// counters defined will be consumed.
787    ///
788    /// +required
789    /// +k8s:required
790    /// +k8s:format=k8s-short-name
791    #[prost(string, optional, tag = "1")]
792    pub counter_set: ::core::option::Option<::prost::alloc::string::String>,
793    /// Counters defines the counters that will be consumed by the device.
794    ///
795    /// The maximum number of counters is 32.
796    ///
797    /// +required
798    #[prost(btree_map = "string, message", tag = "2")]
799    pub counters: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, Counter>,
800}
801/// DeviceRequest is a request for devices required for a claim.
802/// This is typically a request for a single resource like a device, but can
803/// also ask for several identical devices. With FirstAvailable it is also
804/// possible to provide a prioritized list of requests.
805#[derive(Clone, PartialEq, ::prost::Message)]
806pub struct DeviceRequest {
807    /// Name can be used to reference this request in a pod.spec.containers\[\].resources.claims
808    /// entry and in a constraint of the claim.
809    ///
810    /// References using the name in the DeviceRequest will uniquely
811    /// identify a request when the Exactly field is set. When the
812    /// FirstAvailable field is set, a reference to the name of the
813    /// DeviceRequest will match whatever subrequest is chosen by the
814    /// scheduler.
815    ///
816    /// Must be a DNS label.
817    ///
818    /// +required
819    #[prost(string, optional, tag = "1")]
820    pub name: ::core::option::Option<::prost::alloc::string::String>,
821    /// Exactly specifies the details for a single request that must
822    /// be met exactly for the request to be satisfied.
823    ///
824    /// One of Exactly or FirstAvailable must be set.
825    ///
826    /// +optional
827    /// +oneOf=deviceRequestType
828    /// +k8s:optional
829    #[prost(message, optional, tag = "2")]
830    pub exactly: ::core::option::Option<ExactDeviceRequest>,
831    /// FirstAvailable contains subrequests, of which exactly one will be
832    /// selected by the scheduler. It tries to
833    /// satisfy them in the order in which they are listed here. So if
834    /// there are two entries in the list, the scheduler will only check
835    /// the second one if it determines that the first one can not be used.
836    ///
837    /// DRA does not yet implement scoring, so the scheduler will
838    /// select the first set of devices that satisfies all the
839    /// requests in the claim. And if the requirements can
840    /// be satisfied on more than one node, other scheduling features
841    /// will determine which node is chosen. This means that the set of
842    /// devices allocated to a claim might not be the optimal set
843    /// available to the cluster. Scoring will be implemented later.
844    ///
845    /// +optional
846    /// +oneOf=deviceRequestType
847    /// +listType=atomic
848    /// +featureGate=DRAPrioritizedList
849    /// +k8s:optional
850    /// +k8s:listType=atomic
851    /// +k8s:unique=map
852    /// +k8s:listMapKey=name
853    /// +k8s:maxItems=8
854    #[prost(message, repeated, tag = "3")]
855    pub first_available: ::prost::alloc::vec::Vec<DeviceSubRequest>,
856}
857/// DeviceRequestAllocationResult contains the allocation result for one request.
858#[derive(Clone, PartialEq, ::prost::Message)]
859pub struct DeviceRequestAllocationResult {
860    /// Request is the name of the request in the claim which caused this
861    /// device to be allocated. If it references a subrequest in the
862    /// firstAvailable list on a DeviceRequest, this field must
863    /// include both the name of the main request and the subrequest
864    /// using the format <main request>/<subrequest>.
865    ///
866    /// Multiple devices may have been allocated per request.
867    ///
868    /// +required
869    #[prost(string, optional, tag = "1")]
870    pub request: ::core::option::Option<::prost::alloc::string::String>,
871    /// Driver specifies the name of the DRA driver whose kubelet
872    /// plugin should be invoked to process the allocation once the claim is
873    /// needed on a node.
874    ///
875    /// Must be a DNS subdomain and should end with a DNS domain owned by the
876    /// vendor of the driver. It should use only lower case characters.
877    ///
878    /// +required
879    /// +k8s:format=k8s-long-name-caseless
880    /// +k8s:required
881    #[prost(string, optional, tag = "2")]
882    pub driver: ::core::option::Option<::prost::alloc::string::String>,
883    /// This name together with the driver name and the device name field
884    /// identify which device was allocated (`<driver name>/<pool name>/<device name>`).
885    ///
886    /// Must not be longer than 253 characters and may contain one or more
887    /// DNS sub-domains separated by slashes.
888    ///
889    /// +required
890    /// +k8s:required
891    /// +k8s:format=k8s-resource-pool-name
892    #[prost(string, optional, tag = "3")]
893    pub pool: ::core::option::Option<::prost::alloc::string::String>,
894    /// Device references one device instance via its name in the driver's
895    /// resource pool. It must be a DNS label.
896    ///
897    /// +required
898    #[prost(string, optional, tag = "4")]
899    pub device: ::core::option::Option<::prost::alloc::string::String>,
900    /// AdminAccess indicates that this device was allocated for
901    /// administrative access. See the corresponding request field
902    /// for a definition of mode.
903    ///
904    /// This is an alpha field and requires enabling the DRAAdminAccess
905    /// feature gate. Admin access is disabled if this field is unset or
906    /// set to false, otherwise it is enabled.
907    ///
908    /// +optional
909    /// +featureGate=DRAAdminAccess
910    #[prost(bool, optional, tag = "5")]
911    pub admin_access: ::core::option::Option<bool>,
912    /// A copy of all tolerations specified in the request at the time
913    /// when the device got allocated.
914    ///
915    /// The maximum number of tolerations is 16.
916    ///
917    /// This is an alpha field and requires enabling the DRADeviceTaints
918    /// feature gate.
919    ///
920    /// +optional
921    /// +listType=atomic
922    /// +featureGate=DRADeviceTaints
923    #[prost(message, repeated, tag = "6")]
924    pub tolerations: ::prost::alloc::vec::Vec<DeviceToleration>,
925    /// BindingConditions contains a copy of the BindingConditions
926    /// from the corresponding ResourceSlice at the time of allocation.
927    ///
928    /// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
929    /// feature gates.
930    ///
931    /// +optional
932    /// +listType=atomic
933    /// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
934    /// +k8s:optional
935    /// +k8s:maxItems=4
936    #[prost(string, repeated, tag = "7")]
937    pub binding_conditions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
938    /// BindingFailureConditions contains a copy of the BindingFailureConditions
939    /// from the corresponding ResourceSlice at the time of allocation.
940    ///
941    /// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
942    /// feature gates.
943    ///
944    /// +optional
945    /// +listType=atomic
946    /// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
947    /// +k8s:optional
948    /// +k8s:maxItems=4
949    #[prost(string, repeated, tag = "8")]
950    pub binding_failure_conditions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
951    /// ShareID uniquely identifies an individual allocation share of the device,
952    /// used when the device supports multiple simultaneous allocations.
953    /// It serves as an additional map key to differentiate concurrent shares
954    /// of the same device.
955    ///
956    /// +optional
957    /// +featureGate=DRAConsumableCapacity
958    /// +k8s:optional
959    /// +k8s:format=k8s-uuid
960    #[prost(string, optional, tag = "9")]
961    pub share_id: ::core::option::Option<::prost::alloc::string::String>,
962    /// ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request.
963    /// The consumed amount may differ from the requested amount: it is rounded up to the nearest valid
964    /// value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount).
965    ///
966    /// The total consumed capacity for each device must not exceed the DeviceCapacity's Value.
967    ///
968    /// This field is populated only for devices that allow multiple allocations.
969    /// All capacity entries are included, even if the consumed amount is zero.
970    ///
971    /// +optional
972    /// +featureGate=DRAConsumableCapacity
973    #[prost(btree_map = "string, message", tag = "10")]
974    pub consumed_capacity: ::prost::alloc::collections::BTreeMap<
975        ::prost::alloc::string::String,
976        super::super::super::apimachinery::pkg::api::resource::Quantity,
977    >,
978}
979/// DeviceSelector must have exactly one field set.
980#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
981pub struct DeviceSelector {
982    /// CEL contains a CEL expression for selecting a device.
983    ///
984    /// +optional
985    /// +oneOf=SelectorType
986    #[prost(message, optional, tag = "1")]
987    pub cel: ::core::option::Option<CelDeviceSelector>,
988}
989/// DeviceSubRequest describes a request for device provided in the
990/// claim.spec.devices.requests\[\].firstAvailable array. Each
991/// is typically a request for a single resource like a device, but can
992/// also ask for several identical devices.
993///
994/// DeviceSubRequest is similar to ExactDeviceRequest, but doesn't expose the
995/// AdminAccess field as that one is only supported when requesting a
996/// specific device.
997#[derive(Clone, PartialEq, ::prost::Message)]
998pub struct DeviceSubRequest {
999    /// Name can be used to reference this subrequest in the list of constraints
1000    /// or the list of configurations for the claim. References must use the
1001    /// format <main request>/<subrequest>.
1002    ///
1003    /// Must be a DNS label.
1004    ///
1005    /// +required
1006    #[prost(string, optional, tag = "1")]
1007    pub name: ::core::option::Option<::prost::alloc::string::String>,
1008    /// DeviceClassName references a specific DeviceClass, which can define
1009    /// additional configuration and selectors to be inherited by this
1010    /// subrequest.
1011    ///
1012    /// A class is required. Which classes are available depends on the cluster.
1013    ///
1014    /// Administrators may use this to restrict which devices may get
1015    /// requested by only installing classes with selectors for permitted
1016    /// devices. If users are free to request anything without restrictions,
1017    /// then administrators can create an empty DeviceClass for users
1018    /// to reference.
1019    ///
1020    /// +required
1021    /// +k8s:required
1022    /// +k8s:format=k8s-long-name
1023    #[prost(string, optional, tag = "2")]
1024    pub device_class_name: ::core::option::Option<::prost::alloc::string::String>,
1025    /// Selectors define criteria which must be satisfied by a specific
1026    /// device in order for that device to be considered for this
1027    /// subrequest. All selectors must be satisfied for a device to be
1028    /// considered.
1029    ///
1030    /// +optional
1031    /// +listType=atomic
1032    /// +k8s:optional
1033    /// +k8s:maxItems=32
1034    #[prost(message, repeated, tag = "3")]
1035    pub selectors: ::prost::alloc::vec::Vec<DeviceSelector>,
1036    /// AllocationMode and its related fields define how devices are allocated
1037    /// to satisfy this subrequest. Supported values are:
1038    ///
1039    /// - ExactCount: This request is for a specific number of devices.
1040    ///    This is the default. The exact number is provided in the
1041    ///    count field.
1042    ///
1043    /// - All: This subrequest is for all of the matching devices in a pool.
1044    ///    Allocation will fail if some devices are already allocated,
1045    ///    unless adminAccess is requested.
1046    ///
1047    /// If AllocationMode is not specified, the default mode is ExactCount. If
1048    /// the mode is ExactCount and count is not specified, the default count is
1049    /// one. Any other subrequests must specify this field.
1050    ///
1051    /// More modes may get added in the future. Clients must refuse to handle
1052    /// requests with unknown modes.
1053    ///
1054    /// +optional
1055    #[prost(string, optional, tag = "4")]
1056    pub allocation_mode: ::core::option::Option<::prost::alloc::string::String>,
1057    /// Count is used only when the count mode is "ExactCount". Must be greater than zero.
1058    /// If AllocationMode is ExactCount and this field is not specified, the default is one.
1059    ///
1060    /// +optional
1061    /// +oneOf=AllocationMode
1062    #[prost(int64, optional, tag = "5")]
1063    pub count: ::core::option::Option<i64>,
1064    /// If specified, the request's tolerations.
1065    ///
1066    /// Tolerations for NoSchedule are required to allocate a
1067    /// device which has a taint with that effect. The same applies
1068    /// to NoExecute.
1069    ///
1070    /// In addition, should any of the allocated devices get tainted
1071    /// with NoExecute after allocation and that effect is not tolerated,
1072    /// then all pods consuming the ResourceClaim get deleted to evict
1073    /// them. The scheduler will not let new pods reserve the claim while
1074    /// it has these tainted devices. Once all pods are evicted, the
1075    /// claim will get deallocated.
1076    ///
1077    /// The maximum number of tolerations is 16.
1078    ///
1079    /// This is an alpha field and requires enabling the DRADeviceTaints
1080    /// feature gate.
1081    ///
1082    /// +optional
1083    /// +listType=atomic
1084    /// +featureGate=DRADeviceTaints
1085    #[prost(message, repeated, tag = "6")]
1086    pub tolerations: ::prost::alloc::vec::Vec<DeviceToleration>,
1087    /// Capacity define resource requirements against each capacity.
1088    ///
1089    /// If this field is unset and the device supports multiple allocations,
1090    /// the default value will be applied to each capacity according to requestPolicy.
1091    /// For the capacity that has no requestPolicy, default is the full capacity value.
1092    ///
1093    /// Applies to each device allocation.
1094    /// If Count > 1,
1095    /// the request fails if there aren't enough devices that meet the requirements.
1096    /// If AllocationMode is set to All,
1097    /// the request fails if there are devices that otherwise match the request,
1098    /// and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.
1099    ///
1100    /// +optional
1101    /// +featureGate=DRAConsumableCapacity
1102    #[prost(message, optional, tag = "7")]
1103    pub capacity: ::core::option::Option<CapacityRequirements>,
1104}
1105/// The device this taint is attached to has the "effect" on
1106/// any claim which does not tolerate the taint and, through the claim,
1107/// to pods using the claim.
1108///
1109/// +protobuf.options.(gogoproto.goproto_stringer)=false
1110#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1111pub struct DeviceTaint {
1112    /// The taint key to be applied to a device.
1113    /// Must be a label name.
1114    ///
1115    /// +required
1116    #[prost(string, optional, tag = "1")]
1117    pub key: ::core::option::Option<::prost::alloc::string::String>,
1118    /// The taint value corresponding to the taint key.
1119    /// Must be a label value.
1120    ///
1121    /// +optional
1122    #[prost(string, optional, tag = "2")]
1123    pub value: ::core::option::Option<::prost::alloc::string::String>,
1124    /// The effect of the taint on claims that do not tolerate the taint
1125    /// and through such claims on the pods using them.
1126    ///
1127    /// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
1128    /// nodes is not valid here. More effects may get added in the future.
1129    /// Consumers must treat unknown effects like None.
1130    ///
1131    /// +required
1132    /// +k8s:required
1133    #[prost(string, optional, tag = "3")]
1134    pub effect: ::core::option::Option<::prost::alloc::string::String>,
1135    /// TimeAdded represents the time at which the taint was added.
1136    /// Added automatically during create or update if not set.
1137    ///
1138    /// +optional
1139    #[prost(message, optional, tag = "4")]
1140    pub time_added: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
1141}
1142/// The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches
1143/// the triple <key,value,effect> using the matching operator <operator>.
1144#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1145pub struct DeviceToleration {
1146    /// Key is the taint key that the toleration applies to. Empty means match all taint keys.
1147    /// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
1148    /// Must be a label name.
1149    ///
1150    /// +optional
1151    /// +k8s:optional
1152    /// +k8s:format=k8s-label-key
1153    #[prost(string, optional, tag = "1")]
1154    pub key: ::core::option::Option<::prost::alloc::string::String>,
1155    /// Operator represents a key's relationship to the value.
1156    /// Valid operators are Exists and Equal. Defaults to Equal.
1157    /// Exists is equivalent to wildcard for value, so that a ResourceClaim can
1158    /// tolerate all taints of a particular category.
1159    ///
1160    /// +optional
1161    /// +default="Equal"
1162    #[prost(string, optional, tag = "2")]
1163    pub operator: ::core::option::Option<::prost::alloc::string::String>,
1164    /// Value is the taint value the toleration matches to.
1165    /// If the operator is Exists, the value must be empty, otherwise just a regular string.
1166    /// Must be a label value.
1167    ///
1168    /// +optional
1169    #[prost(string, optional, tag = "3")]
1170    pub value: ::core::option::Option<::prost::alloc::string::String>,
1171    /// Effect indicates the taint effect to match. Empty means match all taint effects.
1172    /// When specified, allowed values are NoSchedule and NoExecute.
1173    ///
1174    /// +optional
1175    #[prost(string, optional, tag = "4")]
1176    pub effect: ::core::option::Option<::prost::alloc::string::String>,
1177    /// TolerationSeconds represents the period of time the toleration (which must be
1178    /// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
1179    /// it is not set, which means tolerate the taint forever (do not evict). Zero and
1180    /// negative values will be treated as 0 (evict immediately) by the system.
1181    /// If larger than zero, the time when the pod needs to be evicted is calculated as <time when
1182    /// taint was adedd> + <toleration seconds>.
1183    ///
1184    /// +optional
1185    #[prost(int64, optional, tag = "5")]
1186    pub toleration_seconds: ::core::option::Option<i64>,
1187}
1188/// ExactDeviceRequest is a request for one or more identical devices.
1189#[derive(Clone, PartialEq, ::prost::Message)]
1190pub struct ExactDeviceRequest {
1191    /// DeviceClassName references a specific DeviceClass, which can define
1192    /// additional configuration and selectors to be inherited by this
1193    /// request.
1194    ///
1195    /// A DeviceClassName is required.
1196    ///
1197    /// Administrators may use this to restrict which devices may get
1198    /// requested by only installing classes with selectors for permitted
1199    /// devices. If users are free to request anything without restrictions,
1200    /// then administrators can create an empty DeviceClass for users
1201    /// to reference.
1202    ///
1203    /// +required
1204    #[prost(string, optional, tag = "1")]
1205    pub device_class_name: ::core::option::Option<::prost::alloc::string::String>,
1206    /// Selectors define criteria which must be satisfied by a specific
1207    /// device in order for that device to be considered for this
1208    /// request. All selectors must be satisfied for a device to be
1209    /// considered.
1210    ///
1211    /// +optional
1212    /// +listType=atomic
1213    /// +k8s:optional
1214    /// +k8s:maxItems=32
1215    #[prost(message, repeated, tag = "2")]
1216    pub selectors: ::prost::alloc::vec::Vec<DeviceSelector>,
1217    /// AllocationMode and its related fields define how devices are allocated
1218    /// to satisfy this request. Supported values are:
1219    ///
1220    /// - ExactCount: This request is for a specific number of devices.
1221    ///    This is the default. The exact number is provided in the
1222    ///    count field.
1223    ///
1224    /// - All: This request is for all of the matching devices in a pool.
1225    ///    At least one device must exist on the node for the allocation to succeed.
1226    ///    Allocation will fail if some devices are already allocated,
1227    ///    unless adminAccess is requested.
1228    ///
1229    /// If AllocationMode is not specified, the default mode is ExactCount. If
1230    /// the mode is ExactCount and count is not specified, the default count is
1231    /// one. Any other requests must specify this field.
1232    ///
1233    /// More modes may get added in the future. Clients must refuse to handle
1234    /// requests with unknown modes.
1235    ///
1236    /// +optional
1237    /// +k8s:optional
1238    #[prost(string, optional, tag = "3")]
1239    pub allocation_mode: ::core::option::Option<::prost::alloc::string::String>,
1240    /// Count is used only when the count mode is "ExactCount". Must be greater than zero.
1241    /// If AllocationMode is ExactCount and this field is not specified, the default is one.
1242    ///
1243    /// +optional
1244    /// +oneOf=AllocationMode
1245    #[prost(int64, optional, tag = "4")]
1246    pub count: ::core::option::Option<i64>,
1247    /// AdminAccess indicates that this is a claim for administrative access
1248    /// to the device(s). Claims with AdminAccess are expected to be used for
1249    /// monitoring or other management services for a device.  They ignore
1250    /// all ordinary claims to the device with respect to access modes and
1251    /// any resource allocations.
1252    ///
1253    /// This is an alpha field and requires enabling the DRAAdminAccess
1254    /// feature gate. Admin access is disabled if this field is unset or
1255    /// set to false, otherwise it is enabled.
1256    ///
1257    /// +optional
1258    /// +featureGate=DRAAdminAccess
1259    #[prost(bool, optional, tag = "5")]
1260    pub admin_access: ::core::option::Option<bool>,
1261    /// If specified, the request's tolerations.
1262    ///
1263    /// Tolerations for NoSchedule are required to allocate a
1264    /// device which has a taint with that effect. The same applies
1265    /// to NoExecute.
1266    ///
1267    /// In addition, should any of the allocated devices get tainted
1268    /// with NoExecute after allocation and that effect is not tolerated,
1269    /// then all pods consuming the ResourceClaim get deleted to evict
1270    /// them. The scheduler will not let new pods reserve the claim while
1271    /// it has these tainted devices. Once all pods are evicted, the
1272    /// claim will get deallocated.
1273    ///
1274    /// The maximum number of tolerations is 16.
1275    ///
1276    /// This is an alpha field and requires enabling the DRADeviceTaints
1277    /// feature gate.
1278    ///
1279    /// +optional
1280    /// +listType=atomic
1281    /// +featureGate=DRADeviceTaints
1282    #[prost(message, repeated, tag = "6")]
1283    pub tolerations: ::prost::alloc::vec::Vec<DeviceToleration>,
1284    /// Capacity define resource requirements against each capacity.
1285    ///
1286    /// If this field is unset and the device supports multiple allocations,
1287    /// the default value will be applied to each capacity according to requestPolicy.
1288    /// For the capacity that has no requestPolicy, default is the full capacity value.
1289    ///
1290    /// Applies to each device allocation.
1291    /// If Count > 1,
1292    /// the request fails if there aren't enough devices that meet the requirements.
1293    /// If AllocationMode is set to All,
1294    /// the request fails if there are devices that otherwise match the request,
1295    /// and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.
1296    ///
1297    /// +optional
1298    /// +featureGate=DRAConsumableCapacity
1299    #[prost(message, optional, tag = "7")]
1300    pub capacity: ::core::option::Option<CapacityRequirements>,
1301}
1302/// NetworkDeviceData provides network-related details for the allocated device.
1303/// This information may be filled by drivers or other components to configure
1304/// or identify the device within a network context.
1305#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1306pub struct NetworkDeviceData {
1307    /// InterfaceName specifies the name of the network interface associated with
1308    /// the allocated device. This might be the name of a physical or virtual
1309    /// network interface being configured in the pod.
1310    ///
1311    /// Must not be longer than 256 characters.
1312    ///
1313    /// +optional
1314    /// +k8s:optional
1315    /// +k8s:maxLength=256
1316    #[prost(string, optional, tag = "1")]
1317    pub interface_name: ::core::option::Option<::prost::alloc::string::String>,
1318    /// IPs lists the network addresses assigned to the device's network interface.
1319    /// This can include both IPv4 and IPv6 addresses.
1320    /// The IPs are in the CIDR notation, which includes both the address and the
1321    /// associated subnet mask.
1322    /// e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6.
1323    ///
1324    /// +optional
1325    /// +listType=atomic
1326    /// +k8s:optional
1327    /// +k8s:listType=atomic
1328    /// +k8s:unique=set
1329    /// +k8s:maxItems=16
1330    #[prost(string, repeated, tag = "2")]
1331    pub ips: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1332    /// HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
1333    ///
1334    /// Must not be longer than 128 characters.
1335    ///
1336    /// +optional
1337    /// +k8s:optional
1338    /// +k8s:maxLength=128
1339    #[prost(string, optional, tag = "3")]
1340    pub hardware_address: ::core::option::Option<::prost::alloc::string::String>,
1341}
1342/// OpaqueDeviceConfiguration contains configuration parameters for a driver
1343/// in a format defined by the driver vendor.
1344#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1345pub struct OpaqueDeviceConfiguration {
1346    /// Driver is used to determine which kubelet plugin needs
1347    /// to be passed these configuration parameters.
1348    ///
1349    /// An admission policy provided by the driver developer could use this
1350    /// to decide whether it needs to validate them.
1351    ///
1352    /// Must be a DNS subdomain and should end with a DNS domain owned by the
1353    /// vendor of the driver. It should use only lower case characters.
1354    ///
1355    /// +required
1356    /// +k8s:required
1357    /// +k8s:format=k8s-long-name-caseless
1358    #[prost(string, optional, tag = "1")]
1359    pub driver: ::core::option::Option<::prost::alloc::string::String>,
1360    /// Parameters can contain arbitrary data. It is the responsibility of
1361    /// the driver developer to handle validation and versioning. Typically this
1362    /// includes self-identification and a version ("kind" + "apiVersion" for
1363    /// Kubernetes types), with conversion between different versions.
1364    ///
1365    /// The length of the raw data must be smaller or equal to 10 Ki.
1366    ///
1367    /// +required
1368    #[prost(message, optional, tag = "2")]
1369    pub parameters: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
1370}
1371/// ResourceClaim describes a request for access to resources in the cluster,
1372/// for use by workloads. For example, if a workload needs an accelerator device
1373/// with specific properties, this is how that request is expressed. The status
1374/// stanza tracks whether this claim has been satisfied and what specific
1375/// resources have been allocated.
1376///
1377/// This is an alpha type and requires enabling the DynamicResourceAllocation
1378/// feature gate.
1379#[derive(Clone, PartialEq, ::prost::Message)]
1380pub struct ResourceClaim {
1381    /// Standard object metadata
1382    /// +optional
1383    #[prost(message, optional, tag = "1")]
1384    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
1385    /// Spec describes what is being requested and how to configure it.
1386    /// The spec is immutable.
1387    /// +k8s:immutable
1388    #[prost(message, optional, tag = "2")]
1389    pub spec: ::core::option::Option<ResourceClaimSpec>,
1390    /// Status describes whether the claim is ready to use and what has been allocated.
1391    /// +optional
1392    #[prost(message, optional, tag = "3")]
1393    pub status: ::core::option::Option<ResourceClaimStatus>,
1394}
1395/// ResourceClaimConsumerReference contains enough information to let you
1396/// locate the consumer of a ResourceClaim. The user must be a resource in the same
1397/// namespace as the ResourceClaim.
1398#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1399pub struct ResourceClaimConsumerReference {
1400    /// APIGroup is the group for the resource being referenced. It is
1401    /// empty for the core API. This matches the group in the APIVersion
1402    /// that is used when creating the resources.
1403    /// +optional
1404    #[prost(string, optional, tag = "1")]
1405    pub api_group: ::core::option::Option<::prost::alloc::string::String>,
1406    /// Resource is the type of resource being referenced, for example "pods".
1407    /// +required
1408    #[prost(string, optional, tag = "3")]
1409    pub resource: ::core::option::Option<::prost::alloc::string::String>,
1410    /// Name is the name of resource being referenced.
1411    /// +required
1412    #[prost(string, optional, tag = "4")]
1413    pub name: ::core::option::Option<::prost::alloc::string::String>,
1414    /// UID identifies exactly one incarnation of the resource.
1415    /// +required
1416    #[prost(string, optional, tag = "5")]
1417    pub uid: ::core::option::Option<::prost::alloc::string::String>,
1418}
1419/// ResourceClaimList is a collection of claims.
1420#[derive(Clone, PartialEq, ::prost::Message)]
1421pub struct ResourceClaimList {
1422    /// Standard list metadata
1423    /// +optional
1424    #[prost(message, optional, tag = "1")]
1425    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
1426    /// Items is the list of resource claims.
1427    #[prost(message, repeated, tag = "2")]
1428    pub items: ::prost::alloc::vec::Vec<ResourceClaim>,
1429}
1430/// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
1431#[derive(Clone, PartialEq, ::prost::Message)]
1432pub struct ResourceClaimSpec {
1433    /// Devices defines how to request devices.
1434    ///
1435    /// +optional
1436    #[prost(message, optional, tag = "1")]
1437    pub devices: ::core::option::Option<DeviceClaim>,
1438}
1439/// ResourceClaimStatus tracks whether the resource has been allocated and what
1440/// the result of that was.
1441#[derive(Clone, PartialEq, ::prost::Message)]
1442pub struct ResourceClaimStatus {
1443    /// Allocation is set once the claim has been allocated successfully.
1444    ///
1445    /// +optional
1446    /// +k8s:optional
1447    /// +k8s:update=NoModify
1448    #[prost(message, optional, tag = "1")]
1449    pub allocation: ::core::option::Option<AllocationResult>,
1450    /// ReservedFor indicates which entities are currently allowed to use
1451    /// the claim. A Pod which references a ResourceClaim which is not
1452    /// reserved for that Pod will not be started. A claim that is in
1453    /// use or might be in use because it has been reserved must not get
1454    /// deallocated.
1455    ///
1456    /// In a cluster with multiple scheduler instances, two pods might get
1457    /// scheduled concurrently by different schedulers. When they reference
1458    /// the same ResourceClaim which already has reached its maximum number
1459    /// of consumers, only one pod can be scheduled.
1460    ///
1461    /// Both schedulers try to add their pod to the claim.status.reservedFor
1462    /// field, but only the update that reaches the API server first gets
1463    /// stored. The other one fails with an error and the scheduler
1464    /// which issued it knows that it must put the pod back into the queue,
1465    /// waiting for the ResourceClaim to become usable again.
1466    ///
1467    /// There can be at most 256 such reservations. This may get increased in
1468    /// the future, but not reduced.
1469    ///
1470    /// +optional
1471    /// +listType=map
1472    /// +listMapKey=uid
1473    /// +patchStrategy=merge
1474    /// +patchMergeKey=uid
1475    /// +k8s:optional
1476    /// +k8s:listType=map
1477    /// +k8s:listMapKey=uid
1478    /// +k8s:maxItems=256
1479    #[prost(message, repeated, tag = "2")]
1480    pub reserved_for: ::prost::alloc::vec::Vec<ResourceClaimConsumerReference>,
1481    /// Devices contains the status of each device allocated for this
1482    /// claim, as reported by the driver. This can include driver-specific
1483    /// information. Entries are owned by their respective drivers.
1484    ///
1485    /// +optional
1486    /// +k8s:optional
1487    /// +listType=map
1488    /// +listMapKey=driver
1489    /// +listMapKey=device
1490    /// +listMapKey=pool
1491    /// +listMapKey=shareID
1492    /// +featureGate=DRAResourceClaimDeviceStatus
1493    /// +k8s:listType=map
1494    /// +k8s:listMapKey=driver
1495    /// +k8s:listMapKey=device
1496    /// +k8s:listMapKey=pool
1497    /// +k8s:listMapKey=shareID
1498    #[prost(message, repeated, tag = "4")]
1499    pub devices: ::prost::alloc::vec::Vec<AllocatedDeviceStatus>,
1500}
1501/// ResourceClaimTemplate is used to produce ResourceClaim objects.
1502///
1503/// This is an alpha type and requires enabling the DynamicResourceAllocation
1504/// feature gate.
1505#[derive(Clone, PartialEq, ::prost::Message)]
1506pub struct ResourceClaimTemplate {
1507    /// Standard object metadata
1508    /// +optional
1509    #[prost(message, optional, tag = "1")]
1510    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
1511    /// Describes the ResourceClaim that is to be generated.
1512    ///
1513    /// This field is immutable. A ResourceClaim will get created by the
1514    /// control plane for a Pod when needed and then not get updated
1515    /// anymore.
1516    #[prost(message, optional, tag = "2")]
1517    pub spec: ::core::option::Option<ResourceClaimTemplateSpec>,
1518}
1519/// ResourceClaimTemplateList is a collection of claim templates.
1520#[derive(Clone, PartialEq, ::prost::Message)]
1521pub struct ResourceClaimTemplateList {
1522    /// Standard list metadata
1523    /// +optional
1524    #[prost(message, optional, tag = "1")]
1525    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
1526    /// Items is the list of resource claim templates.
1527    #[prost(message, repeated, tag = "2")]
1528    pub items: ::prost::alloc::vec::Vec<ResourceClaimTemplate>,
1529}
1530/// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
1531#[derive(Clone, PartialEq, ::prost::Message)]
1532pub struct ResourceClaimTemplateSpec {
1533    /// ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim
1534    /// when creating it. No other fields are allowed and will be rejected during
1535    /// validation.
1536    /// +optional
1537    #[prost(message, optional, tag = "1")]
1538    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
1539    /// Spec for the ResourceClaim. The entire content is copied unchanged
1540    /// into the ResourceClaim that gets created from this template. The
1541    /// same fields as in a ResourceClaim are also valid here.
1542    #[prost(message, optional, tag = "2")]
1543    pub spec: ::core::option::Option<ResourceClaimSpec>,
1544}
1545/// ResourcePool describes the pool that ResourceSlices belong to.
1546#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1547pub struct ResourcePool {
1548    /// Name is used to identify the pool. For node-local devices, this
1549    /// is often the node name, but this is not required.
1550    ///
1551    /// It must not be longer than 253 characters and must consist of one or more DNS sub-domains
1552    /// separated by slashes. This field is immutable.
1553    ///
1554    /// +required
1555    #[prost(string, optional, tag = "1")]
1556    pub name: ::core::option::Option<::prost::alloc::string::String>,
1557    /// Generation tracks the change in a pool over time. Whenever a driver
1558    /// changes something about one or more of the resources in a pool, it
1559    /// must change the generation in all ResourceSlices which are part of
1560    /// that pool. Consumers of ResourceSlices should only consider
1561    /// resources from the pool with the highest generation number. The
1562    /// generation may be reset by drivers, which should be fine for
1563    /// consumers, assuming that all ResourceSlices in a pool are updated to
1564    /// match or deleted.
1565    ///
1566    /// Combined with ResourceSliceCount, this mechanism enables consumers to
1567    /// detect pools which are comprised of multiple ResourceSlices and are
1568    /// in an incomplete state.
1569    ///
1570    /// +required
1571    #[prost(int64, optional, tag = "2")]
1572    pub generation: ::core::option::Option<i64>,
1573    /// ResourceSliceCount is the total number of ResourceSlices in the pool at this
1574    /// generation number. Must be greater than zero.
1575    ///
1576    /// Consumers can use this to check whether they have seen all ResourceSlices
1577    /// belonging to the same pool.
1578    ///
1579    /// +required
1580    #[prost(int64, optional, tag = "3")]
1581    pub resource_slice_count: ::core::option::Option<i64>,
1582}
1583/// ResourceSlice represents one or more resources in a pool of similar resources,
1584/// managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many
1585/// ResourceSlices comprise a pool is determined by the driver.
1586///
1587/// At the moment, the only supported resources are devices with attributes and capacities.
1588/// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name.
1589/// The ResourceSlice in which a device gets published may change over time. The unique identifier
1590/// for a device is the tuple <driver name>, <pool name>, <device name>.
1591///
1592/// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number
1593/// and updates all ResourceSlices with that new number and new resource definitions. A consumer
1594/// must only use ResourceSlices with the highest generation number and ignore all others.
1595///
1596/// When allocating all resources in a pool matching certain criteria or when
1597/// looking for the best solution among several different alternatives, a
1598/// consumer should check the number of ResourceSlices in a pool (included in
1599/// each ResourceSlice) to determine whether its view of a pool is complete and
1600/// if not, should wait until the driver has completed updating the pool.
1601///
1602/// For resources that are not local to a node, the node name is not set. Instead,
1603/// the driver may use a node selector to specify where the devices are available.
1604///
1605/// This is an alpha type and requires enabling the DynamicResourceAllocation
1606/// feature gate.
1607#[derive(Clone, PartialEq, ::prost::Message)]
1608pub struct ResourceSlice {
1609    /// Standard object metadata
1610    /// +optional
1611    #[prost(message, optional, tag = "1")]
1612    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
1613    /// Contains the information published by the driver.
1614    ///
1615    /// Changing the spec automatically increments the metadata.generation number.
1616    #[prost(message, optional, tag = "2")]
1617    pub spec: ::core::option::Option<ResourceSliceSpec>,
1618}
1619/// ResourceSliceList is a collection of ResourceSlices.
1620#[derive(Clone, PartialEq, ::prost::Message)]
1621pub struct ResourceSliceList {
1622    /// Standard list metadata
1623    /// +optional
1624    #[prost(message, optional, tag = "1")]
1625    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
1626    /// Items is the list of resource ResourceSlices.
1627    #[prost(message, repeated, tag = "2")]
1628    pub items: ::prost::alloc::vec::Vec<ResourceSlice>,
1629}
1630/// ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
1631#[derive(Clone, PartialEq, ::prost::Message)]
1632pub struct ResourceSliceSpec {
1633    /// Driver identifies the DRA driver providing the capacity information.
1634    /// A field selector can be used to list only ResourceSlice
1635    /// objects with a certain driver name.
1636    ///
1637    /// Must be a DNS subdomain and should end with a DNS domain owned by the
1638    /// vendor of the driver. It should use only lower case characters.
1639    /// This field is immutable.
1640    ///
1641    /// +required
1642    #[prost(string, optional, tag = "1")]
1643    pub driver: ::core::option::Option<::prost::alloc::string::String>,
1644    /// Pool describes the pool that this ResourceSlice belongs to.
1645    ///
1646    /// +required
1647    #[prost(message, optional, tag = "2")]
1648    pub pool: ::core::option::Option<ResourcePool>,
1649    /// NodeName identifies the node which provides the resources in this pool.
1650    /// A field selector can be used to list only ResourceSlice
1651    /// objects belonging to a certain node.
1652    ///
1653    /// This field can be used to limit access from nodes to ResourceSlices with
1654    /// the same node name. It also indicates to autoscalers that adding
1655    /// new nodes of the same type as some old node might also make new
1656    /// resources available.
1657    ///
1658    /// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
1659    /// This field is immutable.
1660    ///
1661    /// +optional
1662    /// +oneOf=NodeSelection
1663    #[prost(string, optional, tag = "3")]
1664    pub node_name: ::core::option::Option<::prost::alloc::string::String>,
1665    /// NodeSelector defines which nodes have access to the resources in the pool,
1666    /// when that pool is not limited to a single node.
1667    ///
1668    /// Must use exactly one term.
1669    ///
1670    /// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
1671    ///
1672    /// +optional
1673    /// +oneOf=NodeSelection
1674    #[prost(message, optional, tag = "4")]
1675    pub node_selector: ::core::option::Option<super::super::core::v1::NodeSelector>,
1676    /// AllNodes indicates that all nodes have access to the resources in the pool.
1677    ///
1678    /// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
1679    ///
1680    /// +optional
1681    /// +oneOf=NodeSelection
1682    #[prost(bool, optional, tag = "5")]
1683    pub all_nodes: ::core::option::Option<bool>,
1684    /// Devices lists some or all of the devices in this pool.
1685    ///
1686    /// Must not have more than 128 entries. If any device uses taints or consumes counters the limit is 64.
1687    ///
1688    /// Only one of Devices and SharedCounters can be set in a ResourceSlice.
1689    ///
1690    /// +optional
1691    /// +listType=atomic
1692    /// +k8s:optional
1693    /// +zeroOrOneOf=ResourceSliceType
1694    #[prost(message, repeated, tag = "6")]
1695    pub devices: ::prost::alloc::vec::Vec<Device>,
1696    /// PerDeviceNodeSelection defines whether the access from nodes to
1697    /// resources in the pool is set on the ResourceSlice level or on each
1698    /// device. If it is set to true, every device defined the ResourceSlice
1699    /// must specify this individually.
1700    ///
1701    /// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
1702    ///
1703    /// +optional
1704    /// +oneOf=NodeSelection
1705    /// +featureGate=DRAPartitionableDevices
1706    #[prost(bool, optional, tag = "7")]
1707    pub per_device_node_selection: ::core::option::Option<bool>,
1708    /// SharedCounters defines a list of counter sets, each of which
1709    /// has a name and a list of counters available.
1710    ///
1711    /// The names of the counter sets must be unique in the ResourcePool.
1712    ///
1713    /// Only one of Devices and SharedCounters can be set in a ResourceSlice.
1714    ///
1715    /// The maximum number of counter sets is 8.
1716    ///
1717    /// +optional
1718    /// +k8s:optional
1719    /// +listType=atomic
1720    /// +k8s:listType=atomic
1721    /// +k8s:unique=map
1722    /// +k8s:listMapKey=name
1723    /// +featureGate=DRAPartitionableDevices
1724    /// +zeroOrOneOf=ResourceSliceType
1725    /// +k8s:maxItems=8
1726    #[prost(message, repeated, tag = "8")]
1727    pub shared_counters: ::prost::alloc::vec::Vec<CounterSet>,
1728}
1729
1730impl crate::Resource for DeviceClass {
1731    const API_VERSION: &'static str = "resource.k8s.io/v1beta2";
1732    const GROUP: &'static str = "resource.k8s.io";
1733    const VERSION: &'static str = "v1beta2";
1734    const KIND: &'static str = "DeviceClass";
1735    const URL_PATH_SEGMENT: &'static str = "deviceclasses";
1736    type Scope = crate::ClusterResourceScope;
1737}
1738impl crate::Metadata for DeviceClass {
1739    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1740    fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
1741        self.metadata.as_ref()
1742    }
1743    fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
1744        self.metadata.as_mut()
1745    }
1746}
1747impl crate::HasSpec for DeviceClass {
1748    type Spec = crate::api::resource::v1beta2::DeviceClassSpec;
1749    fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
1750        self.spec.as_ref()
1751    }
1752    fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
1753        self.spec.as_mut()
1754    }
1755}
1756
1757impl crate::Resource for ResourceClaim {
1758    const API_VERSION: &'static str = "resource.k8s.io/v1beta2";
1759    const GROUP: &'static str = "resource.k8s.io";
1760    const VERSION: &'static str = "v1beta2";
1761    const KIND: &'static str = "ResourceClaim";
1762    const URL_PATH_SEGMENT: &'static str = "resourceclaims";
1763    type Scope = crate::NamespaceResourceScope;
1764}
1765impl crate::Metadata for ResourceClaim {
1766    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1767    fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
1768        self.metadata.as_ref()
1769    }
1770    fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
1771        self.metadata.as_mut()
1772    }
1773}
1774impl crate::HasSpec for ResourceClaim {
1775    type Spec = crate::api::resource::v1beta2::ResourceClaimSpec;
1776    fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
1777        self.spec.as_ref()
1778    }
1779    fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
1780        self.spec.as_mut()
1781    }
1782}
1783impl crate::HasStatus for ResourceClaim {
1784    type Status = crate::api::resource::v1beta2::ResourceClaimStatus;
1785    fn status(&self) -> Option<&<Self as crate::HasStatus>::Status> {
1786        self.status.as_ref()
1787    }
1788    fn status_mut(&mut self) -> Option<&mut <Self as crate::HasStatus>::Status> {
1789        self.status.as_mut()
1790    }
1791}
1792
1793impl crate::Resource for ResourceClaimTemplate {
1794    const API_VERSION: &'static str = "resource.k8s.io/v1beta2";
1795    const GROUP: &'static str = "resource.k8s.io";
1796    const VERSION: &'static str = "v1beta2";
1797    const KIND: &'static str = "ResourceClaimTemplate";
1798    const URL_PATH_SEGMENT: &'static str = "resourceclaimtemplates";
1799    type Scope = crate::NamespaceResourceScope;
1800}
1801impl crate::Metadata for ResourceClaimTemplate {
1802    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1803    fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
1804        self.metadata.as_ref()
1805    }
1806    fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
1807        self.metadata.as_mut()
1808    }
1809}
1810impl crate::HasSpec for ResourceClaimTemplate {
1811    type Spec = crate::api::resource::v1beta2::ResourceClaimTemplateSpec;
1812    fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
1813        self.spec.as_ref()
1814    }
1815    fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
1816        self.spec.as_mut()
1817    }
1818}
1819
1820impl crate::Resource for ResourceSlice {
1821    const API_VERSION: &'static str = "resource.k8s.io/v1beta2";
1822    const GROUP: &'static str = "resource.k8s.io";
1823    const VERSION: &'static str = "v1beta2";
1824    const KIND: &'static str = "ResourceSlice";
1825    const URL_PATH_SEGMENT: &'static str = "resourceslices";
1826    type Scope = crate::ClusterResourceScope;
1827}
1828impl crate::Metadata for ResourceSlice {
1829    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1830    fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
1831        self.metadata.as_ref()
1832    }
1833    fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
1834        self.metadata.as_mut()
1835    }
1836}
1837impl crate::HasSpec for ResourceSlice {
1838    type Spec = crate::api::resource::v1beta2::ResourceSliceSpec;
1839    fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
1840        self.spec.as_ref()
1841    }
1842    fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
1843        self.spec.as_mut()
1844    }
1845}