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:
committed by
Alena Prokharchyk
parent
8c8e3d1c6b
commit
c191ed6202
@@ -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)
|
||||
|
Reference in New Issue
Block a user