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