@@ -1401,7 +1401,7 @@ type ResourceClaimSpec struct {
1401
1401
//
1402
1402
// +optional
1403
1403
// +listType=atomic
1404
- Config []ConfigurationParameters
1404
+ Config []ClaimConfigurationParameters
1405
1405
1406
1406
// Future extension, ignored by older schedulers. This is fine because scoring
1407
1407
// allows users to define a preference, without making it a hard requirement.
@@ -1556,7 +1556,7 @@ type Constraint struct {
1556
1556
// +optional
1557
1557
RequestNames []string
1558
1558
1559
- // The devices must have this attribute and its value must be the same.
1559
+ // If set, then the devices must have this attribute and its value must be the same.
1560
1560
//
1561
1561
// For example, if you specified "numa.dra.example.com" (a hypothetical example!),
1562
1562
// then only devices in the same NUMA node will be chosen.
@@ -1576,15 +1576,21 @@ type Constraint struct {
1576
1576
// matcher string
1577
1577
}
1578
1578
1579
- // Besides the request name slice, ConfigurationParameters must have one and only one field set.
1580
- type ConfigurationParameters struct {
1581
- // The constraint applies to devices in these requests.
1579
+ type ClaimConfigurationParameters struct {
1580
+ // The configuration applies to devices in these requests.
1582
1581
//
1583
1582
// If empty, the configuration applies to all devices in the claim.
1584
1583
//
1585
1584
// +optional
1586
1585
RequestNames []string
1587
1586
1587
+ ConfigurationParameters // inline
1588
+ }
1589
+
1590
+ // ConfigurationParameters must have one and only one field set. It gets embedded
1591
+ // inline in some other structs which have other fields, so field names must
1592
+ // not conflict with those.
1593
+ type ConfigurationParameters struct {
1588
1594
Opaque *OpaqueConfigurationParameters
1589
1595
}
1590
1596
@@ -1680,12 +1686,19 @@ type DeviceClass struct {
1680
1686
// Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor
1681
1687
// configuration applies to exactly one driver.
1682
1688
//
1683
- // They are passed to the driver, but are not consider while allocating the claim.
1689
+ // They are passed to the driver, but are not considered while allocating the claim.
1684
1690
//
1685
1691
// +optional
1686
1692
// +listType=atomic
1687
- Config []ConfigurationParameters
1693
+ Config []ClassConfigurationParameters
1688
1694
}
1695
+
1696
+ // ClassConfigurationParameters is currently just a wrapper for the common
1697
+ // ConfigurationParameters. This could change, therefore its a separate struct.
1698
+ type ClassConfigurationParameters struct {
1699
+ ConfigurationParameters // inline
1700
+ }
1701
+
1689
1702
```
1690
1703
1691
1704
##### Allocation result
@@ -1750,14 +1763,19 @@ type RequestAllocationResult struct {
1750
1763
DeviceName string
1751
1764
}
1752
1765
1753
- // AllocationConfigurationParameters is a superset of ConfigurationParameters which
1754
- // is used in AllocationResult to track where the parameters came from.
1755
1766
type AllocationConfigurationParameters struct {
1756
1767
// Admins is true if the source of the configuration was a class and thus
1757
1768
// not something that a normal user would have been able to set.
1758
1769
Admin bool
1759
1770
1760
- ConfigurationParameters
1771
+ // The configuration applies to devices in these requests.
1772
+ //
1773
+ // If empty, the configuration applies to all devices in the claim.
1774
+ //
1775
+ // +optional
1776
+ RequestNames []string
1777
+
1778
+ ConfigurationParameters // inline
1761
1779
}
1762
1780
```
1763
1781
@@ -1822,7 +1840,7 @@ type QuotaSpec struct {
1822
1840
// Controls whether devices may get allocated with admin access
1823
1841
// (concurrent with normal use, potentially privileged access permissions
1824
1842
// depending on the driver). If multiple quota objects exist and at least one
1825
- // has a true value, access will be allowed. The default to deny such access.
1843
+ // has a true value, access will be allowed. The default is to deny such access.
1826
1844
//
1827
1845
// +optional
1828
1846
AllowAdminAccess bool ` json:"allowManagementAccess,omitempty"`
0 commit comments