mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 12:11:43 +00:00
Merge pull request #93808 from zhouya0/seperate_registry_and_feature_gates
Scheduler ListAlgorithmProviders function return providers directly
This commit is contained in:
@@ -17,8 +17,7 @@ limitations under the License.
|
|||||||
package algorithmprovider
|
package algorithmprovider
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sort"
|
"fmt"
|
||||||
"strings"
|
|
||||||
|
|
||||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
@@ -66,13 +65,7 @@ func NewRegistry() Registry {
|
|||||||
|
|
||||||
// ListAlgorithmProviders lists registered algorithm providers.
|
// ListAlgorithmProviders lists registered algorithm providers.
|
||||||
func ListAlgorithmProviders() string {
|
func ListAlgorithmProviders() string {
|
||||||
r := NewRegistry()
|
return fmt.Sprintf("%s | %s", ClusterAutoscalerProvider, schedulerapi.SchedulerDefaultProviderName)
|
||||||
var providers []string
|
|
||||||
for k := range r {
|
|
||||||
providers = append(providers, k)
|
|
||||||
}
|
|
||||||
sort.Strings(providers)
|
|
||||||
return strings.Join(providers, " | ")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func getDefaultConfig() *schedulerapi.Plugins {
|
func getDefaultConfig() *schedulerapi.Plugins {
|
||||||
|
Reference in New Issue
Block a user