Skip to content

Commit

Permalink
Updated to handle K8S v1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
mlgibbons committed Oct 18, 2018
1 parent fb68def commit eff050c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pkg/minikube/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ func GetKubeadmCachedImages(kubernetesVersionStr string) []string {
"k8s.gcr.io/kube-apiserver-amd64:" + kubernetesVersionStr,
}

gt_v1_10 := semver.MustParseRange(">=1.11.0")
gt_v1_11 := semver.MustParseRange(">=1.12.0")
v1_11 := semver.MustParseRange(">=1.11.0 <1.12.0")
v1_10 := semver.MustParseRange(">=1.10.0 <1.11.0")
v1_9 := semver.MustParseRange(">=1.9.0 <1.10.0")
v1_8 := semver.MustParseRange(">=1.8.0 <1.9.0")
Expand All @@ -199,7 +200,16 @@ func GetKubeadmCachedImages(kubernetesVersionStr string) []string {
glog.Errorln("Error parsing version semver: ", err)
}

if v1_10(kubernetesVersion) || gt_v1_10(kubernetesVersion) {
if v1_11(kubernetesVersion) || gt_v1_11(kubernetesVersion) {
images = append(images, []string{
"k8s.gcr.io/pause-amd64:3.1",
"k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.8",
"k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.8",
"k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.8",
"k8s.gcr.io/etcd-amd64:3.1.12",
}...)

} else if v1_10(kubernetesVersion) {
images = append(images, []string{
"k8s.gcr.io/pause-amd64:3.1",
"k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.8",
Expand Down

0 comments on commit eff050c

Please sign in to comment.