Commit Graph

10 Commits

Author SHA1 Message Date
Kubernetes Prow Robot c85f22f7dd
Merge pull request #7798 from omerap12/migrate-claimReservedForPod
migrate claimReservedForPod to use upstream IsReservedForPod
2025-05-13 09:57:16 -07:00
Kushagra Nigam c47cb7083c ignore unexpored fields 2025-02-12 11:57:28 +00:00
Omer Aplatony e02272a4f1 migrate claimReservedForPod to use upstream IsReservedForPod
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2025-02-02 21:09:08 +02:00
Kuba Tużnik c5cb8a077d CA: add DRA object handling logic to PredicateSnapshot
All added logic is behind the DRA flag guard, this should be a no-op
if the flag is disabled.
2024-12-20 13:30:36 +01:00
Kuba Tużnik 714ab661ca CA: implement calculating utilization for DRA resources
The logic is very basic and will likely need to be revised, but it's
something for initial testing. Utilization of a given Pool is calculated
as the number of allocated devices in the pool divided by the number of
all devices in the pool. For scale-down purposes, the max utilization
of all Node-local Pools is used.

The new logic is mostly behind the DRA flag guard, so this should be a no-op
if the flag is disabled. The only difference should be that FilterOutUnremovable
marks a Node as unremovable if calculating utilization fails. Not sure
why this wasn't the case before, but I think we need it for DRA - if CA sees an
incomplete picture of a resource pool, we probably don't want to scale
the Node down.
2024-12-20 13:30:36 +01:00
Kuba Tużnik 4e68a0c6ef CA: sanitize and propagate DRA objects through NodeInfos in node_info utils 2024-12-20 13:30:36 +01:00
Kuba Tużnik 479d7ce3d6 CA: implement a Provider for dynamicresources.Snapshot
The Provider uses DRA object listers to create a Snapshot of the
DRA objects.
2024-12-20 13:30:36 +01:00
Kuba Tużnik 377639a8dc CA: implement dynamicresources.Snapshot for storing and modifying the state of DRA objects
The Snapshot can hold all DRA objects in the cluster, and expose them
to the scheduler framework via the SharedDRAManager interface.

The state of the objects can be modified during autoscaling simulations
using the provided methods.
2024-12-20 13:30:10 +01:00
Kuba Tużnik 66d0aeb3cb CA: implement utils for interacting with ResourceClaims
These utils will be used by various parts of the DRA logic in the
following commits.
2024-12-19 15:55:49 +01:00
Kuba Tużnik 466f94b780 CA: extend ClusterSnapshotStore to allow storing, retrieving and modifying DRA objects
A new DRA Snapshot type is introduced, for now with just dummy methods
to be implemented in later commits. The new type is intended to hold all
DRA objects in the cluster.

ClusterSnapshotStore.SetClusterState() is extended to take the new DRA Snapshot in
addition to the existing parameters.

ClusterSnapshotStore.DraSnapshot() is added to retrieve the DRA snapshot set by
SetClusterState() back. This will be used by PredicateSnapshot to implement DRA
logic later.

This should be a no-op, as DraSnapshot() is never called, and no DRA
snapshot is passed to SetClusterState() yet.
2024-12-09 17:14:45 +01:00