kubernetes-sigs / scheduler-plugins

Repository for out-of-tree scheduler plugins based on scheduler framework.
Apache License 2.0
1.11k stars 519 forks source link

Provide Context to scheduler plugins #664

Open zwpaper opened 11 months ago

zwpaper commented 11 months ago

The general idea would be use context wherever you can:

  1. the chained calls in PreFitler/Filter can use the context that is provided by scheduler framework
  2. for calls outside PreFilter/Filter/..., we should instantiate one at the start of main() (or make some change in scheduler framework to expose it), and pass it to all plugins

_Originally posted by @Huang-Wei in https://github.com/kubernetes-sigs/scheduler-plugins/pull/655#discussion_r1393097718_

/kind enhancement

k8s-ci-robot commented 11 months ago

@zwpaper: The label(s) kind/enhancement cannot be applied, because the repository doesn't have them.

In response to [this](https://github.com/kubernetes-sigs/scheduler-plugins/issues/664): > The general idea would be use context wherever you can: > >1. the chained calls in PreFitler/Filter can use the context that is provided by scheduler framework >2. for calls outside PreFilter/Filter/..., we should instantiate one at the start of main() (or make some change in scheduler framework to expose it), and pass it to all plugins > >_Originally posted by @Huang-Wei in https://github.com/kubernetes-sigs/scheduler-plugins/pull/655#discussion_r1393097718_ > > >/kind enhancement Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ffromani commented 11 months ago

/cc

lianghao208 commented 11 months ago

To enhance the scheduler framework, do we need to introduce a new parameter into PluginFactory function in k/k framework/runtime/registry.go? so that we can instantiate each plugin with one consolidate context.

Huang-Wei commented 11 months ago

To enhance the scheduler framework, do we need to introduce a new parameter into PluginFactory function in k/k framework/runtime/registry.go?

Yes, that would be an ideal way. I noticed this has been implemented - as a by-product of 116884 (in v1.29)

Huang-Wei commented 11 months ago

Changing milestone to v1.29.

k8s-triage-robot commented 8 months ago

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

This bot triages un-triaged issues according to the following rules:

You can:

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

/lifecycle stale

zwpaper commented 8 months ago

let me have a look at it in following days

/remove-lifecycle stale

han-so1omon commented 6 months ago

new contributor. gonna take a look as well. @zwpaper if you already have a solution let me know

k8s-triage-robot commented 3 months ago

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

This bot triages un-triaged issues according to the following rules:

You can:

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

/lifecycle stale

Huang-Wei commented 3 months ago

/remove-lifecycle stale

k8s-triage-robot commented 1 day ago

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

This bot triages un-triaged issues according to the following rules:

You can:

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

/lifecycle stale

Huang-Wei commented 21 hours ago

/remove-lifecycle stale