10 Commits
Author SHA1 Message Date
Patrick Ohly 09a3e27741 DRA consumable capacity: fix allocation result lookup
Two in-tree places looked for entries with a literal string lookup.  This
compared a QualifiedName from a current slice against a QualifiedName from an
allocation result, which is based on some older slice. The literal lookup
breaks if the slices changed from fully-qualified to un-qualified or vice
versa.

The correct approach is to do what lookupAttribute for constraints does: check
both forms. Following the example set by lookupAttribute, fully-qualified is
given precedence in case of a conflict.
2026-10-07 08:29:37 +02:00
SamWang 1ce37060f6 Lock DRADeviceTaints and DRADeviceTaintRules feature gates to GA in 1.38, remove in 1.41
Also update tests that toggled these gates off to instead pin the
emulated version to 1.37, where the gates are still unlocked, and
regenerate the feature-gate reference docs.
2026-09-18 12:48:46 -04:00
Patrick Ohly 2579861734 kube-controller-manager: use context-aware client-go
Kubernetes 1.37 finished the introduction of context-aware client-go APIs.
Components like kube-controller-manager which are meant to support contextual
logging should use those new APIs.

This is not enforced yet because existing code must be updated first. Once
that is done, enforcement of everything touched here can be enabled tree-wide.
2026-09-07 16:49:09 +02:00
Noureldin 8c02d3141f DRA resource pool status request (#140170)
* Fix RPSR device accounting: cap-at-1 per device, skip AdminAccess, count taints as unavailable

Signed-off-by: Nour <nurmn3m@gmail.com>

* Count DeviceTaintRule-tainted devices as unavailable in RPSR controller

Signed-off-by: Nour <nurmn3m@gmail.com>

* Add RPSR API types: v1 PartitionTypeAttribute and v1alpha3 PoolStatus partition/counter/shareable views

Signed-off-by: Nour <nurmn3m@gmail.com>

* Regenerate for RPSR partition/counter/shareable API types

Signed-off-by: Nour <nurmn3m@gmail.com>

* Add RPSR validation and feature-gate drop for PartitionTypeAttribute

Signed-off-by: Nour <nurmn3m@gmail.com>

* Compute partition/counter/shareable views in RPSR controller

Signed-off-by: Nour <nurmn3m@gmail.com>

* Add RPSR integration tests for partition and shareable views

Signed-off-by: Nour <nurmn3m@gmail.com>

* Fix RPSR e2e view tests: own context and complete pool matchers

Signed-off-by: Nour <nurmn3m@gmail.com>

* Fix tests

Signed-off-by: Nour <nurmn3m@gmail.com>

* Migrate RPSR controller to v1 DeviceTaintRule API

Signed-off-by: Nour <nurmn3m@gmail.com>

* Fix linter test && update generated files

Signed-off-by: Nour <nurmn3m@gmail.com>

* Address API review on ResourcePoolStatusRequest status types

Signed-off-by: Nour <nurmn3m@gmail.com>

* Adding tests to cover missing parts like consumable capacity

Signed-off-by: Nour <nurmn3m@gmail.com>

* Address API review: gate partitionTypeAttribute and add request-side selection

Signed-off-by: Nour <nurmn3m@gmail.com>

* Gate partitionTypeAttribute declaratively and consolidate tests

Signed-off-by: Nour <nurmn3m@gmail.com>

* Scope partitionTypeAttribute to slices with partitionable devices

Signed-off-by: Nour <nurmn3m@gmail.com>

* Group partitionSummary per slice attribute and self-describe each entry

Signed-off-by: Nour <nurmn3m@gmail.com>

* Fix RPSR integration fixture to declare partitionTypeAttribute only on the device slice

Signed-off-by: Nour <nurmn3m@gmail.com>

* Rename request default attribute, scope slice doc, pair required markers

Signed-off-by: Nour <nurmn3m@gmail.com>

* Make shareable capacity Quantity fields required pointers, hoist attribute domain-strip

Signed-off-by: Nour <nurmn3m@gmail.com>

* Regenerate declarative validations for partitionTypeAttribute to fix verify test

Signed-off-by: Nour <nurmn3m@gmail.com>

---------

Signed-off-by: Nour <nurmn3m@gmail.com>
2026-07-22 15:05:52 +00:00
eedo_y 236789108b chore: pass resource pool handler logger 2026-07-03 20:41:28 +09:00
carlory d05455ab05 controller/resourcepoolstatusrequest: Improve goroutine mgmt
Signed-off-by: carlory <baofa.fan@daocloud.io>
2026-04-20 18:28:14 +08:00
Nour 58cbde2aff Pass individual informers, move DRA controllers to resource.go, simplify retry logic and metric tests
Signed-off-by: Nour <nurmn3m@gmail.com>
2026-03-19 16:50:03 +02:00
Nour 8b9159baa4 Drop CSR analogy, mark ObjectMeta +required,reduce limits (maxItems=500, maxLength=128) for etcd safety, add Errors printer column
Signed-off-by: Nour <nurmn3m@gmail.com>
2026-03-19 16:50:03 +02:00
Nour 4dffbf5b2a Add tests for ResourcePoolStatusRequest
Add unit tests for handwritten and declarative validation, controller
logic, metrics, table printer output, controller-manager registration,
etcd storage round-trip, and an integration test for the full RPSR
lifecycle. Also add an e2e test exercising the DRA test driver with
RPSR and the example manifest.
2026-03-19 16:50:03 +02:00
Nour 30fe79df21 Add ResourcePoolStatusRequest controller, registry, and RBAC
Implement the RPSR controller that watches ResourcePoolStatusRequest
objects and aggregates pool status from DRA drivers. Add the API server
registry (strategy, storage), handwritten validation, RBAC bootstrap
policy for the controller, kube-controller-manager wiring, table
printer columns, and storage factory registration.
2026-03-19 16:50:02 +02:00