Check if default config is invalid before comparing it

Changes made in #31947 cause kube-proxy to ignore `--kubeconfig`
and `--master` flags and use in-cluster configuration, which is
unusable due to the fact that VIP hasn't been created yet.
pull/6/head
Ilya Dmitrichenko 2016-09-10 09:33:39 +02:00
parent 43710a8714
commit a96bd93c0f
1 changed files with 3 additions and 0 deletions

View File

@ -113,6 +113,9 @@ func (config *DeferredLoadingClientConfig) ClientConfig() (*restclient.Config, e
// TODO: this shouldn't be a global - the client config rules should be
// handling this.
defaultConfig, err := DefaultClientConfig.ClientConfig()
if IsConfigurationInvalid(err) {
return mergedConfig, nil
}
if err == nil && !reflect.DeepEqual(mergedConfig, defaultConfig) {
return mergedConfig, nil
}