mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 14:45:28 +00:00
Surface kube config in scheduler framework handle
This commit is contained in:
@@ -41,6 +41,7 @@ type Config struct {
|
||||
SecureServing *apiserver.SecureServingInfo
|
||||
|
||||
Client clientset.Interface
|
||||
KubeConfig *restclient.Config
|
||||
InformerFactory informers.SharedInformerFactory
|
||||
|
||||
//lint:ignore SA1019 this deprecated field still needs to be used for now. It will be removed once the migration is done.
|
||||
|
@@ -289,6 +289,7 @@ func (o *Options) Config() (*schedulerappconfig.Config, error) {
|
||||
}
|
||||
|
||||
c.Client = client
|
||||
c.KubeConfig = kubeConfig
|
||||
c.InformerFactory = scheduler.NewInformerFactory(client, 0)
|
||||
c.LeaderElection = leaderElectionConfig
|
||||
|
||||
|
@@ -323,6 +323,7 @@ func Setup(ctx context.Context, opts *options.Options, outOfTreeRegistryOptions
|
||||
cc.InformerFactory,
|
||||
recorderFactory,
|
||||
ctx.Done(),
|
||||
scheduler.WithKubeConfig(cc.KubeConfig),
|
||||
scheduler.WithProfiles(cc.ComponentConfig.Profiles...),
|
||||
scheduler.WithAlgorithmSource(cc.ComponentConfig.AlgorithmSource),
|
||||
scheduler.WithPercentageOfNodesToScore(cc.ComponentConfig.PercentageOfNodesToScore),
|
||||
|
Reference in New Issue
Block a user