mirror of
https://github.com/rancher/rke.git
synced 2025-08-02 07:43:04 +00:00
initialize metadata start of cluster config action
This commit is contained in:
parent
b9bb53ace6
commit
c706efdfe0
@ -4,13 +4,14 @@ import (
|
||||
"bufio"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/rancher/rke/metadata"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/rke/metadata"
|
||||
|
||||
"github.com/rancher/rke/cluster"
|
||||
"github.com/rancher/rke/pki"
|
||||
"github.com/rancher/rke/services"
|
||||
@ -100,13 +101,14 @@ func writeConfig(cluster *v3.RancherKubernetesEngineConfig, configFile string, p
|
||||
}
|
||||
|
||||
func clusterConfig(ctx *cli.Context) error {
|
||||
if ctx.Bool("system-images") {
|
||||
if metadata.K8sVersionToRKESystemImages == nil {
|
||||
err := metadata.InitMetadata(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if metadata.K8sVersionToRKESystemImages == nil {
|
||||
err := metadata.InitMetadata(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if ctx.Bool("system-images") {
|
||||
return generateSystemImagesList(ctx.String("version"), ctx.Bool("all"))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user