Commit Graph

23 Commits

Author SHA1 Message Date
Patrick Ohly
d267bacbd5 DRA API: remove obsolete types from v1alpha3
The v1alpha3 version is still needed for DeviceTaintRule, but the rest of the
types and most structs became obsolete in v1.32 when we introduced v1beta1 and
bumped the storage version to v1beta1.

Removing them now simplifies adding new features because new fields don't need
to be added to these obsolete types. This could have been done already in 1.33,
but wasn't to minimize disrupting on-going work.

Kubernetes-commit: 10de6780cf6b24d5115e508606334b81d6634ba6
2025-05-28 12:03:25 +02:00
Morten Torkildsen
dba34c781e Run make update
Kubernetes-commit: e761be47a45b97574499069ea198d879e7050e51
2025-03-26 14:52:36 +00:00
Patrick Ohly
71c858c5f4 DRA: generated files for device taints API
Kubernetes-commit: 99dbd85c45f77a4fd719ff9271128e8a4ed46082
2025-03-07 14:59:08 +01:00
Tobias Klauser
9f31100789 Update generated clients after removing always-nil setConfigDefaults error return value
Kubernetes-commit: 2c24a12804ca0020e57592a6844f7c5874dffcfe
2024-12-15 23:19:18 +01:00
Stephen Kitt
646e79b061 Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: be03bcf3244e6c280b8aaf7a638d1926f0960eab
2024-08-01 12:10:10 +02:00
Patrick Ohly
98e4506ad9 DRA API: generated files
Kubernetes-commit: 0ee52b23cd56aa4a8e33cc366c2d150286ad041e
2024-09-26 12:07:39 +02:00
Ben Luddy
9d19c65cdb Update generated clients.
Kubernetes-commit: 8fb9622b882496dad1e91103dd15fff7fc2658e0
2024-10-24 16:50:48 -04:00
Monis Khan
86e81b0a37 Generated
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 032e7f1556c74dbc25b5ed9368b2e86e26ba774f
2024-10-23 15:33:57 +00:00
Patrick Ohly
d366fa7737 DRA: remove "classic DRA"
This removes the DRAControlPlaneController feature gate, the fields controlled
by it (claim.spec.controller, claim.status.deallocationRequested,
claim.status.allocation.controller, class.spec.suitableNodes), the
PodSchedulingContext type, and all code related to the feature.

The feature gets removed because there is no path towards beta and GA and DRA
with "structured parameters" should be able to replace it.

Kubernetes-commit: f84eb5ecf894fa0fc4e0d05da52ef51d4cd723d9
2024-10-11 16:08:54 +02:00
Joe Betz
2b735405b2 generate
Kubernetes-commit: 2595aa13098355414a558b2d97c58d505ca7b6c2
2024-09-03 14:25:56 -04:00
Patrick Ohly
a7db3ade62 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
2024-06-18 17:47:29 +02:00
Patrick Ohly
91ff2f6ea5 DRA: bump API v1alpha2 -> v1alpha3
This is in preparation for revamping the resource.k8s.io completely. Because
there will be no support for transitioning from v1alpha2 to v1alpha3, the
roundtrip test data for that API in 1.29 and 1.30 gets removed.

Repeating the version in the import name of the API packages is not really
required. It was done for a while to support simpler grepping for usage of
alpha APIs, but there are better ways for that now. So during this transition,
"resourceapi" gets used instead of "resourcev1alpha3" and the version gets
dropped from informer and lister imports. The advantage is that the next bump
to v1beta1 will affect fewer source code lines.

Only source code where the version really matters (like API registration)
retains the versioned import.

Kubernetes-commit: b51d68bb87ba4fa47eb760f8a5e0baf9cf7f5b53
2024-06-14 12:40:48 +02:00
Joe Betz
c4145a9c20 Generate code
Kubernetes-commit: 7772769d19a82a26aa91181e0804ff2ccbdd843c
2024-06-24 15:58:35 -04:00
Stephen Kitt
b31bc29ea1 Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 08dfd59305dbd1032b1afb49738259d688dda5e3
2024-05-10 16:56:52 +02:00
Lukasz Szaszkiewicz
cc198ea39d make update
Kubernetes-commit: f62c80f965934eeeb2e028497bede7bcc632995d
2024-06-13 10:25:56 +02:00
Lukasz Szaszkiewicz
9f33e96b6a make update
Kubernetes-commit: 448180db60fc1d62174a18d1dd995d8deb081428
2024-05-27 15:31:15 +02:00
Dan Winship
3d4f98db0e Regenerate fake clients
Kubernetes-commit: 17ab25b121d05355700f39628d5d45ab3da446f8
2024-01-20 10:20:43 -05:00
Patrick Ohly
fee411cff2 dra api: rename NodeResourceSlice -> ResourceSlice
While currently those objects only get published by the kubelet for node-local
resources, this could change once we also support network-attached
resources. Dropping the "Node" prefix enables such a future extension.

The NodeName in ResourceSlice and StructuredResourceHandle then becomes
optional. The kubelet still needs to provide one and it must match its own node
name, otherwise it doesn't have permission to access ResourceSlice objects.

Kubernetes-commit: 0b6a0d686a060b5d5ff92cea931aacd4eba85adb
2024-03-07 10:14:11 +01:00
Patrick Ohly
c3231901f2 dra api: add structured parameters
NodeResourceSlice will be used by kubelet to publish resource information on
behalf of DRA drivers on the node. NodeName and DriverName in
NodeResourceSlice must be immutable. This simplifies tracking the different
objects because what they are for cannot change after creation.

The new field in ResourceClass tells scheduler and autoscaler that they are
expected to handle allocation.

ResourceClaimParameters and ResourceClassParameters are new types for telling
in-tree components how to handle claims.

Kubernetes-commit: 39bbcedbcae84bf716923b3f9464968ca70b42e7
2024-02-14 14:38:42 +01:00
Patrick Ohly
76262aa83e api: generated files for PodSchedulingContext
Kubernetes-commit: 2b8a4e809710f1b5eb3846a2964431a0266f287e
2023-03-13 23:16:18 +01:00
Patrick Ohly
324f43b974 api: resource.k8s.io v1alpha1 -> v1alpha2
For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.

Kubernetes-commit: 29941b8d3e7928244f48b05bf5bd453221fe7a9d
2023-03-06 12:43:58 +01:00
Steve Kuznetsov
9bcbb56a27 code-generator: refer to the API package for GV{R,K}
There should only be one source of truth for the API group's name and
version.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: e13198ec6f52c4a6405388e90053954dc7656a31
2022-11-06 07:05:42 -07:00
Patrick Ohly
522eaa15ef api: generated files
Kubernetes-commit: 9683c60c05491a9e9cafd3419c150caf7355bf49
2022-11-10 20:22:42 +01:00