1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 06:56:29 +00:00

move metadata init to InitClusterObject

This commit is contained in:
kinarashah
2019-07-08 15:21:03 -07:00
committed by Alena Prokharchyk
parent dc6f397f78
commit f360207416
3 changed files with 6 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ package cluster
import (
"context"
"fmt"
"github.com/rancher/rke/metadata"
"net"
"reflect"
"strings"
@@ -160,6 +161,9 @@ func InitClusterObject(ctx context.Context, rkeConfig *v3.RancherKubernetesEngin
StateFilePath: GetStateFilePath(flags.ClusterFilePath, flags.ConfigDir),
PrivateRegistriesMap: make(map[string]v3.PrivateRegistry),
}
if metadata.K8sVersionToRKESystemImages == nil {
metadata.InitMetadata(ctx)
}
if len(c.ConfigPath) == 0 {
c.ConfigPath = pki.ClusterConfig
}