call validate when config update coz apiserver restart (#5564)
Co-authored-by: jinshanwu <jinshanwu@deeproute.ai>
This commit is contained in:
@@ -118,6 +118,11 @@ func Run(s *options.ServerRunOptions, configCh <-chan apiserverconfig.Config, ct
|
||||
s.Config = &cfg
|
||||
ictx, cancelFunc = context.WithCancel(context.TODO())
|
||||
go func() {
|
||||
if errs := s.Validate(); len(errs) != 0 {
|
||||
for _, err := range errs {
|
||||
errCh <- err
|
||||
}
|
||||
}
|
||||
if err := run(s, ictx); err != nil {
|
||||
errCh <- err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user