Commit Graph

8 Commits

Author SHA1 Message Date
Kushagra Nigam c47cb7083c ignore unexpored fields 2025-02-12 11:57:28 +00:00
Kubernetes Prow Robot 50c65906fd
Merge pull request #7530 from towca/jtuznik/dra-actual
CA: DRA integration MVP
2024-12-20 16:30:08 +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 410bd7cea5 CA: fix a nil map write in NodeInfo.AddPod()
If the NodeInfo is created via WrapSchedulerNodeInfo with nil
podExtraInfos, subsequent AddPod() calls panic on trying to add
extra info for the pod.
2024-12-13 16:21:37 +01:00
Kuba Tużnik 1e560274d5 CA: extend WrapSchedulerNodeInfo to allow passing DRA objects
This should be a no-op, as no DRA objects are passed yet.
2024-12-09 17:14:45 +01:00
Kuba Tużnik d0338fa301 CA: integrate simulator with schedulerframework.SharedDRAManager
Make SharedDRAManager a part of the ClusterSnapshotStore interface, and
implement dummy methods to satisfy the interface. Actual implementation
will come in later commits.

This is needed so that ClusterSnapshot can feed DRA objects to the DRA
scheduler plugin, and obtain ResourceClaim modifications back from it.

The integration is behind the DRA flag guard, this should be a no-op
if the flag is disabled.
2024-12-09 17:14:34 +01:00
Kuba Tużnik eb26816ce9 CA: refactor utils related to NodeInfos
simulator.BuildNodeInfoForNode, core_utils.GetNodeInfoFromTemplate,
and scheduler_utils.DeepCopyTemplateNode all had very similar logic
for sanitizing and copying NodeInfos. They're all consolidated to
one file in simulator, sharing common logic.

DeepCopyNodeInfo is changed to be a framework.NodeInfo method.

MixedTemplateNodeInfoProvider now correctly uses ClusterSnapshot to
correlate Nodes to scheduled pods, instead of using a live Pod lister.
This means that the snapshot now has to be properly initialized in a
bunch of tests.
2024-11-27 12:51:30 +01:00
Kuba Tużnik a329ac6601 DRA: introduce internal NodeInfo/PodInfo with DRA objects attached
Methods to interact with the new internal types are added to
ClusterSnapshot. Cluster Autoscaler code will be migrated to only
use these methods and work on the internal types instead of directly
using the framework types.

The new types are designed so that they can be used as close to the
framework types as possible, which should make the migration manageable.

This allows easily adding additional data to the Nodes and Pods tracked
in ClusterSnapshot, without having to change the scheduler framework.
This will be needed to support DRA, as we'll need to track
ResourceSlices and ResourceClaims.
2024-11-05 16:42:26 +01:00