Skip to content

Commit e0a906d

Browse files
pohlyk8s-publishing-bot
authored andcommitted
DRA: new API for 1.31
This is a complete revamp of the original API. Some of the key differences: - refocused on structured parameters and allocating devices - support for constraints across devices - support for allocating "all" or a fixed amount of similar devices in a single request - no class for ResourceClaims, instead individual device requests are associated with a mandatory DeviceClass For the sake of simplicity, optional basic types (ints, strings) where the null value is the default are represented as values in the API types. This makes Go code simpler because it doesn't have to check for nil (consumers) and values can be set directly (producers). The effect is that in protobuf, these fields always get encoded because `opt` only has an effect for pointers. The roundtrip test data for v1.29.0 and v1.30.0 changes because of the new "request" field. This is considered acceptable because the entire `claims` field in the pod spec is still alpha. The implementation is complete enough to bring up the apiserver. Adapting other components follows. Kubernetes-commit: 91d7882e867da25ae8014f679db32b20e35e89b4
1 parent 0030d2c commit e0a906d

File tree

132 files changed

+6361
-7630
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+6361
-7630
lines changed

core/v1/generated.pb.go

+1,036-995
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/v1/generated.proto

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/v1/types.go

+7
Original file line numberDiff line numberDiff line change
@@ -2665,6 +2665,13 @@ type ResourceClaim struct {
26652665
// the Pod where this field is used. It makes that resource available
26662666
// inside a container.
26672667
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
2668+
2669+
// Request is the name chosen for a request in the referenced claim.
2670+
// If empty, everything from the claim is made available, otherwise
2671+
// only the result of this request.
2672+
//
2673+
// +optional
2674+
Request string `json:"request,omitempty" protobuf:"bytes,2,opt,name=request"`
26682675
}
26692676

26702677
const (

core/v1/types_swagger_doc_generated.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2103,8 +2103,9 @@ func (ReplicationControllerStatus) SwaggerDoc() map[string]string {
21032103
}
21042104

21052105
var map_ResourceClaim = map[string]string{
2106-
"": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
2107-
"name": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.",
2106+
"": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
2107+
"name": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.",
2108+
"request": "Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.",
21082109
}
21092110

21102111
func (ResourceClaim) SwaggerDoc() map[string]string {

0 commit comments

Comments
 (0)