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
support stateful scheduler plugins #6163
Conversation
The assumption so far was that plugins which are active during cluster autoscaling can do their work exclusively based on the information maintained by cluster autoscaler about nodes and pods on those nodes. This assumption doesn't hold for plugins which need to observe and potentially modified other cluster state, like the dynamic resource allocation plugin. Such plugins need a way to do their own snapshotting of the cluster state at the start of a simulation and then update that snapshotting while the cluster autoscaler simulates the placement of pods on nodes. The new ClusterAutoScalerPlugin interface provides a mechanism for this. It needs to be called in a few places if a plugin implements that interface.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pohly The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/close For DRA with structured parameters, I am using the approach instead that each pod scheduling cycle reconstructs state from caches. This might be worse from a performance perspective, but is easier to integrate with autoscaling. We can come back to this approach here if (and only if) needed. |
@pohly: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
The assumption so far was that plugins which are active during cluster autoscaling can do their work exclusively based on the information maintained by cluster autoscaler about nodes and pods on those nodes. This assumption doesn't hold for plugins which need to observe and potentially modify other cluster state, like the dynamic resource allocation plugin.
Such plugins need a way to do their own snapshotting of the cluster state at the start of a simulation and then update that snapshot while the cluster autoscaler simulates the placement of pods on nodes.
The new ClusterAutoScalerPlugin interface provides a mechanism for this. It needs to be called in a few places if a plugin implements that interface.
Which issue(s) this PR fixes:
Related-to: kubernetes/kubernetes#118612
Special notes for your reviewer:
If the dynamic resource allocation plugin is inactive, then no plugin implements the new interface and these code changes become mostly no-ops.
The corresponding PR in k/k needs to be merged first.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: