Skip to content
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: scheduler framework: support simulating cluster changes during autoscaling #120936

Closed

Conversation

pohly
Copy link
Contributor

@pohly pohly commented Sep 29, 2023

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 modified other cluster state, like the dynamic resource allocation plugin.

Such plugins need a way to do its 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 is not used anywhere in kube-scheduler itself, but has to be defined here because plugins cannot get it from k8s.io/autoscaler (circular dependency) and creating a new repo seems overkill.

Which issue(s) this PR fixes:

Related-to: #118612

Special notes for your reviewer:

This needs to be reviewed in combination with the corresponding change in cluster autoscaler.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/issues/3063

/cc @mwielgus @alculquicondor @MaciekPytel

…aling

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 its 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 is
not used anywhere in kube-scheduler itself, but has to be defined here because
plugins cannot get it from k8s.io/autoscaler (circular dependency) and creating
a new repo seems overkill.
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 29, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Sep 29, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pohly
Once this PR has been reviewed and has the lgtm label, please assign huang-wei for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 29, 2023
@k8s-ci-robot
Copy link
Contributor

@pohly: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-verify b541145 link true /test pull-kubernetes-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@pohly pohly changed the title scheduler framework: support simulating cluster changes during autoscaling WIP: scheduler framework: support simulating cluster changes during autoscaling Oct 9, 2023
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 9, 2023
@pohly pohly marked this pull request as draft October 9, 2023 12:41
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 22, 2024
@pohly pohly closed this Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants