@@ -568,7 +568,7 @@ spec:
568
568
version: 11.1.42
569
569
powerSavingSupported:
570
570
bool: true
571
- dra.k8s .io/pciRoot: # a fictional standardized attribute, not actually part of this KEP
571
+ resource.kubernetes .io/pcieRoot:
572
572
string: pci-root-0
573
573
capacity:
574
574
memory: 16Gi
@@ -578,10 +578,14 @@ Compared to labels, attributes have values of exactly one type. Quantities are d
578
578
in the separate `capacity` map. As described later on, both sets can be used in CEL expressions to select a
579
579
specific resource for allocation on a node.
580
580
581
- To avoid any future conflicts, we reserve any attributes with the ".k8s.io/" domain prefix
582
- for future use and standardization by Kubernetes. This could be used to describe
583
- topology across resources from different vendors, for example, but this is out-
584
- of-scope for now.
581
+ We are reserving the `kubernetes.io/` domain (and subdomains) prefix for
582
+ attributes and capacities for standardization by the Kubernetes project. This
583
+ reservation allows us to define common attributes that can describe hardware
584
+ characteristics across resources from different vendors. Currently, we are
585
+ defining one such standard attribute : ` resource.kubernetes.io/pcieRoot` . Details
586
+ on its meaning and how it should be exposed by DRA drivers are available in the
587
+ [API design section under ResourceSlice's](#resourceslice) QualifiedName
588
+ definition.
585
589
586
590
**Note:** If a driver needs to remove a device or change its attributes,
587
591
then there is a risk that a claim gets allocated based on the old
@@ -594,6 +598,19 @@ would allow us to delete the pod and trying again with a new one, but is not don
594
598
at the moment because admission checks cannot be retried if a check finds
595
599
a transient problem.
596
600
601
+ **Note:** The immediate motivation for standardizing attributes largely stems
602
+ from the current behavior of the `MatchAttribute` constraint, which relies on
603
+ exact value matching. While this KEP provides a solution for many cross-driver
604
+ alignment needs, a more flexible long-term solution is envisioned with
605
+ [KEP-5254 : DRA support for MatchExpression
606
+ constraints](https://github.com/kubernetes/enhancements/issues/5254) (a
607
+ work-in-progress). That proposal aims to introduce a `MatchExpression`
608
+ constraint, allowing devices to be evaluated against CEL expressions, which will
609
+ enable more complex and dynamic selection criteria. However, solving this
610
+ critical alignment problem today is essential for latency-sensitive workloads.
611
+ Standardizing attributes helps achieve this without introducing any conflicts
612
+ with the future capabilities of KEP-5254.
613
+
597
614
# ## Using structured parameters
598
615
599
616
A ResourceClaim is a request to allocate one or more devices. Each request in a
@@ -1212,6 +1229,23 @@ const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32
1212
1229
// domain prefix are assumed to be part of the driver's domain. Attributes
1213
1230
// or capacities defined by 3rd parties must include the domain prefix.
1214
1231
//
1232
+ // The Kubernetes project reserves the "kubernetes.io/" domain prefix for
1233
+ // standardizing attributes and capacities. DRA drivers **SHOULD** use these
1234
+ // standardized names if they define a characteristic of a device that matches
1235
+ // the intent of a standard attribute (or capacity) name. This ensures
1236
+ // consistency and interoperability across different drivers when conveying the
1237
+ // same idea.
1238
+ //
1239
+ // Currently, the following standard attributes have been defined:
1240
+ //
1241
+ // 1. ` resource.kubernetes.io/pcieRoot`: A string value in the format
1242
+ // `pci<domain>:<bus>`, referring to a PCIe (Peripheral Component
1243
+ // Interconnect Express) Root Complex. This attribute can be used to
1244
+ // identify devices that share the same PCIe Root Complex. DRA drivers MAY
1245
+ // determine this value by inspecting the hierarchical path of the device's
1246
+ // entry in sysfs (e.g., `/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0`),
1247
+ // where the `pci<domain>:<bus>` segment at the beginning of the real path
1248
+ // identifies the Root Complex (e.g., `pci0000:00`).
1215
1249
//
1216
1250
// The maximum length for the DNS subdomain is 63 characters (same as
1217
1251
// for driver names) and the maximum length of the C identifier
0 commit comments