feature: Support multiple profiles
What type of PR is this?
/kind feature
What this PR does / why we need it:
The cluster scheduler can use multiple profiles to perform different scheduling for different pods. However, the current Cluster Autoscaler only supports one profile, which will lead to inaccurate scale up and down.
Feature issue https://github.com/kubernetes/autoscaler/issues/6544
Special notes for your reviewer:
Does this PR introduce a user-facing change?
flag scheduler-config-file support the same configuration file as scheduler.
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: daimaxiaxie 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.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/ok-to-test
Overall this looks good to me, modulo the backward compatibility aspect of failing on unknown scheduler names. @alculquicondor I wonder if you would mind doing a quick sanity check on changes in schedulerbased.go to see if there are any potential problems with initializing framework that way from CA? I don't see anything, but you have much more expertise here.
/assign @MaciekPytel
Looks like you were reviewing this already, can you follow up? Is it ok to merge now?