Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Support plugin arguments #637

Closed
k82cn opened this issue Mar 12, 2019 · 3 comments · Fixed by #639
Closed

Support plugin arguments #637

k82cn opened this issue Mar 12, 2019 · 3 comments · Fixed by #639
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@k82cn
Copy link
Contributor

k82cn commented Mar 12, 2019

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

Description:

Currently, we only support configuration on plugin's callback; it's better to support customized arguments to plugins. For example:

actions: "reclaim, allocate, backfill, preempt"
tiers:
- plugins:
  - name: priority
  - name: gang
  - name: conformance
- plugins:
  - name: drf
  - name: predicates
  - name: proportion
  - name: nodeorder
    arguments:
    - affinity.weight: 2
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 12, 2019
@k82cn k82cn added this to the v0.5 milestone Mar 12, 2019
@k82cn
Copy link
Contributor Author

k82cn commented Mar 13, 2019

@thandayuthapani , would you help on that?

@thandayuthapani
Copy link
Contributor

@k82cn we can handle arguments as map instead of parameters being slice, since those parameters can have different keys for different plugins. affinity.weight might be only suitable for nodeorder plugin. So we can handle it as map, so in code we can try to get it from map.

@thandayuthapani
Copy link
Contributor

Expected YAML should of this form, arguments are handled as map instead of slice.

actions: "reclaim, allocate, backfill, preempt"
tiers:
- plugins:
  - name: priority
  - name: gang
  - name: conformance
- plugins:
  - name: drf
  - name: predicates
  - name: proportion
  - name: nodeorder
    arguments:
      affinity.weight: 2
      affinity.enable: true

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants