@@ -1266,9 +1266,10 @@ type ResourceClaimStatus struct {
1266
1266
// doesn't support dynamic resource allocation or the feature was
1267
1267
// disabled.
1268
1268
//
1269
- // The maximum size is 32. This is an artificial limit to prevent
1269
+ // The maximum size is 32 (= [ResourceClaimReservedForMaxSize]).
1270
+ // This is an artificial limit to prevent
1270
1271
// a completely unbounded field in the API.
1271
- ReservedFor []metav1.OwnerReference
1272
+ ReservedFor []ResourceClaimUserReference
1272
1273
1273
1274
<<[UNRESOLVED pohly]>>
1274
1275
We will have to discuss use cases and real resource drivers that
@@ -1281,6 +1282,10 @@ type ResourceClaimStatus struct {
1281
1282
<<[/UNRESOLVED]>>
1282
1283
}
1283
1284
1285
+ // ReservedForMaxSize is maximum number of entries in
1286
+ // [ResourceClaimStatus.ReservedFor].
1287
+ const ResourceClaimReservedForMaxSize = 32
1288
+
1284
1289
// AllocationResult contains attributed of an allocated resource.
1285
1290
type AllocationResult struct {
1286
1291
// ResourceHandle contains arbitrary data returned by the driver after a
@@ -1579,6 +1584,22 @@ type ResourceClaimParametersReference struct {
1579
1584
// Name is the name of resource being referenced
1580
1585
Name string
1581
1586
}
1587
+
1588
+ // ResourceClaimParametersReference contains enough information to let you
1589
+ // locate the user of a ResourceClaim. The user must be a resource in the same
1590
+ // namespace as the ResourceClaim.
1591
+ type ResourceClaimUserReference struct {
1592
+ // APIGroup is the API group for the resource being referenced.
1593
+ // If Group is empty, the specified Kind must be in the core API group.
1594
+ // For any other third-party types, APIGroup is required.
1595
+ APIGroup string
1596
+ // Resource is the type of resource being referenced, for example "pods".
1597
+ Resource string
1598
+ // Name is the name of resource being referenced.
1599
+ Name string
1600
+ // UID identifies exactly one incarnation of the resource.
1601
+ UID types.UID
1602
+ }
1582
1603
```
1583
1604
1584
1605
### kube-controller-manager
0 commit comments