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

support stateful scheduler plugins #6163

Closed
wants to merge 1 commit into from

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 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?

NONE

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

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

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.
@k8s-ci-robot k8s-ci-robot added 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. labels 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 towca 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 the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 29, 2023
@k8s-ci-robot k8s-ci-robot added area/cluster-autoscaler size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 29, 2023
@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
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active 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 rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 21, 2024
@pohly
Copy link
Contributor Author

pohly commented Feb 22, 2024

/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.

@k8s-ci-robot
Copy link
Contributor

@pohly: Closed this PR.

In response to this:

/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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler 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/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. 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