1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 23:16:22 +00:00

use k8s version info from kontainer-driver-metadata

This commit is contained in:
kinarashah
2019-05-28 11:51:53 -07:00
committed by Alena Prokharchyk
parent 8c8e3d1c6b
commit c191ed6202
25 changed files with 231 additions and 5547 deletions

View File

@@ -3,6 +3,7 @@ package cmd
import (
"context"
"fmt"
"github.com/rancher/rke/metadata"
"io/ioutil"
"os"
"path/filepath"
@@ -74,6 +75,9 @@ func ClusterInit(ctx context.Context, rkeConfig *v3.RancherKubernetesEngineConfi
if len(flags.CertificateDir) == 0 {
flags.CertificateDir = cluster.GetCertificateDirPath(flags.ClusterFilePath, flags.ConfigDir)
}
if err := metadata.InitMetadata(ctx); err != nil {
return err
}
rkeFullState, _ := cluster.ReadStateFile(ctx, stateFilePath)
kubeCluster, err := cluster.InitClusterObject(ctx, rkeConfig, flags)