Description
What would you like to be added:
Currently, the configuration for hami's scheduler is located in the Helm chart under the templates/scheduler/ directory
in the files configmap.yaml
and configmapnew.yaml
. The extenders field within these files defines the extenders that implement hami's scheduling logic. If we want to extend the functionality of the hami-scheduler by adding new extenders either before or after the existing hami extenders, manual modifications to these configuration files are required.
To enable dynamic extender configuration during deployment, additional template tags can be added to configmapnew.yaml. This allows users to define custom extenders in their values.yaml
file when deploying hami-scheduler. Specifically:
- preExtenders: Extenders that execute before hami's extenders.
- postExtenders: Extenders that execute after hami's extenders.
Example:
Define the following in values.yaml
:
preExtenders:
- urlPrefix: "https://127.0.0.1:442"
filterVerb: "filter"
bindVerb: "bind"
...
postExtenders:
- urlPrefix: "https://127.0.0.1:444"
filterVerb: "filter"
bindVerb: "bind"
...
After rendering with Helm, the resulting configuration should look like this:
extenders:
- urlPrefix: "https://127.0.0.1:442" # pre extenders
...
- urlPrefix: "https://127.0.0.1:443" # hami scheduler extender
...
- urlPrefix: "https://127.0.0.1:444" # post extenders
...