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:
committed by
Alena Prokharchyk
parent
dc6f397f78
commit
f360207416
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user