From d40751ff38750fd6c2c88073a77a08a271644a67 Mon Sep 17 00:00:00 2001 From: fenglixa Date: Fri, 31 May 2019 21:36:49 +0800 Subject: [PATCH 01/27] Fix nonexistent profile --- cmd/minikube/cmd/dashboard.go | 36 ++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/cmd/minikube/cmd/dashboard.go b/cmd/minikube/cmd/dashboard.go index 200d285d03c1..f45dae902edd 100644 --- a/cmd/minikube/cmd/dashboard.go +++ b/cmd/minikube/cmd/dashboard.go @@ -26,13 +26,13 @@ import ( "regexp" "time" + "github.com/docker/machine/libmachine/mcnerror" "github.com/golang/glog" "github.com/pkg/browser" "github.com/pkg/errors" "github.com/spf13/cobra" configcmd "k8s.io/minikube/cmd/minikube/cmd/config" "k8s.io/minikube/pkg/minikube/cluster" - "k8s.io/minikube/pkg/minikube/config" pkg_config "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/console" "k8s.io/minikube/pkg/minikube/exit" @@ -59,15 +59,7 @@ var dashboardCmd = &cobra.Command{ if err != nil && !os.IsNotExist(err) { console.ErrLn("Error loading profile config: %v", err) } - err = proxy.ExcludeIP(cc.KubernetesConfig.NodeIP) // to be used for http get calls - if err != nil { - glog.Errorf("Error excluding IP from proxy: %s", err) - } - kubectl, err := exec.LookPath("kubectl") - if err != nil { - exit.WithCode(exit.NoInput, "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/") - } api, err := machine.NewAPIClient() defer func() { err := api.Close() @@ -79,6 +71,28 @@ var dashboardCmd = &cobra.Command{ if err != nil { exit.WithError("Error getting client", err) } + + _, err = api.Load(pkg_config.GetMachineName()) + if err != nil { + switch err := errors.Cause(err).(type) { + case mcnerror.ErrHostDoesNotExist: + console.OutStyle(console.Meh, "%q cluster does not exist", pkg_config.GetMachineName()) + os.Exit(0) + default: + exit.WithError("Error getting cluster", err) + } + } + + err = proxy.ExcludeIP(cc.KubernetesConfig.NodeIP) // to be used for http get calls + if err != nil { + glog.Errorf("Error excluding IP from proxy: %s", err) + } + + kubectl, err := exec.LookPath("kubectl") + if err != nil { + exit.WithCode(exit.NoInput, "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/") + } + cluster.EnsureMinikubeRunningOrExit(api, 1) // Send status messages to stderr for folks re-using this output. @@ -127,9 +141,9 @@ var dashboardCmd = &cobra.Command{ // kubectlProxy runs "kubectl proxy", returning host:port func kubectlProxy(path string) (*exec.Cmd, string, error) { // port=0 picks a random system port - // config.GetMachineName() respects the -p (profile) flag + // pkg_config.GetMachineName() respects the -p (profile) flag - cmd := exec.Command(path, "--context", config.GetMachineName(), "proxy", "--port=0") + cmd := exec.Command(path, "--context", pkg_config.GetMachineName(), "proxy", "--port=0") stdoutPipe, err := cmd.StdoutPipe() if err != nil { From bbc679be0e1694289e33744b643a861fba5bd1d2 Mon Sep 17 00:00:00 2001 From: fenglixa Date: Sun, 2 Jun 2019 13:26:42 +0800 Subject: [PATCH 02/27] modify to exit.Unavailable and align the code --- cmd/minikube/cmd/dashboard.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/minikube/cmd/dashboard.go b/cmd/minikube/cmd/dashboard.go index f45dae902edd..fafe742fb0ab 100644 --- a/cmd/minikube/cmd/dashboard.go +++ b/cmd/minikube/cmd/dashboard.go @@ -72,12 +72,11 @@ var dashboardCmd = &cobra.Command{ exit.WithError("Error getting client", err) } - _, err = api.Load(pkg_config.GetMachineName()) - if err != nil { + if _, err = api.Load(pkg_config.GetMachineName()); err != nil { switch err := errors.Cause(err).(type) { case mcnerror.ErrHostDoesNotExist: console.OutStyle(console.Meh, "%q cluster does not exist", pkg_config.GetMachineName()) - os.Exit(0) + os.Exit(exit.Unavailable) default: exit.WithError("Error getting cluster", err) } From 8e650c0c61297656fc4e26745f8b13dc8b4bce62 Mon Sep 17 00:00:00 2001 From: fenglixa Date: Sun, 2 Jun 2019 22:22:12 +0800 Subject: [PATCH 03/27] Dashboard: add --disable-settings-authorizer to avoid settings 403 forbidden --- deploy/addons/dashboard/dashboard-dp.yaml.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy/addons/dashboard/dashboard-dp.yaml.tmpl b/deploy/addons/dashboard/dashboard-dp.yaml.tmpl index 5485a675ae39..6572f032d7db 100644 --- a/deploy/addons/dashboard/dashboard-dp.yaml.tmpl +++ b/deploy/addons/dashboard/dashboard-dp.yaml.tmpl @@ -42,6 +42,8 @@ spec: ports: - containerPort: 9090 protocol: TCP + args: + - --disable-settings-authorizer livenessProbe: httpGet: path: / From 5129e6f4208ec0c5c56abd2a86c274cdbeedc1f2 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Sun, 2 Jun 2019 12:06:08 -0700 Subject: [PATCH 04/27] adding medyagh to approvers --- OWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OWNERS b/OWNERS index 3c8229ebd761..93f08aae5fba 100644 --- a/OWNERS +++ b/OWNERS @@ -6,12 +6,14 @@ reviewers: - afbjorklund - sharifelgamal - RA489 + - medyagh approvers: - balopat - tstromberg - afbjorklund - sharifelgamal - RA489 + - medyagh emeritus_approvers: - dlorenc - luxas From 8ba3e4d347f48fc891baf4945f64eb484148829c Mon Sep 17 00:00:00 2001 From: fenglixa Date: Mon, 3 Jun 2019 10:56:57 +0800 Subject: [PATCH 05/27] minikube support for k8s v1.15 --- pkg/minikube/bootstrapper/kubeadm/versions.go | 9 ++++++++- pkg/minikube/constants/constants.go | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/minikube/bootstrapper/kubeadm/versions.go b/pkg/minikube/bootstrapper/kubeadm/versions.go index 18563c0ac38e..5413d3b54f7a 100644 --- a/pkg/minikube/bootstrapper/kubeadm/versions.go +++ b/pkg/minikube/bootstrapper/kubeadm/versions.go @@ -242,7 +242,14 @@ var versionSpecificOpts = []VersionedExtraOption{ // System pods args NewUnversionedOption(Kubelet, "pod-manifest-path", "/etc/kubernetes/manifests"), - NewUnversionedOption(Kubelet, "allow-privileged", "true"), + { + Option: util.ExtraOption{ + Component: Kubelet, + Key: "allow-privileged", + Value: "true", + }, + LessThanOrEqual: semver.MustParse("1.14.2"), + }, // Network args NewUnversionedOption(Kubelet, "cluster-dns", "10.96.0.10"), diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 2610e475d589..6158ee9d3e7d 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -165,7 +165,7 @@ var DefaultISOSHAURL = DefaultISOURL + SHASuffix var DefaultKubernetesVersion = "v1.14.2" // NewestKubernetesVersion is the newest Kubernetes version to test against -var NewestKubernetesVersion = "v1.14.2" +var NewestKubernetesVersion = "v1.15.0-beta.1" // OldestKubernetesVersion is the oldest Kubernetes version to test against var OldestKubernetesVersion = "v1.10.13" From 79410c16e694c998c895989343c626d6d9c17421 Mon Sep 17 00:00:00 2001 From: fenglixa Date: Mon, 3 Jun 2019 11:23:15 +0800 Subject: [PATCH 06/27] update case according to code changes --- pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go index 7785cb8f5223..2261b9cb14c7 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go @@ -75,7 +75,7 @@ Wants=crio.service [Service] ExecStart= -ExecStart=/usr/bin/kubelet --allow-privileged=true --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver=cgroupfs --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --container-runtime=remote --container-runtime-endpoint=/var/run/crio/crio.sock --fail-swap-on=false --hostname-override=minikube --image-service-endpoint=/var/run/crio/crio.sock --kubeconfig=/etc/kubernetes/kubelet.conf --pod-manifest-path=/etc/kubernetes/manifests --runtime-request-timeout=15m +ExecStart=/usr/bin/kubelet --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver=cgroupfs --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --container-runtime=remote --container-runtime-endpoint=/var/run/crio/crio.sock --fail-swap-on=false --hostname-override=minikube --image-service-endpoint=/var/run/crio/crio.sock --kubeconfig=/etc/kubernetes/kubelet.conf --pod-manifest-path=/etc/kubernetes/manifests --runtime-request-timeout=15m [Install] `, From ed8d55c64af8e0d0e2c35d9996a96b61fc09ee6d Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Thu, 30 May 2019 13:06:01 -0700 Subject: [PATCH 07/27] Fixing TestProxy Setup making sure minikube is deleted before setup to avoid https://github.com/kubernetes/minikube/issues/4132 --- Makefile | 1 + README.md | 4 +++- cmd/minikube/cmd/dashboard.go | 35 ++++++++++++++++++++---------- docs/contributors/roadmap.md | 20 ++++++++--------- docs/drivers.md | 1 + pkg/drivers/kvm/gpu.go | 2 +- pkg/minikube/bootstrapper/certs.go | 3 ++- test/integration/proxy_test.go | 34 +++++++++++++++++++---------- 8 files changed, 64 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 84aec214d1c0..8456cd2f43d8 100755 --- a/Makefile +++ b/Makefile @@ -209,6 +209,7 @@ checksum: clean: rm -rf $(BUILD_DIR) rm -f pkg/minikube/assets/assets.go + rm -rf ./vendor .PHONY: gendocs gendocs: out/docs/minikube.md diff --git a/README.md b/README.md index 996df74da928..d4f4d36c55fc 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,15 @@ minikube's [primary goals](https://github.com/kubernetes/minikube/blob/master/do ## News +:mega: **Please fill out our [fast 5-question survey](https://forms.gle/Gg3hG5ZySw8c1C24A)** so that we can learn how & why you use minikube, and what improvements we should make. Thank you! :dancers: + * 2019-05-21 - v1.1.0 released! [[download](https://github.com/kubernetes/minikube/releases/tag/v1.1.0)] [[release notes](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-110---2019-05-21)] * 2019-04-29 - v1.0.1 released! [[download](https://github.com/kubernetes/minikube/releases/tag/v1.0.1)] [[release notes](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-101---2019-04-29)] * 2019-03-27 - v1.0.0 released! [[download](https://github.com/kubernetes/minikube/releases/tag/v1.0.0)] [[release notes](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-1000---2019-03-27)] ## Features -minikube runs the official stable release of Kubernetes, with support for standard Kubernetes features like: +minikube runs the latest stable release of Kubernetes, with support for standard Kubernetes features like: * [LoadBalancer](https://github.com/kubernetes/minikube/blob/master/docs/tunnel.md) - using `minikube tunnel` * Multi-cluster - using `minikube start -p ` diff --git a/cmd/minikube/cmd/dashboard.go b/cmd/minikube/cmd/dashboard.go index 200d285d03c1..fafe742fb0ab 100644 --- a/cmd/minikube/cmd/dashboard.go +++ b/cmd/minikube/cmd/dashboard.go @@ -26,13 +26,13 @@ import ( "regexp" "time" + "github.com/docker/machine/libmachine/mcnerror" "github.com/golang/glog" "github.com/pkg/browser" "github.com/pkg/errors" "github.com/spf13/cobra" configcmd "k8s.io/minikube/cmd/minikube/cmd/config" "k8s.io/minikube/pkg/minikube/cluster" - "k8s.io/minikube/pkg/minikube/config" pkg_config "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/console" "k8s.io/minikube/pkg/minikube/exit" @@ -59,15 +59,7 @@ var dashboardCmd = &cobra.Command{ if err != nil && !os.IsNotExist(err) { console.ErrLn("Error loading profile config: %v", err) } - err = proxy.ExcludeIP(cc.KubernetesConfig.NodeIP) // to be used for http get calls - if err != nil { - glog.Errorf("Error excluding IP from proxy: %s", err) - } - kubectl, err := exec.LookPath("kubectl") - if err != nil { - exit.WithCode(exit.NoInput, "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/") - } api, err := machine.NewAPIClient() defer func() { err := api.Close() @@ -79,6 +71,27 @@ var dashboardCmd = &cobra.Command{ if err != nil { exit.WithError("Error getting client", err) } + + if _, err = api.Load(pkg_config.GetMachineName()); err != nil { + switch err := errors.Cause(err).(type) { + case mcnerror.ErrHostDoesNotExist: + console.OutStyle(console.Meh, "%q cluster does not exist", pkg_config.GetMachineName()) + os.Exit(exit.Unavailable) + default: + exit.WithError("Error getting cluster", err) + } + } + + err = proxy.ExcludeIP(cc.KubernetesConfig.NodeIP) // to be used for http get calls + if err != nil { + glog.Errorf("Error excluding IP from proxy: %s", err) + } + + kubectl, err := exec.LookPath("kubectl") + if err != nil { + exit.WithCode(exit.NoInput, "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/") + } + cluster.EnsureMinikubeRunningOrExit(api, 1) // Send status messages to stderr for folks re-using this output. @@ -127,9 +140,9 @@ var dashboardCmd = &cobra.Command{ // kubectlProxy runs "kubectl proxy", returning host:port func kubectlProxy(path string) (*exec.Cmd, string, error) { // port=0 picks a random system port - // config.GetMachineName() respects the -p (profile) flag + // pkg_config.GetMachineName() respects the -p (profile) flag - cmd := exec.Command(path, "--context", config.GetMachineName(), "proxy", "--port=0") + cmd := exec.Command(path, "--context", pkg_config.GetMachineName(), "proxy", "--port=0") stdoutPipe, err := cmd.StdoutPipe() if err != nil { diff --git a/docs/contributors/roadmap.md b/docs/contributors/roadmap.md index 90c1ec9a73d6..b7a6f96f2f50 100644 --- a/docs/contributors/roadmap.md +++ b/docs/contributors/roadmap.md @@ -6,41 +6,41 @@ Please send a PR to suggest any improvements to it. ## (#1) User-friendly and accessible -- [ ] Creation of a user-centric minikube website for installation & documentation -- [ ] Localized output to 5+ written languages +- [ ] Creation of a user-centric minikube website for installation & documentation [#4388](https://github.com/kubernetes/minikube/issues/4388) +- [ ] Localized output to 5+ written languages [#4186](https://github.com/kubernetes/minikube/issues/4186) [#4185](https://github.com/kubernetes/minikube/issues/4185) - [x] Make minikube usable in environments with challenging connectivity requirements -- [ ] Support lightweight deployment methods for environments where VM's are impractical +- [ ] Support lightweight deployment methods for environments where VM's are impractical [#4389](https://github.com/kubernetes/minikube/issues/4389) [#4390](https://github.com/kubernetes/minikube/issues/4390) - [x] Add offline support ## (#2) Inclusive and community-driven - [x] Increase community involvement in planning and decision making -- [ ] Make the continuous integration and release infrastructure publicly available +- [ ] Make the continuous integration and release infrastructure publicly available [#3256](https://github.com/kubernetes/minikube/issues/4390) - [x] Double the number of active maintainers ## (#3) Cross-platform -- [ ] Simplified installation process across all supported platforms -- [ ] Users should never need to separately install supporting binaries +- [ ] Users should never need to separately install supporting binaries [#3975](https://github.com/kubernetes/minikube/issues/3975) [#4391](https://github.com/kubernetes/minikube/issues/4391) +- [ ] Simplified installation process across all supported platforms ## (#4) Support all Kubernetes features -- [ ] Add multi-node support +- [ ] Add multi-node support [#94](https://github.com/kubernetes/minikube/issues/94) ## (#5) High-fidelity -- [ ] Reduce guest VM overhead by 50% +- [ ] Reduce guest VM overhead by 50% [#3207](https://github.com/kubernetes/minikube/issues/3207) - [x] Disable swap in the guest VM ## (#6) Compatible with all supported Kubernetes releases - [x] Continuous Integration testing across all supported Kubernetes releases -- [ ] Automatic PR generation for updating the default Kubernetes release minikube uses +- [ ] Automatic PR generation for updating the default Kubernetes release minikube uses [#4392](https://github.com/kubernetes/minikube/issues/4392) ## (#7) Support for all Kubernetes-friendly container runtimes - [x] Run all integration tests across all supported container runtimes -- [ ] Support for Kata Containers (help wanted!) +- [ ] Support for Kata Containers [#4347](https://github.com/kubernetes/minikube/issues/4347) ## (#8) Stable and easy to debug diff --git a/docs/drivers.md b/docs/drivers.md index 9200204e65a4..14a63bf8a0aa 100644 --- a/docs/drivers.md +++ b/docs/drivers.md @@ -92,6 +92,7 @@ In case the default network doesn't exist you can define it. ```shell curl https://raw.githubusercontent.com/libvirt/libvirt/master/src/network/default.xml > kvm-default.xml virsh net-define kvm-default.xml +virsh net-start default ``` ## Hyperkit driver diff --git a/pkg/drivers/kvm/gpu.go b/pkg/drivers/kvm/gpu.go index 39b455596137..6c9043de5ba7 100644 --- a/pkg/drivers/kvm/gpu.go +++ b/pkg/drivers/kvm/gpu.go @@ -174,7 +174,7 @@ func isIsolated(device string) bool { iommuGroupPath := filepath.Join(sysFsPCIDevicesPath, device, "iommu_group", "devices") otherDevices, err := ioutil.ReadDir(iommuGroupPath) if err != nil { - log.Infof("Error reading %q: %v", iommuGroupPath) + log.Infof("Error reading %q: %v", iommuGroupPath, err) return false } diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index bde242f453a1..2fb234a22204 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -17,6 +17,7 @@ limitations under the License. package bootstrapper import ( + "fmt" "net" "path" "path/filepath" @@ -66,7 +67,7 @@ func SetupCerts(cmd CommandRunner, k8s config.KubernetesConfig) error { kubeCfgSetup := &util.KubeConfigSetup{ ClusterName: k8s.NodeName, - ClusterServerAddress: "https://localhost:8443", + ClusterServerAddress: fmt.Sprintf("https://localhost:%d", k8s.NodePort), ClientCertificate: path.Join(util.DefaultCertPath, "apiserver.crt"), ClientKey: path.Join(util.DefaultCertPath, "apiserver.key"), CertificateAuthority: path.Join(util.DefaultCertPath, "ca.crt"), diff --git a/test/integration/proxy_test.go b/test/integration/proxy_test.go index 96f84c67c03f..c407af74d2da 100644 --- a/test/integration/proxy_test.go +++ b/test/integration/proxy_test.go @@ -68,7 +68,17 @@ func TestProxy(t *testing.T) { t.Fatalf("Failed to set up the test proxy: %s", err) } - defer func(t *testing.T) { // Clean up after setting up proxy + // making sure there is no running miniukube to avoid https://github.com/kubernetes/minikube/issues/4132 + r := NewMinikubeRunner(t) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) + defer cancel() + _, _, err = r.RunWithContext(ctx, "delete") + if err != nil { + t.Logf("Error deleting minikube before test setup %s : ", err) + } + + // Clean up after setting up proxy + defer func(t *testing.T) { err = os.Setenv("HTTP_PROXY", origHP) if err != nil { t.Errorf("Error reverting the HTTP_PROXY env") @@ -82,28 +92,29 @@ func TestProxy(t *testing.T) { if err != nil { t.Errorf("Error shutting down the http proxy") } + + _, _, err = r.RunWithContext(ctx, "delete") + if err != nil { + t.Logf("Error deleting minikube when cleaning up proxy setup: %s", err) + } }(t) - t.Run("ConsoleWarnning", testProxyWarning) - t.Run("DashboardProxy", testDashboard) + t.Run("Proxy Console Warnning", testProxyWarning) + t.Run("Proxy Dashboard", testProxyDashboard) } // testProxyWarning checks user is warned correctly about the proxy related env vars func testProxyWarning(t *testing.T) { - mk := NewMinikubeRunner(t) - // Start a timer for all remaining commands, to display failure output before a panic. - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) + r := NewMinikubeRunner(t) + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) defer cancel() - startCmd := fmt.Sprintf("start %s %s %s", mk.StartArgs, mk.Args, "--alsologtostderr --v=5") - stdout, stderr, err := mk.RunWithContext(ctx, startCmd) + startCmd := fmt.Sprintf("start %s %s %s", r.StartArgs, r.Args, "--alsologtostderr --v=5") + stdout, stderr, err := r.RunWithContext(ctx, startCmd) if err != nil { t.Fatalf("start: %v\nstdout: %s\nstderr: %s", err, stdout, stderr) } - mk.EnsureRunning() - // Pre-cleanup: this usually fails, because no instance is running. - // mk.RunWithContext(ctx, "delete") msg := "Found network options:" if !strings.Contains(stdout, msg) { t.Errorf("Proxy wranning (%s) is missing from the output: %s", msg, stderr) @@ -113,5 +124,4 @@ func testProxyWarning(t *testing.T) { if !strings.Contains(stderr, msg) { t.Errorf("Proxy wranning (%s) is missing from the output: %s", msg, stderr) } - } From 15cc4f8a64ddf59a9647d9519e4410b54d20669e Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 3 Jun 2019 19:22:26 -0700 Subject: [PATCH 08/27] Adding non-parallel dashboard test for proxy --- test/integration/proxy_test.go | 37 +++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/test/integration/proxy_test.go b/test/integration/proxy_test.go index c407af74d2da..7896e3e8df90 100644 --- a/test/integration/proxy_test.go +++ b/test/integration/proxy_test.go @@ -21,12 +21,14 @@ package integration import ( "context" "fmt" + "io/ioutil" "os" "strings" "testing" "time" "net/http" + "net/url" "github.com/elazarl/goproxy" "github.com/phayes/freeport" @@ -107,7 +109,7 @@ func TestProxy(t *testing.T) { // testProxyWarning checks user is warned correctly about the proxy related env vars func testProxyWarning(t *testing.T) { r := NewMinikubeRunner(t) - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) defer cancel() startCmd := fmt.Sprintf("start %s %s %s", r.StartArgs, r.Args, "--alsologtostderr --v=5") stdout, stderr, err := r.RunWithContext(ctx, startCmd) @@ -125,3 +127,36 @@ func testProxyWarning(t *testing.T) { t.Errorf("Proxy wranning (%s) is missing from the output: %s", msg, stderr) } } + +// testProxyDashboard checks if dashboard URL is accessible if proxy is set +func testProxyDashboard(t *testing.T) { + minikubeRunner := NewMinikubeRunner(t) + cmd, out := minikubeRunner.RunDaemon("dashboard --url") + defer func() { + err := cmd.Process.Kill() + if err != nil { + t.Logf("Failed to kill dashboard command: %v", err) + } + }() + + s, err := readLineWithTimeout(out, 180*time.Second) + if err != nil { + t.Fatalf("failed to read url: %v", err) + } + + u, err := url.Parse(strings.TrimSpace(s)) + if err != nil { + t.Fatalf("failed to parse %q: %v", s, err) + } + resp, err := http.Get(u.String()) + if err != nil { + t.Fatalf("failed get: %v", err) + } + if resp.StatusCode != http.StatusOK { + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatalf("Unable to read http response body: %v", err) + } + t.Errorf("%s returned status code %d, expected %d.\nbody:\n%s", u, resp.StatusCode, http.StatusOK, body) + } +} From 6d57b28fddef39c0eeffd95de266cd37a2dbfdb0 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 3 Jun 2019 20:27:26 -0700 Subject: [PATCH 09/27] changing string driver name to checked type --- cmd/minikube/cmd/delete.go | 2 +- cmd/minikube/cmd/env.go | 3 ++- cmd/minikube/cmd/mount.go | 2 +- cmd/minikube/cmd/ssh.go | 3 ++- pkg/drivers/none/none.go | 3 ++- pkg/minikube/cluster/cluster.go | 4 ++-- pkg/minikube/drivers/none/driver.go | 2 +- pkg/minikube/machine/client.go | 4 ++-- 8 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index c0c897798408..096886842316 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -56,7 +56,7 @@ associated files.`, } // In the case of "none", we want to uninstall Kubernetes as there is no VM to delete - if err == nil && cc.MachineConfig.VMDriver == "none" { + if err == nil && cc.MachineConfig.VMDriver == constants.DriverNone { kc := cc.KubernetesConfig bsName := viper.GetString(cmdcfg.Bootstrapper) console.OutStyle(console.Resetting, "Uninstalling Kubernetes %s using %s ...", kc.KubernetesVersion, bsName) diff --git a/cmd/minikube/cmd/env.go b/cmd/minikube/cmd/env.go index 8bd4cad6042d..cf4d669178a2 100644 --- a/cmd/minikube/cmd/env.go +++ b/cmd/minikube/cmd/env.go @@ -35,6 +35,7 @@ import ( "github.com/spf13/cobra" "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" "k8s.io/minikube/pkg/minikube/machine" ) @@ -342,7 +343,7 @@ var dockerEnvCmd = &cobra.Command{ if err != nil { exit.WithError("Error getting host", err) } - if host.Driver.DriverName() == "none" { + if host.Driver.DriverName() == constants.DriverNone { exit.Usage(`'none' driver does not support 'minikube docker-env' command`) } hostSt, err := cluster.GetHostStatus(api) diff --git a/cmd/minikube/cmd/mount.go b/cmd/minikube/cmd/mount.go index ec9d452bba07..a91d38a2660d 100644 --- a/cmd/minikube/cmd/mount.go +++ b/cmd/minikube/cmd/mount.go @@ -102,7 +102,7 @@ var mountCmd = &cobra.Command{ if err != nil { exit.WithError("Error loading api", err) } - if host.Driver.DriverName() == "none" { + if host.Driver.DriverName() == constants.DriverNone { exit.Usage(`'none' driver does not support 'minikube mount' command`) } var ip net.IP diff --git a/cmd/minikube/cmd/ssh.go b/cmd/minikube/cmd/ssh.go index ab79e950dd54..e791f6933095 100644 --- a/cmd/minikube/cmd/ssh.go +++ b/cmd/minikube/cmd/ssh.go @@ -23,6 +23,7 @@ import ( "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/console" + "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" "k8s.io/minikube/pkg/minikube/machine" ) @@ -42,7 +43,7 @@ var sshCmd = &cobra.Command{ if err != nil { exit.WithError("Error getting host", err) } - if host.Driver.DriverName() == "none" { + if host.Driver.DriverName() == constants.DriverNone { exit.Usage("'none' driver does not support 'minikube ssh' command") } err = cluster.CreateSSHShell(api, args) diff --git a/pkg/drivers/none/none.go b/pkg/drivers/none/none.go index 76ca08f08223..ec2218f4d777 100644 --- a/pkg/drivers/none/none.go +++ b/pkg/drivers/none/none.go @@ -27,10 +27,11 @@ import ( "k8s.io/apimachinery/pkg/util/net" pkgdrivers "k8s.io/minikube/pkg/drivers" // TODO(tstromberg): Extract CommandRunner into its own package "k8s.io/minikube/pkg/minikube/bootstrapper" + "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/cruntime" ) -const driverName = "none" +const driverName = constants.DriverNone // cleanupPaths are paths to be removed by cleanup, and are used by both kubeadm and minikube. var cleanupPaths = []string{ diff --git a/pkg/minikube/cluster/cluster.go b/pkg/minikube/cluster/cluster.go index 740db7973e09..4d4b2cf310af 100644 --- a/pkg/minikube/cluster/cluster.go +++ b/pkg/minikube/cluster/cluster.go @@ -72,7 +72,7 @@ func init() { // CacheISO downloads and caches ISO. func CacheISO(config cfg.MachineConfig) error { - if config.VMDriver != "none" { + if config.MachineConfig.VMDriver == constants.DriverNone { if err := config.Downloader.CacheMinikubeISOFromURL(config.MinikubeISO); err != nil { return err } @@ -154,7 +154,7 @@ func configureHost(h *host.Host, e *engine.Options) error { } } - if h.Driver.DriverName() != "none" { + if h.Driver.DriverName() != constants.DriverNone { if err := h.ConfigureAuth(); err != nil { return &util.RetriableError{Err: errors.Wrap(err, "Error configuring auth on host")} } diff --git a/pkg/minikube/drivers/none/driver.go b/pkg/minikube/drivers/none/driver.go index 5e7c66d022ce..6233a91251ae 100644 --- a/pkg/minikube/drivers/none/driver.go +++ b/pkg/minikube/drivers/none/driver.go @@ -28,7 +28,7 @@ import ( func init() { if err := registry.Register(registry.DriverDef{ - Name: "none", + Name: constants.DriverNone, Builtin: true, ConfigCreator: createNoneHost, DriverCreator: func() drivers.Driver { diff --git a/pkg/minikube/machine/client.go b/pkg/minikube/machine/client.go index b238665e631d..bdd6abc1122a 100644 --- a/pkg/minikube/machine/client.go +++ b/pkg/minikube/machine/client.go @@ -189,7 +189,7 @@ func (api *LocalClient) Create(h *host.Host) error { { "waiting", func() error { - if h.Driver.DriverName() == "none" { + if h.Driver.DriverName() == constants.DriverNone { return nil } return mcnutils.WaitFor(drivers.MachineInState(h.Driver, state.Running)) @@ -198,7 +198,7 @@ func (api *LocalClient) Create(h *host.Host) error { { "provisioning", func() error { - if h.Driver.DriverName() == "none" { + if h.Driver.DriverName() == constants.DriverNone { return nil } pv := provision.NewBuildrootProvisioner(h.Driver) From 79ba9a17a2ea573ce67fed7eaa34892270b53d98 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 3 Jun 2019 20:32:29 -0700 Subject: [PATCH 10/27] typo --- pkg/minikube/cluster/cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/cluster/cluster.go b/pkg/minikube/cluster/cluster.go index 4d4b2cf310af..aa1fe9f82bbe 100644 --- a/pkg/minikube/cluster/cluster.go +++ b/pkg/minikube/cluster/cluster.go @@ -72,7 +72,7 @@ func init() { // CacheISO downloads and caches ISO. func CacheISO(config cfg.MachineConfig) error { - if config.MachineConfig.VMDriver == constants.DriverNone { + if config.VMDriver == constants.DriverNone { if err := config.Downloader.CacheMinikubeISOFromURL(config.MinikubeISO); err != nil { return err } From 7c8a0e224bc91c21342de6cbedbb4664d2be049d Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 4 Jun 2019 09:25:06 -0700 Subject: [PATCH 11/27] fix mistake logic --- pkg/minikube/cluster/cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/cluster/cluster.go b/pkg/minikube/cluster/cluster.go index aa1fe9f82bbe..33fa7060d290 100644 --- a/pkg/minikube/cluster/cluster.go +++ b/pkg/minikube/cluster/cluster.go @@ -72,7 +72,7 @@ func init() { // CacheISO downloads and caches ISO. func CacheISO(config cfg.MachineConfig) error { - if config.VMDriver == constants.DriverNone { + if config.VMDriver != constants.DriverNone { if err := config.Downloader.CacheMinikubeISOFromURL(config.MinikubeISO); err != nil { return err } From bb78d3eb317bf31733a680be8cf467f2d8d457f6 Mon Sep 17 00:00:00 2001 From: Pradip-Khakurel Date: Wed, 5 Jun 2019 23:30:13 +0200 Subject: [PATCH 12/27] fix ShowDriverDeprecationNotification config setting --- cmd/minikube/cmd/config/config.go | 4 ++++ pkg/minikube/cluster/cluster.go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/minikube/cmd/config/config.go b/cmd/minikube/cmd/config/config.go index 9982f0f57062..e8143caabc9b 100644 --- a/cmd/minikube/cmd/config/config.go +++ b/cmd/minikube/cmd/config/config.go @@ -131,6 +131,10 @@ var settings = []Setting{ name: Bootstrapper, set: SetString, //TODO(r2d4): more validation here? }, + { + name: config.ShowDriverDeprecationNotification, + set: SetBool, + }, { name: config.ShowBootstrapperDeprecationNotification, set: SetBool, diff --git a/pkg/minikube/cluster/cluster.go b/pkg/minikube/cluster/cluster.go index 33fa7060d290..40089d0f0b39 100644 --- a/pkg/minikube/cluster/cluster.go +++ b/pkg/minikube/cluster/cluster.go @@ -325,21 +325,21 @@ func preCreateHost(config *cfg.MachineConfig) { console.Warning(`The kvm driver is deprecated and support for it will be removed in a future release. Please consider switching to the kvm2 driver, which is intended to replace the kvm driver. See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver for more information. - To disable this message, run [minikube config set WantShowDriverDeprecationNotification false]`) + To disable this message, run [minikube config set ShowDriverDeprecationNotification false]`) } case "xhyve": if viper.GetBool(cfg.ShowDriverDeprecationNotification) { console.Warning(`The xhyve driver is deprecated and support for it will be removed in a future release. Please consider switching to the hyperkit driver, which is intended to replace the xhyve driver. See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver for more information. -To disable this message, run [minikube config set WantShowDriverDeprecationNotification false]`) +To disable this message, run [minikube config set ShowDriverDeprecationNotification false]`) } case "vmwarefusion": if viper.GetBool(cfg.ShowDriverDeprecationNotification) { console.Warning(`The vmwarefusion driver is deprecated and support for it will be removed in a future release. Please consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver. See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver for more information. - To disable this message, run [minikube config set WantShowDriverDeprecationNotification false]`) + To disable this message, run [minikube config set ShowDriverDeprecationNotification false]`) } } } From bb8ab6d3e384ca64db0fd20434d3271c177703c7 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 5 Jun 2019 15:21:55 -0700 Subject: [PATCH 13/27] adding hyperv integration script --- .../windows_integration_test_hyperv.ps1 | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 hack/jenkins/windows_integration_test_hyperv.ps1 diff --git a/hack/jenkins/windows_integration_test_hyperv.ps1 b/hack/jenkins/windows_integration_test_hyperv.ps1 new file mode 100644 index 000000000000..174159efaf1a --- /dev/null +++ b/hack/jenkins/windows_integration_test_hyperv.ps1 @@ -0,0 +1,32 @@ +# Copyright 2019 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +mkdir -p out +gsutil.cmd -m cp gs://minikube-builds/$env:MINIKUBE_LOCATION/minikube-windows-amd64.exe out/ +gsutil.cmd -m cp gs://minikube-builds/$env:MINIKUBE_LOCATION/e2e-windows-amd64.exe out/ +gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/testdata . + +./out/minikube-windows-amd64.exe delete + +out/e2e-windows-amd64.exe -minikube-start-args="--vm-driver=hyperv --hyperv-virtual-switch=primary-virtual-switch --bootstrapper=kubeadm" -minikube-args="--v=10 --logtostderr" -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=65m +$env:result=$lastexitcode +# If the last exit code was 0->success, x>0->error +If($env:result -eq 0){$env:status="success"} +Else {$env:status="failure"} + +$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/Windows-hyperv.txt" +$json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"Windows-hyperv`"}" +Invoke-WebRequest -Uri "https://api.github.com/repos/kubernetes/minikube/statuses/$env:COMMIT`?access_token=$env:access_token" -Body $json -ContentType "application/json" -Method Post -usebasicparsing + +Exit $env:result From b9ecd558e836ef1d3c6c40096b5fa0ee7c761aaa Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 5 Jun 2019 16:58:52 -0700 Subject: [PATCH 14/27] fixing file path for windows --- test/integration/tunnel_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/integration/tunnel_test.go b/test/integration/tunnel_test.go index 3a487d1df492..8051049be3cd 100644 --- a/test/integration/tunnel_test.go +++ b/test/integration/tunnel_test.go @@ -21,6 +21,7 @@ import ( "io/ioutil" "net/http" "os/exec" + "path" "path/filepath" "runtime" "strings" @@ -62,7 +63,11 @@ func testTunnel(t *testing.T) { kubectlRunner := util.NewKubectlRunner(t) t.Log("deploying nginx...") - podPath, _ := filepath.Abs("testdata/testsvc.yaml") + curdir, err := filepath.Abs("") + if err != nil { + t.Errorf("Error getting the file path for current directory: %s", curdir) + } + podPath := path.Join(curdir, "testdata/testsvc.yaml") if _, err := kubectlRunner.RunCommand([]string{"apply", "-f", podPath}); err != nil { t.Fatalf("creating nginx ingress resource: %s", err) } From c58a3b63db0095ce807bf7e011581f3db8790b1c Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 5 Jun 2019 17:15:35 -0700 Subject: [PATCH 15/27] Fixing filepath to be os agnostic --- test/integration/addons_test.go | 21 +++++++++++++++++---- test/integration/mount_test.go | 7 ++++++- test/integration/persistence_test.go | 7 ++++++- test/integration/tunnel_test.go | 2 +- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index 748894f2e0ba..682cffdc2f2c 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -25,6 +25,7 @@ import ( "net" "net/http" "net/url" + "path" "path/filepath" "strings" "testing" @@ -131,12 +132,16 @@ func testIngressController(t *testing.T) { t.Fatalf("waiting for default-http-backend to be up: %v", err) } - ingressPath, _ := filepath.Abs("testdata/nginx-ing.yaml") + curdir, err := filepath.Abs("") + if err != nil { + t.Errorf("Error getting the file path for current directory: %s", curdir) + } + ingressPath := path.Join(curdir, "testdata", "nginx-ing.yaml") if _, err := kubectlRunner.RunCommand([]string{"create", "-f", ingressPath}); err != nil { t.Fatalf("creating nginx ingress resource: %v", err) } - podPath, _ := filepath.Abs("testdata/nginx-pod-svc.yaml") + podPath := path.Join(curdir, "testdata", "nginx-pod-svc.yaml") if _, err := kubectlRunner.RunCommand([]string{"create", "-f", podPath}); err != nil { t.Fatalf("creating nginx ingress resource: %v", err) } @@ -248,7 +253,11 @@ func testGvisorRestart(t *testing.T) { func createUntrustedWorkload(t *testing.T) { kubectlRunner := util.NewKubectlRunner(t) - untrustedPath, _ := filepath.Abs("testdata/nginx-untrusted.yaml") + curdir, err := filepath.Abs("") + if err != nil { + t.Errorf("Error getting the file path for current directory: %s", curdir) + } + untrustedPath := path.Join(curdir, "testdata", "nginx-untrusted.yaml") t.Log("creating pod with untrusted workload annotation") if _, err := kubectlRunner.RunCommand([]string{"replace", "-f", untrustedPath, "--force"}); err != nil { t.Fatalf("creating untrusted nginx resource: %v", err) @@ -257,7 +266,11 @@ func createUntrustedWorkload(t *testing.T) { func deleteUntrustedWorkload(t *testing.T) { kubectlRunner := util.NewKubectlRunner(t) - untrustedPath, _ := filepath.Abs("testdata/nginx-untrusted.yaml") + curdir, err := filepath.Abs("") + if err != nil { + t.Errorf("Error getting the file path for current directory: %s", curdir) + } + untrustedPath := path.Join(curdir, "testdata", "nginx-untrusted.yaml") if _, err := kubectlRunner.RunCommand([]string{"delete", "-f", untrustedPath}); err != nil { t.Logf("error deleting untrusted nginx resource: %v", err) } diff --git a/test/integration/mount_test.go b/test/integration/mount_test.go index 156e44e6cd0a..a55d04e41700 100644 --- a/test/integration/mount_test.go +++ b/test/integration/mount_test.go @@ -22,6 +22,7 @@ import ( "fmt" "io/ioutil" "os" + "path" "path/filepath" "runtime" "strings" @@ -61,7 +62,11 @@ func testMounting(t *testing.T) { kubectlRunner := util.NewKubectlRunner(t) podName := "busybox-mount" - podPath, _ := filepath.Abs("testdata/busybox-mount-test.yaml") + curdir, err := filepath.Abs("") + if err != nil { + t.Errorf("Error getting the file path for current directory: %s", curdir) + } + podPath := path.Join(curdir, "testdata", "busybox-mount-test.yaml") // Write file in mounted dir from host expected := "test\n" diff --git a/test/integration/persistence_test.go b/test/integration/persistence_test.go index 0d889ee9dd9e..158c70668d49 100644 --- a/test/integration/persistence_test.go +++ b/test/integration/persistence_test.go @@ -19,6 +19,7 @@ limitations under the License. package integration import ( + "path" "path/filepath" "strings" "testing" @@ -36,7 +37,11 @@ func TestPersistence(t *testing.T) { minikubeRunner.EnsureRunning() kubectlRunner := util.NewKubectlRunner(t) - podPath, _ := filepath.Abs("testdata/busybox.yaml") + curdir, err := filepath.Abs("") + if err != nil { + t.Errorf("Error getting the file path for current directory: %s", curdir) + } + podPath := path.Join(curdir, "testdata", "busybox.yaml") // Create a pod and wait for it to be running. if _, err := kubectlRunner.RunCommand([]string{"create", "-f", podPath}); err != nil { diff --git a/test/integration/tunnel_test.go b/test/integration/tunnel_test.go index 8051049be3cd..d869938f1820 100644 --- a/test/integration/tunnel_test.go +++ b/test/integration/tunnel_test.go @@ -67,7 +67,7 @@ func testTunnel(t *testing.T) { if err != nil { t.Errorf("Error getting the file path for current directory: %s", curdir) } - podPath := path.Join(curdir, "testdata/testsvc.yaml") + podPath := path.Join(curdir, "testdata", "testsvc.yaml") if _, err := kubectlRunner.RunCommand([]string{"apply", "-f", podPath}); err != nil { t.Fatalf("creating nginx ingress resource: %s", err) } From f4aaef7d2592eff73bab4c8faec09d898d13b0ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Thu, 6 Jun 2019 12:57:27 +0200 Subject: [PATCH 16/27] Cache: don't use ssh runner for the none driver --- pkg/minikube/machine/cache_images.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/minikube/machine/cache_images.go b/pkg/minikube/machine/cache_images.go index e6b591de4dcb..2f807e24b2e3 100644 --- a/pkg/minikube/machine/cache_images.go +++ b/pkg/minikube/machine/cache_images.go @@ -41,7 +41,6 @@ import ( "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/cruntime" - "k8s.io/minikube/pkg/minikube/sshutil" ) const tempLoadDir = "/tmp" @@ -129,11 +128,10 @@ func CacheAndLoadImages(images []string) error { return err } - client, err := sshutil.NewSSHClient(h.Driver) + runner, err := CommandRunner(h) if err != nil { return err } - runner := bootstrapper.NewSSHRunner(client) return LoadImages(runner, images, constants.ImageCacheDir) } From 34bd9beca82b896294dcfeb941e80fb70229f776 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Thu, 6 Jun 2019 21:00:34 +0200 Subject: [PATCH 17/27] Add libvirt and qemu-kvm install docs for openSUSE/SLES --- docs/drivers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/drivers.md b/docs/drivers.md index 14a63bf8a0aa..4480efb2962a 100644 --- a/docs/drivers.md +++ b/docs/drivers.md @@ -21,6 +21,7 @@ To install the KVM2 driver, first install and configure the prerequisites, namel * Debian or Ubuntu 18.x: `sudo apt install libvirt-clients libvirt-daemon-system qemu-kvm` * Ubuntu 16.x or older: `sudo apt install libvirt-bin libvirt-daemon-system qemu-kvm` * Fedora/CentOS/RHEL: `sudo yum install libvirt-daemon-kvm qemu-kvm` +* openSUSE/SLES: `sudo zypper install libvirt qemu-kvm` Check your installed virsh version: From 7119f570457ec6655c9dafc3e295b8fbcb015d21 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Thu, 6 Jun 2019 14:12:09 -0700 Subject: [PATCH 18/27] Upgrade to kubernetes 1.14.3 --- .../kubeadm/testdata/containerd-api-port__default.yaml | 2 +- .../testdata/containerd-pod-network-cidr__default.yaml | 2 +- .../bootstrapper/kubeadm/testdata/containerd__default.yaml | 2 +- .../kubeadm/testdata/crio-options-gates__default.yaml | 2 +- pkg/minikube/bootstrapper/kubeadm/testdata/crio__default.yaml | 2 +- .../bootstrapper/kubeadm/testdata/default__default.yaml | 2 +- .../kubeadm/testdata/image-repository__default.yaml | 2 +- .../bootstrapper/kubeadm/testdata/options__default.yaml | 2 +- pkg/minikube/constants/constants.go | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/minikube/bootstrapper/kubeadm/testdata/containerd-api-port__default.yaml b/pkg/minikube/bootstrapper/kubeadm/testdata/containerd-api-port__default.yaml index 8ceb75fdfe93..f6b37397cae5 100644 --- a/pkg/minikube/bootstrapper/kubeadm/testdata/containerd-api-port__default.yaml +++ b/pkg/minikube/bootstrapper/kubeadm/testdata/containerd-api-port__default.yaml @@ -28,7 +28,7 @@ dns: etcd: local: dataDir: /data/minikube -kubernetesVersion: v1.14.2 +kubernetesVersion: v1.14.3 networking: dnsDomain: cluster.local podSubnet: "" diff --git a/pkg/minikube/bootstrapper/kubeadm/testdata/containerd-pod-network-cidr__default.yaml b/pkg/minikube/bootstrapper/kubeadm/testdata/containerd-pod-network-cidr__default.yaml index d7b9dadfa5d7..f11516f99dc7 100644 --- a/pkg/minikube/bootstrapper/kubeadm/testdata/containerd-pod-network-cidr__default.yaml +++ b/pkg/minikube/bootstrapper/kubeadm/testdata/containerd-pod-network-cidr__default.yaml @@ -28,7 +28,7 @@ dns: etcd: local: dataDir: /data/minikube -kubernetesVersion: v1.14.2 +kubernetesVersion: v1.14.3 networking: dnsDomain: cluster.local podSubnet: "" diff --git a/pkg/minikube/bootstrapper/kubeadm/testdata/containerd__default.yaml b/pkg/minikube/bootstrapper/kubeadm/testdata/containerd__default.yaml index d7b9dadfa5d7..f11516f99dc7 100644 --- a/pkg/minikube/bootstrapper/kubeadm/testdata/containerd__default.yaml +++ b/pkg/minikube/bootstrapper/kubeadm/testdata/containerd__default.yaml @@ -28,7 +28,7 @@ dns: etcd: local: dataDir: /data/minikube -kubernetesVersion: v1.14.2 +kubernetesVersion: v1.14.3 networking: dnsDomain: cluster.local podSubnet: "" diff --git a/pkg/minikube/bootstrapper/kubeadm/testdata/crio-options-gates__default.yaml b/pkg/minikube/bootstrapper/kubeadm/testdata/crio-options-gates__default.yaml index 0ed6fe561c97..cdef8bafa1aa 100644 --- a/pkg/minikube/bootstrapper/kubeadm/testdata/crio-options-gates__default.yaml +++ b/pkg/minikube/bootstrapper/kubeadm/testdata/crio-options-gates__default.yaml @@ -38,7 +38,7 @@ dns: etcd: local: dataDir: /data/minikube -kubernetesVersion: v1.14.2 +kubernetesVersion: v1.14.3 networking: dnsDomain: cluster.local podSubnet: "" diff --git a/pkg/minikube/bootstrapper/kubeadm/testdata/crio__default.yaml b/pkg/minikube/bootstrapper/kubeadm/testdata/crio__default.yaml index 161f27cd44ec..bf8ba7daefa5 100644 --- a/pkg/minikube/bootstrapper/kubeadm/testdata/crio__default.yaml +++ b/pkg/minikube/bootstrapper/kubeadm/testdata/crio__default.yaml @@ -28,7 +28,7 @@ dns: etcd: local: dataDir: /data/minikube -kubernetesVersion: v1.14.2 +kubernetesVersion: v1.14.3 networking: dnsDomain: cluster.local podSubnet: "" diff --git a/pkg/minikube/bootstrapper/kubeadm/testdata/default__default.yaml b/pkg/minikube/bootstrapper/kubeadm/testdata/default__default.yaml index 4dfbcf8cbd21..d2dc46469314 100644 --- a/pkg/minikube/bootstrapper/kubeadm/testdata/default__default.yaml +++ b/pkg/minikube/bootstrapper/kubeadm/testdata/default__default.yaml @@ -28,7 +28,7 @@ dns: etcd: local: dataDir: /data/minikube -kubernetesVersion: v1.14.2 +kubernetesVersion: v1.14.3 networking: dnsDomain: cluster.local podSubnet: "" diff --git a/pkg/minikube/bootstrapper/kubeadm/testdata/image-repository__default.yaml b/pkg/minikube/bootstrapper/kubeadm/testdata/image-repository__default.yaml index 302a7384c622..66cab56ad3ea 100644 --- a/pkg/minikube/bootstrapper/kubeadm/testdata/image-repository__default.yaml +++ b/pkg/minikube/bootstrapper/kubeadm/testdata/image-repository__default.yaml @@ -29,7 +29,7 @@ dns: etcd: local: dataDir: /data/minikube -kubernetesVersion: v1.14.2 +kubernetesVersion: v1.14.3 networking: dnsDomain: cluster.local podSubnet: "" diff --git a/pkg/minikube/bootstrapper/kubeadm/testdata/options__default.yaml b/pkg/minikube/bootstrapper/kubeadm/testdata/options__default.yaml index f60518978517..1c1ff1c39522 100644 --- a/pkg/minikube/bootstrapper/kubeadm/testdata/options__default.yaml +++ b/pkg/minikube/bootstrapper/kubeadm/testdata/options__default.yaml @@ -35,7 +35,7 @@ dns: etcd: local: dataDir: /data/minikube -kubernetesVersion: v1.14.2 +kubernetesVersion: v1.14.3 networking: dnsDomain: cluster.local podSubnet: "" diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 2610e475d589..1a3453b896c2 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -162,10 +162,10 @@ var DefaultISOURL = fmt.Sprintf("https://storage.googleapis.com/%s/minikube-%s.i var DefaultISOSHAURL = DefaultISOURL + SHASuffix // DefaultKubernetesVersion is the default kubernetes version -var DefaultKubernetesVersion = "v1.14.2" +var DefaultKubernetesVersion = "v1.14.3" // NewestKubernetesVersion is the newest Kubernetes version to test against -var NewestKubernetesVersion = "v1.14.2" +var NewestKubernetesVersion = "v1.14.3" // OldestKubernetesVersion is the oldest Kubernetes version to test against var OldestKubernetesVersion = "v1.10.13" From 9a7d0a0d1b1f5808f8ac0787fbb1a80ab30b5a74 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Fri, 7 Jun 2019 12:07:14 -0700 Subject: [PATCH 19/27] Update Makefile for 1.1.1 release --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8456cd2f43d8..eb2ac2f61d8c 100755 --- a/Makefile +++ b/Makefile @@ -15,9 +15,9 @@ # Bump these on release - and please check ISO_VERSION for correctness. VERSION_MAJOR ?= 1 VERSION_MINOR ?= 1 -VERSION_BUILD ?= 0 +VERSION_BUILD ?= 1 # Default to .0 for higher cache hit rates, as build increments typically don't require new ISO versions -ISO_VERSION ?= v$(VERSION_MAJOR).$(VERSION_MINOR).0 +ISO_VERSION ?= v$(VERSION_MAJOR).$(VERSION_MINOR).1 VERSION ?= v$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_BUILD) DEB_VERSION ?= $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_BUILD) From 993c86c82bc6699e4380d36e248a2e76a55982d8 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Fri, 7 Jun 2019 13:01:13 -0700 Subject: [PATCH 20/27] Update CHANGELOG for 1.1.1 release --- CHANGELOG.md | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba6d6a0ebb7a..996c8c71461a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,100 @@ # Minikube Release Notes +# Version 1.1.1 - 2019-06-07 + +* Upgrade to kubernetes 1.14.3 [#4444](https://github.com/kubernetes/minikube/pull/4444) +* fix ShowDriverDeprecationNotification config setting [#4431](https://github.com/kubernetes/minikube/pull/4431) +* Add libvirt and qemu-kvm install docs for openSUSE/SLES [#4443](https://github.com/kubernetes/minikube/pull/4443) +* Cache: don't use ssh runner for the none driver [#4439](https://github.com/kubernetes/minikube/pull/4439) +* Fixing file path for windows [#4434](https://github.com/kubernetes/minikube/pull/4434) +* Improve type check for driver none [#4419](https://github.com/kubernetes/minikube/pull/4419) +* Dashboard: add --disable-settings-authorizer to avoid settings 403 forbidden [#4405](https://github.com/kubernetes/minikube/pull/4405) +* dashboard: detect nonexistent profile instead of causing a panic [#4396](https://github.com/kubernetes/minikube/pull/4396) +* Fixed addon-manager failing with non-default --apiserver-port [#4386](https://github.com/kubernetes/minikube/pull/4386) +* clean vendor on make clean [#4382](https://github.com/kubernetes/minikube/pull/4382) +* Fix kvm gpu log [#4381](https://github.com/kubernetes/minikube/pull/4381) +* Windows installer: Use PowerShell to update PATH value to avoid 1024 char truncation [#4362](https://github.com/kubernetes/minikube/pull/4362) +* Change console style string to enum [#4376](https://github.com/kubernetes/minikube/pull/4376) +* Increase apiserver wait time from 1 minute to 3 minutes [#4372](https://github.com/kubernetes/minikube/pull/4372) +* Sync guest system clock if desynchronized from host [#4283](https://github.com/kubernetes/minikube/pull/4283) +* docker-env: Remove DOCKER_API_VERSION [#4364](https://github.com/kubernetes/minikube/pull/4364) +* Disable hyperv dynamic memory for hyperv driver [#2797](https://github.com/kubernetes/minikube/pull/2797) +* Fix kvm remove when domain is not defined [#4355](https://github.com/kubernetes/minikube/pull/4355) +* Enable registry-proxy [#4341](https://github.com/kubernetes/minikube/pull/4341) +* Make buildah --no-pivot default, using env var [#4321](https://github.com/kubernetes/minikube/pull/4321) +* Pass minikube stdin to the kubectl command [#4354](https://github.com/kubernetes/minikube/pull/4354) +* Refactor kvm lookupIPFromStatusFile [#4334](https://github.com/kubernetes/minikube/pull/4334) +* kernel: Add config for tc u32 filter and mirred action [#4340](https://github.com/kubernetes/minikube/pull/4340) +* Enable GatewayPorts in sshd_config, for proxying in services into minikube [#4338](https://github.com/kubernetes/minikube/pull/4338) +* Fix kvm remove when domain is not running [#4344](https://github.com/kubernetes/minikube/pull/4344) +* kvm2: Add support for --kvm-network to ensureNetwork [#4323](https://github.com/kubernetes/minikube/pull/4323) +* Get current profile if no arguments given [#4335](https://github.com/kubernetes/minikube/pull/4335) +* Skip kvm network deletion if private network doesn't exist [#4331](https://github.com/kubernetes/minikube/pull/4331) +* Added test case for minikube config unset [#4262](https://github.com/kubernetes/minikube/pull/4262) + +Huge thank you for this release towards our contributors: +- Abdulla Bin Mustaqeem +- Anders Björklund +- Andy Daniels +- Archana Shinde +- Arnaud Jardiné +- Artiom Diomin +- Balint Pato +- Benn Linger +- Calin Don +- Chris Eason +- Cristian Măgherușan-Stanciu @magheru_san +- Deepika Pandhi +- Dmitry Budaev +- Don McCasland +- Douglas Thrift +- Elijah Oyekunle +- Filip Havlíček +- Guang Ya Liu +- Himanshu Pandey +- Igor Akkerman +- Ihor Dvoretskyi +- Jan Janik +- Jat +- Joel Smith +- Joji Mekkatt +- Marco Vito Moscaritolo +- Marcos Diez +- Martynas Pumputis +- Mas +- Maximilian Hess +- Medya Gh +- Miel Donkers +- Mike Lewis +- Oleg Atamanenko +- Om Kumar +- Pradip-Khakurel +- Pranav Jituri +- RA489 +- Shahid Iqbal +- Sharif Elgamal +- Steven Davidovitz +- Thomas Bechtold +- Thomas Strömberg +- Tiago Ilieve +- Tobias Bradtke +- Toliver Jue +- Tom Reznik +- Yaroslav Skopets +- Yoan Blanc +- Zhongcheng Lao +- Zoran Regvart +- fenglixa +- flyingcircle +- jay vyas +- josedonizetti +- karmab +- kerami +- morvencao +- salamani +- u5surf +- wj24021040 + ## Version 1.1.0 - 2019-05-21 * Allow macOS to resolve service FQDNs during 'minikube tunnel' [#3464](https://github.com/kubernetes/minikube/pull/3464) From 8e4c6c9922b9e46fa02073ad2288f641803dfea6 Mon Sep 17 00:00:00 2001 From: minikube-bot Date: Fri, 7 Jun 2019 14:30:39 -0700 Subject: [PATCH 21/27] Update releases.json to include v1.1.1 --- deploy/minikube/releases.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deploy/minikube/releases.json b/deploy/minikube/releases.json index 3abf2338cd28..c5ac03845937 100644 --- a/deploy/minikube/releases.json +++ b/deploy/minikube/releases.json @@ -1,4 +1,12 @@ [ + { + "name": "v1.1.1", + "checksums": { + "darwin": "cf6b2c0397147fa998a5c4e36ed7ad045d67f929daa3e46a1d01656b5ab7cac5", + "linux": "4596c0daabfe637912e2372c41cc11116ca053a1f7045af8a731265e45f9ca83", + "windows": "e86e9c7c1c25cfd251f010b62e83fdf2ee2eefc3e73b4b1f7fa18971577150be" + } + }, { "name": "v1.1.0", "checksums": { From c0570f1d5f21d0d03adfb00ab9f47e79cd310b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Str=C3=B6mberg?= Date: Mon, 10 Jun 2019 09:35:54 -0700 Subject: [PATCH 22/27] Mention v1.1.1 release --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d4f4d36c55fc..1b13670279fb 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ minikube's [primary goals](https://github.com/kubernetes/minikube/blob/master/do :mega: **Please fill out our [fast 5-question survey](https://forms.gle/Gg3hG5ZySw8c1C24A)** so that we can learn how & why you use minikube, and what improvements we should make. Thank you! :dancers: +* 2019-06-27 - v1.1.1 released! [[download](https://github.com/kubernetes/minikube/releases/tag/v1.1.1)] [[release notes](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-111---2019-06-07)] * 2019-05-21 - v1.1.0 released! [[download](https://github.com/kubernetes/minikube/releases/tag/v1.1.0)] [[release notes](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-110---2019-05-21)] * 2019-04-29 - v1.0.1 released! [[download](https://github.com/kubernetes/minikube/releases/tag/v1.0.1)] [[release notes](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-101---2019-04-29)] * 2019-03-27 - v1.0.0 released! [[download](https://github.com/kubernetes/minikube/releases/tag/v1.0.0)] [[release notes](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-1000---2019-03-27)] From ec1fe5aecf559854d200d184637212a124509b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Str=C3=B6mberg?= Date: Mon, 10 Jun 2019 09:37:52 -0700 Subject: [PATCH 23/27] Remove a couple of changes that aren't user facing --- CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 996c8c71461a..222d3dc6aa05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,17 +4,14 @@ * Upgrade to kubernetes 1.14.3 [#4444](https://github.com/kubernetes/minikube/pull/4444) * fix ShowDriverDeprecationNotification config setting [#4431](https://github.com/kubernetes/minikube/pull/4431) -* Add libvirt and qemu-kvm install docs for openSUSE/SLES [#4443](https://github.com/kubernetes/minikube/pull/4443) * Cache: don't use ssh runner for the none driver [#4439](https://github.com/kubernetes/minikube/pull/4439) * Fixing file path for windows [#4434](https://github.com/kubernetes/minikube/pull/4434) * Improve type check for driver none [#4419](https://github.com/kubernetes/minikube/pull/4419) * Dashboard: add --disable-settings-authorizer to avoid settings 403 forbidden [#4405](https://github.com/kubernetes/minikube/pull/4405) * dashboard: detect nonexistent profile instead of causing a panic [#4396](https://github.com/kubernetes/minikube/pull/4396) * Fixed addon-manager failing with non-default --apiserver-port [#4386](https://github.com/kubernetes/minikube/pull/4386) -* clean vendor on make clean [#4382](https://github.com/kubernetes/minikube/pull/4382) * Fix kvm gpu log [#4381](https://github.com/kubernetes/minikube/pull/4381) * Windows installer: Use PowerShell to update PATH value to avoid 1024 char truncation [#4362](https://github.com/kubernetes/minikube/pull/4362) -* Change console style string to enum [#4376](https://github.com/kubernetes/minikube/pull/4376) * Increase apiserver wait time from 1 minute to 3 minutes [#4372](https://github.com/kubernetes/minikube/pull/4372) * Sync guest system clock if desynchronized from host [#4283](https://github.com/kubernetes/minikube/pull/4283) * docker-env: Remove DOCKER_API_VERSION [#4364](https://github.com/kubernetes/minikube/pull/4364) @@ -23,14 +20,12 @@ * Enable registry-proxy [#4341](https://github.com/kubernetes/minikube/pull/4341) * Make buildah --no-pivot default, using env var [#4321](https://github.com/kubernetes/minikube/pull/4321) * Pass minikube stdin to the kubectl command [#4354](https://github.com/kubernetes/minikube/pull/4354) -* Refactor kvm lookupIPFromStatusFile [#4334](https://github.com/kubernetes/minikube/pull/4334) * kernel: Add config for tc u32 filter and mirred action [#4340](https://github.com/kubernetes/minikube/pull/4340) * Enable GatewayPorts in sshd_config, for proxying in services into minikube [#4338](https://github.com/kubernetes/minikube/pull/4338) * Fix kvm remove when domain is not running [#4344](https://github.com/kubernetes/minikube/pull/4344) * kvm2: Add support for --kvm-network to ensureNetwork [#4323](https://github.com/kubernetes/minikube/pull/4323) * Get current profile if no arguments given [#4335](https://github.com/kubernetes/minikube/pull/4335) * Skip kvm network deletion if private network doesn't exist [#4331](https://github.com/kubernetes/minikube/pull/4331) -* Added test case for minikube config unset [#4262](https://github.com/kubernetes/minikube/pull/4262) Huge thank you for this release towards our contributors: - Abdulla Bin Mustaqeem From 9948ade49ebda9ef33b081443dca29f8a22e5ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Str=C3=B6mberg?= Date: Mon, 10 Jun 2019 09:59:12 -0700 Subject: [PATCH 24/27] Clarify updating the minikube front page --- docs/contributors/releasing_minikube.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/contributors/releasing_minikube.md b/docs/contributors/releasing_minikube.md index 0dddb097a847..80fbd3d946b7 100644 --- a/docs/contributors/releasing_minikube.md +++ b/docs/contributors/releasing_minikube.md @@ -94,15 +94,15 @@ WARNING: The Brew cask automation is error-prone. please ensure that a PR was cr Verify release checksums by running`make check-release` -## Update docs +## Update minikube frontpage -If there are major changes, please send a PR to update +We document the last 4 releases on our frontpage. Please add it to the list: https://github.com/kubernetes/minikube/blob/master/README.md -## Announce +## Update official Kubernetes docs -Please mention the new release https://github.com/kubernetes/minikube/blob/master/README.md +If there are major changes, please send a PR to update -Other places: +## Announce! - #minikube on Slack - minikube-dev, minikube-users mailing list From 12a8274896434c4798ebe56c8e80b2d26010285c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Str=C3=B6mberg?= Date: Mon, 10 Jun 2019 09:59:31 -0700 Subject: [PATCH 25/27] 3 releases rather than 4 --- docs/contributors/releasing_minikube.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributors/releasing_minikube.md b/docs/contributors/releasing_minikube.md index 80fbd3d946b7..16ca03062022 100644 --- a/docs/contributors/releasing_minikube.md +++ b/docs/contributors/releasing_minikube.md @@ -96,7 +96,7 @@ Verify release checksums by running`make check-release` ## Update minikube frontpage -We document the last 4 releases on our frontpage. Please add it to the list: https://github.com/kubernetes/minikube/blob/master/README.md +We document the last 3 releases on our frontpage. Please add it to the list: https://github.com/kubernetes/minikube/blob/master/README.md ## Update official Kubernetes docs From 88ed101622837725f3585ab2fc64c9d247fc438a Mon Sep 17 00:00:00 2001 From: fenglixa Date: Tue, 11 Jun 2019 14:32:07 +0800 Subject: [PATCH 26/27] update to the minimum version of supporting --allow-privileged --- pkg/minikube/bootstrapper/kubeadm/versions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/bootstrapper/kubeadm/versions.go b/pkg/minikube/bootstrapper/kubeadm/versions.go index 5413d3b54f7a..2c7c9a97f991 100644 --- a/pkg/minikube/bootstrapper/kubeadm/versions.go +++ b/pkg/minikube/bootstrapper/kubeadm/versions.go @@ -248,7 +248,7 @@ var versionSpecificOpts = []VersionedExtraOption{ Key: "allow-privileged", Value: "true", }, - LessThanOrEqual: semver.MustParse("1.14.2"), + LessThanOrEqual: semver.MustParse("1.15.0-alpha.3"), }, // Network args From ff4e2787e92ab0892a5d39527dae461e07ff80ef Mon Sep 17 00:00:00 2001 From: fenglixa Date: Mon, 3 Jun 2019 10:56:57 +0800 Subject: [PATCH 27/27] squash the commits minikube support for k8s v1.15 update case according to code changes update to the minimum version of supporting --allow-privileged --- pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go | 2 +- pkg/minikube/bootstrapper/kubeadm/versions.go | 9 ++++++++- pkg/minikube/constants/constants.go | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go index 7785cb8f5223..2261b9cb14c7 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go @@ -75,7 +75,7 @@ Wants=crio.service [Service] ExecStart= -ExecStart=/usr/bin/kubelet --allow-privileged=true --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver=cgroupfs --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --container-runtime=remote --container-runtime-endpoint=/var/run/crio/crio.sock --fail-swap-on=false --hostname-override=minikube --image-service-endpoint=/var/run/crio/crio.sock --kubeconfig=/etc/kubernetes/kubelet.conf --pod-manifest-path=/etc/kubernetes/manifests --runtime-request-timeout=15m +ExecStart=/usr/bin/kubelet --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver=cgroupfs --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --container-runtime=remote --container-runtime-endpoint=/var/run/crio/crio.sock --fail-swap-on=false --hostname-override=minikube --image-service-endpoint=/var/run/crio/crio.sock --kubeconfig=/etc/kubernetes/kubelet.conf --pod-manifest-path=/etc/kubernetes/manifests --runtime-request-timeout=15m [Install] `, diff --git a/pkg/minikube/bootstrapper/kubeadm/versions.go b/pkg/minikube/bootstrapper/kubeadm/versions.go index 18563c0ac38e..2c7c9a97f991 100644 --- a/pkg/minikube/bootstrapper/kubeadm/versions.go +++ b/pkg/minikube/bootstrapper/kubeadm/versions.go @@ -242,7 +242,14 @@ var versionSpecificOpts = []VersionedExtraOption{ // System pods args NewUnversionedOption(Kubelet, "pod-manifest-path", "/etc/kubernetes/manifests"), - NewUnversionedOption(Kubelet, "allow-privileged", "true"), + { + Option: util.ExtraOption{ + Component: Kubelet, + Key: "allow-privileged", + Value: "true", + }, + LessThanOrEqual: semver.MustParse("1.15.0-alpha.3"), + }, // Network args NewUnversionedOption(Kubelet, "cluster-dns", "10.96.0.10"), diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 1a3453b896c2..b40a26be57ec 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -165,7 +165,7 @@ var DefaultISOSHAURL = DefaultISOURL + SHASuffix var DefaultKubernetesVersion = "v1.14.3" // NewestKubernetesVersion is the newest Kubernetes version to test against -var NewestKubernetesVersion = "v1.14.3" +var NewestKubernetesVersion = "v1.15.0-beta.1" // OldestKubernetesVersion is the oldest Kubernetes version to test against var OldestKubernetesVersion = "v1.10.13"