mirror of https://github.com/k3s-io/k3s
Fix kubeadm reset in case of external etcd
parent
f7b9b669e5
commit
52835fbc80
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue