kubernetes-sigs / scheduler-plugins

Repository for out-of-tree scheduler plugins based on scheduler framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide Context to scheduler plugins

zwpaper opened this issue · comments

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 #655 (comment)

/kind enhancement

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

In response to this:

       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 #655 (comment)

/kind enhancement

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.

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.

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)

Changing milestone to v1.29.