Skip to content

Commit

Permalink
Handle case with valid kubeconfig but unreachable cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Jan 15, 2020
1 parent fbdd96f commit 166be7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ func (k *kubeProvider) Configure(_ context.Context, req *pulumirpc.ConfigureRequ
k.k8sVersion = cluster.TryGetServerVersion(cs.DiscoveryClientCached)

if _, err = k.getResources(); err != nil {
return nil, fmt.Errorf("unable to load schema information from the API server: %v", err)
k.clusterUnreachable = true
glog.V(3).Infof("unable to load schema information from the API server: %v", err)
}
}

Expand Down

0 comments on commit 166be7a

Please sign in to comment.