Fix kubeadm reset in case of external etcd

pull/58/head
Yago Nobre 2018-11-23 16:27:00 -02:00
parent f7b9b669e5
commit 52835fbc80
No known key found for this signature in database
GPG Key ID: 09AE6CEC2B8E9DD3
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ func getEtcdDataDir(manifestPath string, client clientset.Interface) (string, er
if client != nil {
cfg, err := configutil.FetchConfigFromFileOrCluster(client, os.Stdout, "reset", "", false)
if err == nil {
if err == nil && cfg.Etcd.Local != nil {
return cfg.Etcd.Local.DataDir, nil
}
klog.Warningf("[reset] Unable to fetch the kubeadm-config ConfigMap, using etcd pod spec as fallback: %v", err)