Skip to content

Commit

Permalink
Merge pull request #9181 from tstromberg/m1
Browse files Browse the repository at this point in the history
Add Docker Desktop instructions if memory is >minimum but <recommended
  • Loading branch information
tstromberg committed Sep 8, 2020
2 parents a8d9535 + f15fd81 commit c4663b8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,15 @@ func validateRequestedMemorySize(req int, drvName string) {
exitIfNotForced(reason.RsrcInsufficientReqMemory, "Requested memory allocation {{.requested}}MiB is less than the usable minimum of {{.minimum_memory}}MB", out.V{"requested": req, "minimum_memory": minUsableMem})
}
if req < minRecommendedMem {
out.WarnReason(reason.RsrcInsufficientReqMemory, "Requested memory allocation ({{.requested}}MB) is less than the recommended minimum {{.recommend}}MB. Deployments may fail.", out.V{"requested": req, "recommend": minRecommendedMem})
if driver.IsDockerDesktop(drvName) {
if runtime.GOOS == "darwin" {
out.WarnReason(reason.RsrcInsufficientDarwinDockerMemory, "Docker Desktop only has {{.size}}MiB available, you may encounter application deployment failures.", out.V{"size": containerLimit, "req": minUsableMem, "recommend": "2.25 GB"})
} else {
out.WarnReason(reason.RsrcInsufficientWindowsDockerMemory, "Docker Desktop only has {{.size}}MiB available, you may encounter application deployment failures.", out.V{"size": containerLimit, "req": minUsableMem, "recommend": "2.25 GB"})
}
} else {
out.WarnReason(reason.RsrcInsufficientReqMemory, "Requested memory allocation ({{.requested}}MB) is less than the recommended minimum {{.recommend}}MB. Deployments may fail.", out.V{"requested": req, "recommend": minRecommendedMem})
}
}

advised := suggestMemoryAllocation(sysLimit, containerLimit, viper.GetInt(nodes))
Expand Down

0 comments on commit c4663b8

Please sign in to comment.