-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Implement DRA support in Cluster Autoscaler #7350
Closed
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4992123
DRA: extract interacting with the scheduler framework out of Predicat…
towca 2d55ff2
DRA: introduce internal NodeInfo/PodInfo with DRA objects attached
towca 7c1f8d5
DRA: migrate all of CA to use the new internal NodeInfo/PodInfo
towca dfd0234
DRA: remove AddNodeWithPods from ClusterSnapshot, replace uses with A…
towca fafb78a
DRA: add Initialize to ClusterSnapshot, remove AddNodes
towca c249f46
DRA: remove redundant IsPVCUsedByPods from ClusterSnapshot
towca f876a51
DRA: remove AddNode from ClusterSnapshot
towca bb87555
DRA: refactor utils related to NodeInfos
towca fad6868
DRA: propagate schedulerframework handle and DRA feature flag to Clus…
towca 26e4787
DRA: Implement a Snapshot of DRA objects, its Provider, and utils
towca 9e32e07
DRA: grab a snapshot of DRA objects and plumb to ClusterSnapshot.Init…
towca 006685c
DRA: propagate DRA objects through NodeInfos in node_info utils
towca c5edd3b
DRA: rename ClusterSnapshot methods to better reflect their purpose
towca bdef0a7
DRA: extend ClusterSnapshot.SchedulePod, propagate scheduling state f…
towca 0e055c4
DRA: plumb the DRA snapshot into scheduler framework through ClusterS…
towca 0a11e9c
DRA: implement calculating utilization for DRA resources
towca ef9d420
DRA: integrate BasicClusterSnapshot with the DRA snapshot
towca 38fb034
DRA: add integration tests
towca 7e70b41
DRA: handle expendable pods using DRA
towca 3544bb4
DRA: handle duplicating unschedulable pods using DRA
towca 2e7eeea
DRA TMP: vendor in the required scheduler framework channges
towca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ import ( | |
"k8s.io/autoscaler/cluster-autoscaler/expander" | ||
processor_callbacks "k8s.io/autoscaler/cluster-autoscaler/processors/callbacks" | ||
"k8s.io/autoscaler/cluster-autoscaler/simulator/clustersnapshot" | ||
"k8s.io/autoscaler/cluster-autoscaler/simulator/framework" | ||
"k8s.io/autoscaler/cluster-autoscaler/simulator/predicatechecker" | ||
kube_util "k8s.io/autoscaler/cluster-autoscaler/utils/kubernetes" | ||
"k8s.io/client-go/informers" | ||
|
@@ -44,7 +45,8 @@ type AutoscalingContext struct { | |
AutoscalingKubeClients | ||
// CloudProvider used in CA. | ||
CloudProvider cloudprovider.CloudProvider | ||
// TODO(kgolab) - move away too as it's not config | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this comment no longer necessary? |
||
// FrameworkHandle can be used to interact with the scheduler framework. | ||
FrameworkHandle *framework.Handle | ||
// PredicateChecker to check if a pod can fit into a node. | ||
PredicateChecker predicatechecker.PredicateChecker | ||
// ClusterSnapshot denotes cluster snapshot used for predicate checking. | ||
|
@@ -98,6 +100,7 @@ func NewResourceLimiterFromAutoscalingOptions(options config.AutoscalingOptions) | |
// NewAutoscalingContext returns an autoscaling context from all the necessary parameters passed via arguments | ||
func NewAutoscalingContext( | ||
options config.AutoscalingOptions, | ||
fwHandle *framework.Handle, | ||
predicateChecker predicatechecker.PredicateChecker, | ||
clusterSnapshot clustersnapshot.ClusterSnapshot, | ||
autoscalingKubeClients *AutoscalingKubeClients, | ||
|
@@ -112,6 +115,7 @@ func NewAutoscalingContext( | |
AutoscalingOptions: options, | ||
CloudProvider: cloudProvider, | ||
AutoscalingKubeClients: *autoscalingKubeClients, | ||
FrameworkHandle: fwHandle, | ||
PredicateChecker: predicateChecker, | ||
ClusterSnapshot: clusterSnapshot, | ||
ExpanderStrategy: expanderStrategy, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would calling this
EnableDynamicResourceAllocation
maybe be a bit more clear?