1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 23:16:22 +00:00

honor kubernetes_version setting

This commit is contained in:
Jason Greathouse
2019-01-24 13:20:22 -06:00
committed by Alena Prokharchyk
parent dad34d4da2
commit a64e8f64fb
4 changed files with 78 additions and 7 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/rancher/rke/cluster"
"github.com/rancher/rke/pki"
"github.com/rancher/rke/services"
"github.com/rancher/rke/util"
"github.com/rancher/types/apis/management.cattle.io/v3"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
@@ -402,11 +403,21 @@ func getAddonManifests(reader *bufio.Reader) ([]string, error) {
func generateSystemImagesList(version string, all bool) error {
allVersions := []string{}
for version := range v3.AllK8sVersions {
err := util.ValidateVersion(version)
if err != nil {
continue
}
allVersions = append(allVersions, version)
}
if all {
for version, rkeSystemImages := range v3.AllK8sVersions {
err := util.ValidateVersion(version)
if err != nil {
continue
}
logrus.Infof("Generating images list for version [%s]:", version)
uniqueImages := getUniqueSystemImageList(rkeSystemImages)
for _, image := range uniqueImages {