mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 18:54:06 +00:00
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.
This commit is contained in:
parent
43710a8714
commit
a96bd93c0f
@ -113,6 +113,9 @@ func (config *DeferredLoadingClientConfig) ClientConfig() (*restclient.Config, e
|
|||||||
// TODO: this shouldn't be a global - the client config rules should be
|
// TODO: this shouldn't be a global - the client config rules should be
|
||||||
// handling this.
|
// handling this.
|
||||||
defaultConfig, err := DefaultClientConfig.ClientConfig()
|
defaultConfig, err := DefaultClientConfig.ClientConfig()
|
||||||
|
if IsConfigurationInvalid(err) {
|
||||||
|
return mergedConfig, nil
|
||||||
|
}
|
||||||
if err == nil && !reflect.DeepEqual(mergedConfig, defaultConfig) {
|
if err == nil && !reflect.DeepEqual(mergedConfig, defaultConfig) {
|
||||||
return mergedConfig, nil
|
return mergedConfig, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user