diff --git a/cmd/remove.go b/cmd/remove.go index 361215e2..bc5e2099 100644 --- a/cmd/remove.go +++ b/cmd/remove.go @@ -4,6 +4,7 @@ import ( "bufio" "context" "fmt" + "github.com/rancher/rke/metadata" "os" "strings" @@ -56,6 +57,10 @@ func ClusterRemove( flags cluster.ExternalFlags) error { log.Infof(ctx, "Tearing down Kubernetes cluster") + + if metadata.K8sVersionToRKESystemImages == nil { + metadata.InitMetadata(ctx) + } kubeCluster, err := cluster.InitClusterObject(ctx, rkeConfig, flags) if err != nil { return err diff --git a/metadata/metadata.go b/metadata/metadata.go index 4be73e4f..321b8423 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -2,7 +2,6 @@ package metadata import ( "context" - "github.com/sirupsen/logrus" "strings" mVersion "github.com/mcuadros/go-version" @@ -21,7 +20,6 @@ var ( ) func InitMetadata(ctx context.Context) error { - logrus.Infof("calling init") initK8sRKESystemImages() initAddonTemplates() initServiceOptions() diff --git a/vendor/github.com/coreos/go-semver/semver/semver.go b/vendor/github.com/coreos/go-semver/semver/semver.go index 4d237019..76cf4852 100644 --- a/vendor/github.com/coreos/go-semver/semver/semver.go +++ b/vendor/github.com/coreos/go-semver/semver/semver.go @@ -19,7 +19,6 @@ import ( "bytes" "errors" "fmt" - "github.com/sirupsen/logrus" "regexp" "strconv" "strings" @@ -75,7 +74,6 @@ func (v *Version) Set(version string) error { dotParts := strings.SplitN(version, ".", 3) if len(dotParts) != 3 { - logrus.Infof("version version version %s", version) return fmt.Errorf("%s is not in dotted-tri format", version) }