updated vendor

This commit is contained in:
2026-06-16 08:02:19 +02:00
parent 2f7f99d3f0
commit 77299d0c64
1283 changed files with 67302 additions and 208958 deletions
+262 -122
View File
@@ -65,8 +65,8 @@ message AllocatedDeviceStatus {
//
// +optional
// +featureGate=DRAConsumableCapacity
// +k8s:optional
// +k8s:format=k8s-uuid
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-uuid
optional string shareID = 7;
// Conditions contains the latest observation of the device's state.
@@ -90,7 +90,7 @@ message AllocatedDeviceStatus {
// NetworkData contains network-related information specific to the device.
//
// +optional
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
optional NetworkDeviceData networkData = 6;
}
@@ -110,7 +110,7 @@ message AllocationResult {
// AllocationTimestamp stores the time when the resources were allocated.
// This field is not guaranteed to be set, in which case that time is unknown.
//
// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// feature gate.
//
// +optional
@@ -126,6 +126,7 @@ message BasicDevice {
// The maximum number of attributes and capacities combined is 32.
//
// +optional
// +k8s:alpha(since: "1.36")=+k8s:optional
map<string, DeviceAttribute> attributes = 1;
// Capacity defines the set of capacities for this device.
@@ -146,13 +147,13 @@ message BasicDevice {
// device is 2.
//
// +optional
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +listType=atomic
// +k8s:listType=atomic
// +k8s:unique=map
// +k8s:listMapKey=counterSet
// +k8s:alpha(since: "1.36")=+k8s:unique=map
// +k8s:alpha(since: "1.36")=+k8s:listMapKey=counterSet
// +featureGate=DRAPartitionableDevices
// +k8s:maxItems=2
// +k8s:alpha(since: "1.36")=+k8s:maxItems=2
repeated DeviceCounterConsumption consumesCounters = 3;
// NodeName identifies the node where the device is available.
@@ -192,12 +193,13 @@ message BasicDevice {
// any device in a ResourceSlice, then the maximum number of
// allowed devices per ResourceSlice is 64 instead of 128.
//
// This is an alpha field and requires enabling the DRADeviceTaints
// This is a beta field and requires enabling the DRADeviceTaints
// feature gate.
//
// +optional
// +listType=atomic
// +featureGate=DRADeviceTaints
// +k8s:alpha(since: "1.36")=+k8s:optional
repeated DeviceTaint taints = 7;
// BindsToNode indicates if the usage of an allocation involving this device
@@ -205,7 +207,7 @@ message BasicDevice {
// If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector
// to match the node where the allocation was made.
//
// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// feature gates.
//
// +optional
@@ -221,14 +223,14 @@ message BasicDevice {
//
// The conditions must be a valid condition type string.
//
// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// feature gates.
//
// +optional
// +listType=atomic
// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
// +k8s:optional
// +k8s:maxItems=4
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=4
repeated string bindingConditions = 9;
// BindingFailureConditions defines the conditions for binding failure.
@@ -239,14 +241,14 @@ message BasicDevice {
//
// The conditions must be a valid condition type string.
//
// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// feature gates.
//
// +optional
// +listType=atomic
// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
// +k8s:optional
// +k8s:maxItems=4
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=4
repeated string bindingFailureConditions = 10;
// AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests.
@@ -257,6 +259,21 @@ message BasicDevice {
// +optional
// +featureGate=DRAConsumableCapacity
optional bool allowMultipleAllocations = 11;
// NodeAllocatableResourceMappings defines the mapping of node resources
// that are managed by the DRA driver exposing this device. This includes resources currently
// reported in v1.Node `status.allocatable` that are not extended resources
// (see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#extended-resources).
// Examples include "cpu", "memory", "ephemeral-storage", and hugepages.
// In addition to standard requests made through the Pod `spec`, these resources
// can also be requested through claims and allocated by the DRA driver.
// For example, a CPU DRA driver might allocate exclusive CPUs or auxiliary node memory
// dependencies of an accelerator device.
// The keys of this map are the node-allocatable resource names (e.g., "cpu", "memory").
// Extended resource names are not permitted as keys.
// +optional
// +featureGate=DRANodeAllocatableResources
map<string, NodeAllocatableResourceMapping> nodeAllocatableResourceMappings = 12;
}
// CELDeviceSelector contains a CEL expression for selecting a device.
@@ -310,6 +327,14 @@ message CELDeviceSelector {
//
// cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
//
// When the DRAListTypeAttributes feature gate is enabled,
// the includes() helper is available and it can work for both scalar
// and list-type attributes. It was introduced to support smooth migration
// from scalar attributes to list-type attributes while keeping
// CEL expressions simple. For example:
//
// device.attributes["dra.example.com"].models.includes("some-model")
//
// The length of the expression must be smaller or equal to 10 Ki. The
// cost of evaluating it is also limited based on the estimated number
// of logical steps.
@@ -448,8 +473,8 @@ message CounterSet {
// It must be a DNS label.
//
// +required
// +k8s:required
// +k8s:format=k8s-short-name
// +k8s:alpha(since: "1.36")=+k8s:required
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-short-name
optional string name = 1;
// Counters defines the set of counters for this CounterSet
@@ -458,6 +483,8 @@ message CounterSet {
// The maximum number of counters is 32.
//
// +required
// +k8s:alpha(since: "1.36")=+k8s:required
// +k8s:alpha(since: "1.36")=+k8s:eachKey=+k8s:format=k8s-short-name
map<string, Counter> counters = 2;
}
@@ -474,6 +501,7 @@ message Device {
//
// +optional
// +oneOf=deviceType
// +k8s:alpha(since: "1.36")=+k8s:optional
optional BasicDevice basic = 2;
}
@@ -484,7 +512,7 @@ message DeviceAllocationConfiguration {
// or from a claim.
//
// +required
// +k8s:required
// +k8s:alpha(since: "1.36")=+k8s:required
optional string source = 1;
// Requests lists the names of requests where the configuration applies.
@@ -496,10 +524,10 @@ message DeviceAllocationConfiguration {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:listType=atomic
// +k8s:unique=set
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:unique=set
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated string requests = 2;
optional DeviceConfiguration deviceConfiguration = 3;
@@ -511,8 +539,8 @@ message DeviceAllocationResult {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated DeviceRequestAllocationResult results = 1;
// This field is a combination of all the claim and class configuration parameters.
@@ -525,8 +553,8 @@ message DeviceAllocationResult {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:maxItems=64
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=64
repeated DeviceAllocationConfiguration config = 2;
}
@@ -535,31 +563,75 @@ message DeviceAttribute {
// IntValue is a number.
//
// +optional
// +k8s:optional
// +k8s:unionMember
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:unionMember
optional int64 int = 2;
// BoolValue is a true/false value.
//
// +optional
// +k8s:optional
// +k8s:unionMember
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:unionMember
optional bool bool = 3;
// StringValue is a string. Must not be longer than 64 characters.
//
// +optional
// +k8s:optional
// +k8s:unionMember
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:unionMember
optional string string = 4;
// VersionValue is a semantic version according to semver.org spec 2.0.0.
// Must not be longer than 64 characters.
//
// +optional
// +k8s:optional
// +k8s:unionMember
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:unionMember
optional string version = 5;
// IntValues is a non-empty list of numbers.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
//
// +optional
// +listType=atomic
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:unionMember
// +featureGate=DRAListTypeAttributes
repeated int64 ints = 6;
// BoolValues is a non-empty list of true/false values.
//
// +optional
// +listType=atomic
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:unionMember
// +featureGate=DRAListTypeAttributes
repeated bool bools = 7;
// StringValues is a non-empty list of strings.
// Each string must not be longer than 64 characters.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
//
// +optional
// +listType=atomic
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:unionMember
// +featureGate=DRAListTypeAttributes
repeated string strings = 8;
// VersionValues is a non-empty list of semantic versions according to semver.org spec 2.0.0.
// Each version string must not be longer than 64 characters.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
//
// +optional
// +listType=atomic
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:unionMember
// +featureGate=DRAListTypeAttributes
repeated string versions = 9;
}
// DeviceCapacity describes a quantity associated with a device.
@@ -595,11 +667,11 @@ message DeviceClaim {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:listType=atomic
// +k8s:unique=map
// +k8s:listMapKey=name
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:unique=map
// +k8s:alpha(since: "1.36")=+k8s:listMapKey=name
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated DeviceRequest requests = 1;
// These constraints must be satisfied by the set of devices that get
@@ -607,8 +679,8 @@ message DeviceClaim {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated DeviceConstraint constraints = 2;
// This field holds configuration for multiple potential drivers which
@@ -617,8 +689,8 @@ message DeviceClaim {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated DeviceClaimConfiguration config = 3;
}
@@ -633,10 +705,10 @@ message DeviceClaimConfiguration {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:listType=atomic
// +k8s:unique=set
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:unique=set
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated string requests = 1;
optional DeviceConfiguration deviceConfiguration = 2;
@@ -652,8 +724,8 @@ message DeviceClaimConfiguration {
message DeviceClass {
// Standard object metadata
// +optional
// +k8s:subfield(name)=+k8s:optional
// +k8s:subfield(name)=+k8s:format=k8s-long-name
// +k8s:alpha(since: "1.36")=+k8s:subfield(name)=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:subfield(name)=+k8s:format=k8s-long-name
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec defines what can be allocated and how to configure it.
@@ -689,8 +761,8 @@ message DeviceClassSpec {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated DeviceSelector selectors = 1;
// Config defines configuration parameters that apply to each device that is claimed via this class.
@@ -701,8 +773,8 @@ message DeviceClassSpec {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated DeviceClassConfiguration config = 2;
// ExtendedResourceName is the extended resource name for the devices of this class.
@@ -714,11 +786,11 @@ message DeviceClassSpec {
// If two classes are created at the same time, then the name of the class
// lexicographically sorted first is picked.
//
// This is an alpha field.
// This is a beta field.
// +optional
// +featureGate=DRAExtendedResource
// +k8s:optional
// +k8s:format=k8s-extended-resource-name
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-extended-resource-name
optional string extendedResourceName = 4;
}
@@ -730,7 +802,7 @@ message DeviceConfiguration {
//
// +optional
// +oneOf=ConfigurationType
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
optional OpaqueDeviceConfiguration opaque = 1;
}
@@ -748,10 +820,10 @@ message DeviceConstraint {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:listType=atomic
// +k8s:unique=set
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:unique=set
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated string requests = 1;
// MatchAttribute requires that all devices in question have this
@@ -765,17 +837,27 @@ message DeviceConstraint {
// its specification, but if one device doesn't, then it also will not be
// chosen.
//
// When the DRAListTypeAttributes feature gate is enabled, comparison uses
// set semantics(i.e., element order and duplicates are ignored): list-valued attributes
// match when the intersection across all devices is non-empty.
// Scalar values are treated as singleton sets for backward compatibility.
//
// Must include the domain qualifier.
//
// +optional
// +oneOf=ConstraintType
// +k8s:optional
// +k8s:format=k8s-resource-fully-qualified-name
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-resource-fully-qualified-name
optional string matchAttribute = 2;
// DistinctAttribute requires that all devices in question have this
// attribute and that its type and value are unique across those devices.
//
// When the DRAListTypeAttributes feature gate is enabled, comparison uses
// set semantics (i.e., element order and duplicates are ignored):
// list-valued attributes must be pairwise disjoint across devices.
// Scalar values are treated as singleton sets for backward compatibility.
//
// This acts as the inverse of MatchAttribute.
//
// This constraint is used to avoid allocating multiple requests to the same device
@@ -797,8 +879,8 @@ message DeviceCounterConsumption {
// counters defined will be consumed.
//
// +required
// +k8s:required
// +k8s:format=k8s-short-name
// +k8s:alpha(since: "1.36")=+k8s:required
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-short-name
optional string counterSet = 1;
// Counters defines the counters that will be consumed by the device.
@@ -806,6 +888,8 @@ message DeviceCounterConsumption {
// The maximum number of counters is 32.
//
// +required
// +k8s:alpha(since: "1.36")=+k8s:required
// +k8s:alpha(since: "1.36")=+k8s:eachKey=+k8s:format=k8s-short-name
map<string, Counter> counters = 2;
}
@@ -851,8 +935,8 @@ message DeviceRequest {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
repeated DeviceSelector selectors = 3;
// AllocationMode and its related fields define how devices are allocated
@@ -878,7 +962,7 @@ message DeviceRequest {
// requests with unknown modes.
//
// +optional
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
optional string allocationMode = 4;
// Count is used only when the count mode is "ExactCount". Must be greater than zero.
@@ -928,11 +1012,11 @@ message DeviceRequest {
// +oneOf=deviceRequestType
// +listType=atomic
// +featureGate=DRAPrioritizedList
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:listType=atomic
// +k8s:unique=map
// +k8s:listMapKey=name
// +k8s:maxItems=8
// +k8s:alpha(since: "1.36")=+k8s:unique=map
// +k8s:alpha(since: "1.36")=+k8s:listMapKey=name
// +k8s:alpha(since: "1.36")=+k8s:maxItems=8
repeated DeviceSubRequest firstAvailable = 7;
// If specified, the request's tolerations.
@@ -953,12 +1037,13 @@ message DeviceRequest {
// This field can only be set when deviceClassName is set and no subrequests
// are specified in the firstAvailable list.
//
// This is an alpha field and requires enabling the DRADeviceTaints
// This is a beta field and requires enabling the DRADeviceTaints
// feature gate.
//
// +optional
// +listType=atomic
// +featureGate=DRADeviceTaints
// +k8s:alpha(since: "1.36")=+k8s:optional
repeated DeviceToleration tolerations = 8;
// Capacity define resource requirements against each capacity.
@@ -1000,8 +1085,9 @@ message DeviceRequestAllocationResult {
// vendor of the driver. It should use only lower case characters.
//
// +required
// +k8s:format=k8s-long-name-caseless
// +k8s:required
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-long-name-caseless
// +k8s:alpha(since: "1.36")=+k8s:required
// +k8s:alpha(since: "1.36")=+k8s:maxLength=63
optional string driver = 2;
// This name together with the driver name and the device name field
@@ -1011,8 +1097,8 @@ message DeviceRequestAllocationResult {
// DNS sub-domains separated by slashes.
//
// +required
// +k8s:required
// +k8s:format=k8s-resource-pool-name
// +k8s:alpha(since: "1.36")=+k8s:required
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-resource-pool-name
optional string pool = 3;
// Device references one device instance via its name in the driver's
@@ -1038,40 +1124,40 @@ message DeviceRequestAllocationResult {
//
// The maximum number of tolerations is 16.
//
// This is an alpha field and requires enabling the DRADeviceTaints
// This is a beta field and requires enabling the DRADeviceTaints
// feature gate.
//
// +optional
// +listType=atomic
// +featureGate=DRADeviceTaints
// +k8s:optional
// +k8s:maxItems=16
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=16
repeated DeviceToleration tolerations = 6;
// BindingConditions contains a copy of the BindingConditions
// from the corresponding ResourceSlice at the time of allocation.
//
// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// feature gates.
//
// +optional
// +listType=atomic
// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
// +k8s:optional
// +k8s:maxItems=4
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=4
repeated string bindingConditions = 7;
// BindingFailureConditions contains a copy of the BindingFailureConditions
// from the corresponding ResourceSlice at the time of allocation.
//
// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
// feature gates.
//
// +optional
// +listType=atomic
// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
// +k8s:optional
// +k8s:maxItems=4
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxItems=4
repeated string bindingFailureConditions = 8;
// ShareID uniquely identifies an individual allocation share of the device,
@@ -1081,8 +1167,8 @@ message DeviceRequestAllocationResult {
//
// +optional
// +featureGate=DRAConsumableCapacity
// +k8s:optional
// +k8s:format=k8s-uuid
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-uuid
optional string shareID = 9;
// ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request.
@@ -1140,8 +1226,8 @@ message DeviceSubRequest {
// to reference.
//
// +required
// +k8s:required
// +k8s:format=k8s-long-name
// +k8s:alpha(since: "1.36")=+k8s:required
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-long-name
optional string deviceClassName = 2;
// Selectors define criteria which must be satisfied by a specific
@@ -1151,7 +1237,8 @@ message DeviceSubRequest {
//
// +optional
// +listType=atomic
// +k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
// +k8s:alpha(since: "1.36")=+k8s:optional
repeated DeviceSelector selectors = 3;
// AllocationMode and its related fields define how devices are allocated
@@ -1173,6 +1260,7 @@ message DeviceSubRequest {
// requests with unknown modes.
//
// +optional
// +k8s:alpha(since: "1.36")=+k8s:optional
optional string allocationMode = 4;
// Count is used only when the count mode is "ExactCount". Must be greater than zero.
@@ -1197,12 +1285,13 @@ message DeviceSubRequest {
//
// The maximum number of tolerations is 16.
//
// This is an alpha field and requires enabling the DRADeviceTaints
// This is a beta field and requires enabling the DRADeviceTaints
// feature gate.
//
// +optional
// +listType=atomic
// +featureGate=DRADeviceTaints
// +k8s:alpha(since: "1.36")=+k8s:optional
repeated DeviceToleration tolerations = 7;
// Capacity define resource requirements against each capacity.
@@ -1249,12 +1338,21 @@ message DeviceTaint {
// Consumers must treat unknown effects like None.
//
// +required
// +k8s:required
// +k8s:alpha(since: "1.36")=+k8s:required
optional string effect = 3;
// TimeAdded represents the time at which the taint was added.
// TimeAdded represents the time at which the taint was added or
// (only in a DeviceTaintRule) the effect was modified.
// Added automatically during create or update if not set.
//
// In addition, in a DeviceTaintRule a value provided during
// an update gets replaced with the current time if the provided
// value is the same as the old one and the new effect is different.
// Changing the key and/or value while keeping the effect unchanged
// is possible and does not update the time stamp because the eviction
// which uses it is either already started (NoExecute) or
// not started yet (NoEffect, NoSchedule).
//
// +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4;
}
@@ -1267,8 +1365,8 @@ message DeviceToleration {
// Must be a label name.
//
// +optional
// +k8s:optional
// +k8s:format=k8s-label-key
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-label-key
optional string key = 1;
// Operator represents a key's relationship to the value.
@@ -1278,6 +1376,7 @@ message DeviceToleration {
//
// +optional
// +default="Equal"
// +k8s:alpha(since: "1.36")=+k8s:optional
optional string operator = 2;
// Value is the taint value the toleration matches to.
@@ -1291,6 +1390,7 @@ message DeviceToleration {
// When specified, allowed values are NoSchedule and NoExecute.
//
// +optional
// +k8s:alpha(since: "1.36")=+k8s:optional
optional string effect = 4;
// TolerationSeconds represents the period of time the toleration (which must be
@@ -1312,11 +1412,11 @@ message NetworkDeviceData {
// the allocated device. This might be the name of a physical or virtual
// network interface being configured in the pod.
//
// Must not be longer than 256 characters.
// Must not be longer than 256 bytes.
//
// +optional
// +k8s:optional
// +k8s:maxLength=256
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxBytes=256
optional string interfaceName = 1;
// IPs lists the network addresses assigned to the device's network interface.
@@ -1329,22 +1429,60 @@ message NetworkDeviceData {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:listType=atomic
// +k8s:unique=set
// +k8s:maxItems=16
// +k8s:alpha(since: "1.36")=+k8s:unique=set
// +k8s:alpha(since: "1.36")=+k8s:maxItems=16
repeated string ips = 2;
// HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
//
// Must not be longer than 128 characters.
// Must not be longer than 128 bytes.
//
// +optional
// +k8s:optional
// +k8s:maxLength=128
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:maxBytes=128
optional string hardwareAddress = 3;
}
// NodeAllocatableResourceMapping defines the translation between the DRA device/capacity
// units requested to the corresponding quantity of the node allocatable resource.
message NodeAllocatableResourceMapping {
// CapacityKey references a capacity name defined as a key in the
// `spec.devices[*].capacity` map. When this field is set, the value associated with
// this key in the `status.allocation.devices.results[*].consumedCapacity` map
// (for a specific claim allocation) determines the base quantity for
// the node allocatable resource. If `allocationMultiplier` is also set, it is
// multiplied with the base quantity.
// For example, if `spec.devices[*].capacity` has an entry "dra.example.com/memory": "128Gi",
// and this field is set to "dra.example.com/memory", then for a claim allocation
// that consumes { "dra.example.com/memory": "4Gi" } the base quantity for the
// node allocatable resource mapping will be "4Gi", and `allocationMultiplier` should
// be omitted or set to "1".
// +optional
optional string capacityKey = 1;
// AllocationMultiplier is used as a multiplier for the allocated device count or the allocated capacity in the claim.
// It defaults to 1 if not specified. How the field is used also depends on whether `capacityKey` is set.
// 1. If `capacityKey` is NOT set: `allocationMultiplier` multiplies the device count allocated to the claim.
// a. A DRA driver representing each CPU core as a device would have
// {ResourceName: "cpu", allocationMultiplier: "2"} in its
// `nodeAllocatableResourceMappings`. If 4 devices are allocated to the claim,
// 4 * 2 CPUs would be considered as allocated and subtracted from the node's capacity.
// b. A GPU device that needs additional node memory per GPU allocation would
// have {ResourceName: "memory", allocationMultiplier: "2Gi"}. Each allocated
// GPU device instance of this type will account for 2Gi of memory.
//
// 2. If `capacityKey` IS set: `allocationMultiplier` is multiplied by the amount of that capacity consumed.
// The final node allocatable resource amount is `consumedCapacity[capacityKey]` * `allocationMultiplier`.
// For example, if a Device's capacity "dra.example.com/cores" is consumed,
// and each "core" provides 2 "cpu"s, the mapping would be:
// {ResourceName: "cpu", capacityKey: "dra.example.com/cores", allocationMultiplier: "2"}.
// If a claim consumes 8 "dra.example.com/cores", the CPU footprint is 8 * 2 = 16.
// +optional
optional .k8s.io.apimachinery.pkg.api.resource.Quantity allocationMultiplier = 2;
}
// OpaqueDeviceConfiguration contains configuration parameters for a driver
// in a format defined by the driver vendor.
message OpaqueDeviceConfiguration {
@@ -1358,8 +1496,9 @@ message OpaqueDeviceConfiguration {
// vendor of the driver. It should use only lower case characters.
//
// +required
// +k8s:required
// +k8s:format=k8s-long-name-caseless
// +k8s:alpha(since: "1.36")=+k8s:required
// +k8s:alpha(since: "1.36")=+k8s:maxLength=63
// +k8s:alpha(since: "1.36")=+k8s:format=k8s-long-name-caseless
optional string driver = 1;
// Parameters can contain arbitrary data. It is the responsibility of
@@ -1388,7 +1527,7 @@ message ResourceClaim {
// Spec describes what is being requested and how to configure it.
// The spec is immutable.
// +k8s:immutable
// +k8s:alpha(since: "1.36")=+k8s:immutable
optional ResourceClaimSpec spec = 2;
// Status describes whether the claim is ready to use and what has been allocated.
@@ -1443,8 +1582,8 @@ message ResourceClaimStatus {
// Allocation is set once the claim has been allocated successfully.
//
// +optional
// +k8s:optional
// +k8s:update=NoModify
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:update=NoModify
optional AllocationResult allocation = 1;
// ReservedFor indicates which entities are currently allowed to use
@@ -1472,10 +1611,10 @@ message ResourceClaimStatus {
// +listMapKey=uid
// +patchStrategy=merge
// +patchMergeKey=uid
// +k8s:optional
// +k8s:listType=map
// +k8s:listMapKey=uid
// +k8s:maxItems=256
// +k8s:alpha(since: "1.36")=+k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:listType=map
// +k8s:alpha(since: "1.36")=+k8s:listMapKey=uid
// +k8s:alpha(since: "1.36")=+k8s:maxItems=256
repeated ResourceClaimConsumerReference reservedFor = 2;
// Devices contains the status of each device allocated for this
@@ -1483,18 +1622,18 @@ message ResourceClaimStatus {
// information. Entries are owned by their respective drivers.
//
// +optional
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +listType=map
// +listMapKey=driver
// +listMapKey=device
// +listMapKey=pool
// +listMapKey=shareID
// +featureGate=DRAResourceClaimDeviceStatus
// +k8s:listType=map
// +k8s:listMapKey=driver
// +k8s:listMapKey=device
// +k8s:listMapKey=pool
// +k8s:listMapKey=shareID
// +k8s:alpha(since: "1.36")=+k8s:listType=map
// +k8s:alpha(since: "1.36")=+k8s:listMapKey=driver
// +k8s:alpha(since: "1.36")=+k8s:listMapKey=device
// +k8s:alpha(since: "1.36")=+k8s:listMapKey=pool
// +k8s:alpha(since: "1.36")=+k8s:listMapKey=shareID
repeated AllocatedDeviceStatus devices = 4;
}
@@ -1608,6 +1747,7 @@ message ResourceSlice {
// Contains the information published by the driver.
//
// Changing the spec automatically increments the metadata.generation number.
// +required
optional ResourceSliceSpec spec = 2;
}
@@ -1682,7 +1822,7 @@ message ResourceSliceSpec {
//
// +optional
// +listType=atomic
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +zeroOrOneOf=ResourceSliceType
repeated Device devices = 6;
@@ -1708,14 +1848,14 @@ message ResourceSliceSpec {
// The maximum number of counter sets is 8.
//
// +optional
// +k8s:optional
// +k8s:alpha(since: "1.36")=+k8s:optional
// +listType=atomic
// +k8s:listType=atomic
// +k8s:unique=map
// +k8s:listMapKey=name
// +k8s:alpha(since: "1.36")=+k8s:unique=map
// +k8s:alpha(since: "1.36")=+k8s:listMapKey=name
// +featureGate=DRAPartitionableDevices
// +zeroOrOneOf=ResourceSliceType
// +k8s:maxItems=8
// +k8s:alpha(since: "1.36")=+k8s:maxItems=8
repeated CounterSet sharedCounters = 8;
}