Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add images and improve parsing for kubernetes 1.11 #3255

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 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,19 @@ 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/pause: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.2.18",
"k8s.gcr.io/coredns:1.1.3",
"k8s.gcr.io/coredns:1.2.2",
}...)

} 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
5 changes: 1 addition & 4 deletions pkg/minikube/machine/cache_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func hasWindowsDriveLetter(s string) bool {
}

drive := s[:3]
for _, b := range "CDEFGHIJKLMNOPQRSTUVWXYZAB" {
for _, b := range "CDEFGHIJKLMNOPQRSTUVWXYZABcdefghijklmnopqrstuvwxyzab" {
if d := string(b) + ":"; drive == d+`\` || drive == d+`/` {
return true
}
Expand All @@ -160,9 +160,6 @@ func replaceWinDriveLetterToVolumeName(s string) (string, error) {
return "", err
}
path := vname + s[3:]
if _, err := os.Stat(filepath.Dir(path)); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duh! You're quite right. I'd created the branch based on the commit which incorporated my other PR. Apologies. I've sorted that out and raised another PR (I could not figure out how to sort it out in the previous branch/PR) which can be found here #3262. Cheers.

return "", err
}

return path, nil
}
Expand Down