Unverified Commit 7098f1ad authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #71382 from yagonobre/fix-reset

Fix kubeadm reset in case of external etcd
parents 94759c16 52835fbc
...@@ -207,7 +207,7 @@ func getEtcdDataDir(manifestPath string, client clientset.Interface) (string, er ...@@ -207,7 +207,7 @@ func getEtcdDataDir(manifestPath string, client clientset.Interface) (string, er
if client != nil { if client != nil {
cfg, err := configutil.FetchConfigFromFileOrCluster(client, os.Stdout, "reset", "", false) 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 return cfg.Etcd.Local.DataDir, nil
} }
klog.Warningf("[reset] Unable to fetch the kubeadm-config ConfigMap, using etcd pod spec as fallback: %v", err) klog.Warningf("[reset] Unable to fetch the kubeadm-config ConfigMap, using etcd pod spec as fallback: %v", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment