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:
committed by
Alena Prokharchyk
parent
dad34d4da2
commit
a64e8f64fb
@@ -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 {
|
||||
|
Reference in New Issue
Block a user