From 37efa751c725c7f460cbaf7e512da5f94b95bf1d Mon Sep 17 00:00:00 2001 From: Aldo Culquicondor Date: Tue, 5 Nov 2019 15:12:46 -0500 Subject: [PATCH] Validate scheduler configuration from config file Signed-off-by: Aldo Culquicondor --- cmd/kube-scheduler/app/options/options.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/kube-scheduler/app/options/options.go b/cmd/kube-scheduler/app/options/options.go index e812fc90593..7c3fb6cc300 100644 --- a/cmd/kube-scheduler/app/options/options.go +++ b/cmd/kube-scheduler/app/options/options.go @@ -174,6 +174,9 @@ func (o *Options) ApplyTo(c *schedulerappconfig.Config) error { if err != nil { return err } + if err := validation.ValidateKubeSchedulerConfiguration(cfg).ToAggregate(); err != nil { + return err + } // use the loaded config file only, with the exception of --address and --port. This means that // none of the deprecated flags in o.Deprecated are taken into consideration. This is the old