incluster config will be used when creating external shared informers.

previously the loopback configuration was used to talk to the server.
As a consequence a custom API server was unable to talk to the root API server.
This commit is contained in:
p0lyn0mial
2017-06-13 18:08:35 +02:00
parent 695d438508
commit 074544b3b0
3 changed files with 38 additions and 6 deletions

View File

@@ -102,6 +102,7 @@ func NonBlockingRun(s *options.ServerRunOptions, stopCh <-chan struct{}) error {
if err := s.CloudProvider.DefaultExternalHost(s.GenericServerRunOptions); err != nil {
return fmt.Errorf("error setting the external host value: %v", err)
}
s.SecureServing.ForceLoopbackConfigUsage()
s.Authentication.ApplyAuthorization(s.Authorization)