From f24f6102a9180182eb4716fca9876dacdf67265e Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Thu, 16 Jun 2016 09:40:49 +0200 Subject: [PATCH] Don't set NetworkUnavailable condition in non-GCE/GKE clouds --- pkg/kubelet/kubelet.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index f7f01abc595..983e836fb4a 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -1125,7 +1125,11 @@ func (kl *Kubelet) initialNodeStatus() (*api.Node, error) { } func (kl *Kubelet) providerRequiresNetworkingConfiguration() bool { - if kl.cloud == nil || kl.flannelExperimentalOverlay { + // TODO: We should have a mechanism to say whether native cloud provider + // is used or whether we are using overlay networking. We should return + // true for cloud providers if they implement Routes() interface and + // we are not using overlay networking. + if kl.cloud == nil || kl.cloud.ProviderName() != "gce" || kl.flannelExperimentalOverlay { return false } _, supported := kl.cloud.Routes()