Move proxy platformSetup call, and do LocalDetector setup from there

This commit is contained in:
Dan Winship
2023-06-30 17:39:36 -04:00
parent ebb0fdd4f6
commit 8abfa89e82
4 changed files with 41 additions and 24 deletions

View File

@@ -567,6 +567,11 @@ func newProxyServer(config *kubeproxyconfig.KubeProxyConfiguration, master strin
s.HealthzServer = healthcheck.NewProxierHealthServer(config.HealthzBindAddress, 2*config.IPTables.SyncPeriod.Duration, s.Recorder, s.NodeRef)
}
err = s.platformSetup()
if err != nil {
return nil, err
}
s.Proxier, err = s.createProxier(config)
if err != nil {
return nil, err
@@ -706,12 +711,6 @@ func (s *ProxyServer) Run() error {
// Start up a metrics server if requested
serveMetrics(s.Config.MetricsBindAddress, s.Config.Mode, s.Config.EnableProfiling, errCh)
// Do platform-specific setup
err := s.platformSetup()
if err != nil {
return err
}
noProxyName, err := labels.NewRequirement(apis.LabelServiceProxyName, selection.DoesNotExist, nil)
if err != nil {
return err