Skip to content

Commit

Permalink
Revert "Merge pull request #1 from kubernetes/master"
Browse files Browse the repository at this point in the history
This reverts commit 79ec204, reversing
changes made to fea7e21.
  • Loading branch information
blueelvis committed Jun 24, 2019
1 parent 63676a1 commit 7d44ae4
Show file tree
Hide file tree
Showing 74 changed files with 496 additions and 868 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Minikube Release Notes

<<<<<<< HEAD
## Version 1.2.0 - 2019-06-24

* Update Kubernetes default version to v1.15.0 [#4534](https://github.com/kubernetes/minikube/pull/4534)
Expand Down Expand Up @@ -124,6 +125,8 @@ Huge thank you for this release towards our contributors:
- u5surf
- wj24021040

=======
>>>>>>> Revert "Merge pull request #1 from kubernetes/master"
## Version 1.1.0 - 2019-05-21

* Allow macOS to resolve service FQDNs during 'minikube tunnel' [#3464](https://github.com/kubernetes/minikube/pull/3464)
Expand Down
7 changes: 5 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Dan Lorenc <[email protected]> (@dlorenc)
Lucas Käldström <[email protected]> (@luxas)
Jimmi Dyson <[email protected]> (@jimmidyson)
Balint Pato <[email protected]> (@balopat)
Priya Wadhwa <[email protected]> (@priyawadhwa)
Thomas Stromberg <[email protected]> (@tstromberg)
Anders F Björklund <[email protected]> (@afbjorklund)
Sharif Elgamal <[email protected]> (@sharifelgamal)
Medya Ghazizadeh <[email protected]> (@medyagh)
Sharif Elgamal <[email protected] (@sharifelgamal)
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@

# Bump these on release - and please check ISO_VERSION for correctness.
VERSION_MAJOR ?= 1
<<<<<<< HEAD
VERSION_MINOR ?= 2
=======
VERSION_MINOR ?= 1
>>>>>>> Revert "Merge pull request #1 from kubernetes/master"
VERSION_BUILD ?= 0
# 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
Expand Down Expand Up @@ -210,7 +214,6 @@ checksum:
clean:
rm -rf $(BUILD_DIR)
rm -f pkg/minikube/assets/assets.go
rm -rf ./vendor

.PHONY: gendocs
gendocs: out/docs/minikube.md
Expand Down
10 changes: 10 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
# See the OWNERS docs at https://go.k8s.io/owners

reviewers:
- dlorenc
- balopat
- tstromberg
- afbjorklund
- sharifelgamal
<<<<<<< HEAD
- RA489
- medyagh
=======
>>>>>>> Revert "Merge pull request #1 from kubernetes/master"
approvers:
- dlorenc
- luxas
- jimmidyson
- balopat
- tstromberg
- afbjorklund
- sharifelgamal
<<<<<<< HEAD
- RA489
- medyagh
emeritus_approvers:
- dlorenc
- luxas
- jimmidyson
=======
>>>>>>> Revert "Merge pull request #1 from kubernetes/master"
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ minikube's [primary goals](https://github.com/kubernetes/minikube/blob/master/do

## News

<<<<<<< HEAD
: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-24 - v1.2.0 released! [[download](https://github.com/kubernetes/minikube/releases/tag/v1.2.0)] [[release notes](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-120---2019-06-24)]
* 2019-06-07 - 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)]
=======
>>>>>>> Revert "Merge pull request #1 from kubernetes/master"
* 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)]

## Features

minikube runs the latest stable release of Kubernetes, with support for standard Kubernetes features like:
minikube runs the official 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 <name>`
Expand Down
4 changes: 0 additions & 4 deletions cmd/minikube/cmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ var settings = []Setting{
name: Bootstrapper,
set: SetString, //TODO(r2d4): more validation here?
},
{
name: config.ShowDriverDeprecationNotification,
set: SetBool,
},
{
name: config.ShowBootstrapperDeprecationNotification,
set: SetBool,
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ minikube addons list`, addonName)
exit.WithError("IsEnabled failed", err)
}
if !ok {
console.ErrStyle(console.Conflict, `addon '%s' is currently not enabled.
console.ErrStyle("conflict", `addon '%s' is currently not enabled.
To enable this addon run:
minikube addons enable %s`, addonName, addonName)
os.Exit(exit.Unavailable)
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/validations.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func IsValidDriver(string, driver string) error {

// RequiresRestartMsg returns the "requires restart" message
func RequiresRestartMsg(string, string) error {
console.OutStyle(console.WarningType, "These changes will take effect upon a minikube delete and then a minikube start")
console.OutStyle("warning", "These changes will take effect upon a minikube delete and then a minikube start")
return nil
}

Expand Down
52 changes: 24 additions & 28 deletions cmd/minikube/cmd/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ 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/assets"
"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"
Expand All @@ -60,7 +60,15 @@ 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()
Expand All @@ -72,29 +80,9 @@ 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)

<<<<<<< HEAD
// Check dashboard status before enabling it
dashboardAddon := assets.Addons["dashboard"]
dashboardStatus, _ := dashboardAddon.IsEnabled()
Expand All @@ -106,31 +94,39 @@ var dashboardCmd = &cobra.Command{
if err != nil {
exit.WithError("Unable to enable dashboard", err)
}
=======
// Send status messages to stderr for folks re-using this output.
console.ErrStyle("enabling", "Enabling dashboard ...")
// Enable the dashboard add-on
err = configcmd.Set("dashboard", "true")
if err != nil {
exit.WithError("Unable to enable dashboard", err)
>>>>>>> Revert "Merge pull request #1 from kubernetes/master"
}

ns := "kube-system"
svc := "kubernetes-dashboard"
console.ErrStyle(console.Verifying, "Verifying dashboard health ...")
console.ErrStyle("verifying", "Verifying dashboard health ...")
if err = util.RetryAfter(180, func() error { return service.CheckService(ns, svc) }, 1*time.Second); err != nil {
exit.WithCode(exit.Unavailable, "%s:%s is not running: %v", ns, svc, err)
}

console.ErrStyle(console.Launch, "Launching proxy ...")
console.ErrStyle("launch", "Launching proxy ...")
p, hostPort, err := kubectlProxy(kubectl)
if err != nil {
exit.WithError("kubectl proxy", err)
}
url := dashboardURL(hostPort, ns, svc)

console.ErrStyle(console.Verifying, "Verifying proxy health ...")
console.ErrStyle("verifying", "Verifying proxy health ...")
if err = util.RetryAfter(60, func() error { return checkURL(url) }, 1*time.Second); err != nil {
exit.WithCode(exit.Unavailable, "%s is not responding properly: %v", url, err)
}

if dashboardURLMode {
console.OutLn(url)
} else {
console.ErrStyle(console.Celebrate, "Opening %s in your default browser...", url)
console.ErrStyle("celebrate", "Opening %s in your default browser...", url)
if err = browser.OpenURL(url); err != nil {
console.Failure("failed to open browser: %v", err)
}
Expand All @@ -146,9 +142,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
// pkg_config.GetMachineName() respects the -p (profile) flag
// config.GetMachineName() respects the -p (profile) flag

cmd := exec.Command(path, "--context", pkg_config.GetMachineName(), "proxy", "--port=0")
cmd := exec.Command(path, "--context", config.GetMachineName(), "proxy", "--port=0")

stdoutPipe, err := cmd.StdoutPipe()
if err != nil {
Expand Down
10 changes: 5 additions & 5 deletions cmd/minikube/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ 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 == constants.DriverNone {
if err == nil && cc.MachineConfig.VMDriver == "none" {
kc := cc.KubernetesConfig
bsName := viper.GetString(cmdcfg.Bootstrapper)
console.OutStyle(console.Resetting, "Uninstalling Kubernetes %s using %s ...", kc.KubernetesVersion, bsName)
console.OutStyle("resetting", "Uninstalling Kubernetes %s using %s ...", kc.KubernetesVersion, bsName)
clusterBootstrapper, err := GetClusterBootstrapper(api, viper.GetString(cmdcfg.Bootstrapper))
if err != nil {
console.ErrLn("Unable to get bootstrapper: %v", err)
Expand All @@ -73,7 +73,7 @@ associated files.`,
if err = cluster.DeleteHost(api); err != nil {
switch err := errors.Cause(err).(type) {
case mcnerror.ErrHostDoesNotExist:
console.OutStyle(console.Meh, "%q cluster does not exist", profile)
console.OutStyle("meh", "%q cluster does not exist", profile)
default:
exit.WithError("Failed to delete cluster", err)
}
Expand All @@ -85,12 +85,12 @@ associated files.`,

if err := os.Remove(constants.GetProfileFile(viper.GetString(pkg_config.MachineProfile))); err != nil {
if os.IsNotExist(err) {
console.OutStyle(console.Meh, "%q profile does not exist", profile)
console.OutStyle("meh", "%q profile does not exist", profile)
os.Exit(0)
}
exit.WithError("Failed to remove profile", err)
}
console.OutStyle(console.Crushed, "The %q cluster has been deleted.", profile)
console.OutStyle("crushed", "The %q cluster has been deleted.", profile)
},
}

Expand Down
32 changes: 17 additions & 15 deletions cmd/minikube/cmd/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
)

const (
envTmpl = `{{ .Prefix }}DOCKER_TLS_VERIFY{{ .Delimiter }}{{ .DockerTLSVerify }}{{ .Suffix }}{{ .Prefix }}DOCKER_HOST{{ .Delimiter }}{{ .DockerHost }}{{ .Suffix }}{{ .Prefix }}DOCKER_CERT_PATH{{ .Delimiter }}{{ .DockerCertPath }}{{ .Suffix }}{{ if .NoProxyVar }}{{ .Prefix }}{{ .NoProxyVar }}{{ .Delimiter }}{{ .NoProxyValue }}{{ .Suffix }}{{end}}{{ .UsageHint }}`
envTmpl = `{{ .Prefix }}DOCKER_TLS_VERIFY{{ .Delimiter }}{{ .DockerTLSVerify }}{{ .Suffix }}{{ .Prefix }}DOCKER_HOST{{ .Delimiter }}{{ .DockerHost }}{{ .Suffix }}{{ .Prefix }}DOCKER_CERT_PATH{{ .Delimiter }}{{ .DockerCertPath }}{{ .Suffix }}{{ .Prefix }}DOCKER_API_VERSION{{ .Delimiter }}{{ .DockerAPIVersion }}{{ .Suffix }}{{ if .NoProxyVar }}{{ .Prefix }}{{ .NoProxyVar }}{{ .Delimiter }}{{ .NoProxyValue }}{{ .Suffix }}{{end}}{{ .UsageHint }}`

fishSetPfx = "set -gx "
fishSetSfx = "\";\n"
Expand Down Expand Up @@ -108,15 +108,16 @@ REM @FOR /f "tokens=*" %i IN ('minikube docker-env') DO @%i

// ShellConfig represents the shell config
type ShellConfig struct {
Prefix string
Delimiter string
Suffix string
DockerCertPath string
DockerHost string
DockerTLSVerify string
UsageHint string
NoProxyVar string
NoProxyValue string
Prefix string
Delimiter string
Suffix string
DockerCertPath string
DockerHost string
DockerTLSVerify string
DockerAPIVersion string
UsageHint string
NoProxyVar string
NoProxyValue string
}

var (
Expand Down Expand Up @@ -164,10 +165,11 @@ func shellCfgSet(api libmachine.API) (*ShellConfig, error) {
}

shellCfg := &ShellConfig{
DockerCertPath: envMap["DOCKER_CERT_PATH"],
DockerHost: envMap["DOCKER_HOST"],
DockerTLSVerify: envMap["DOCKER_TLS_VERIFY"],
UsageHint: generateUsageHint(userShell),
DockerCertPath: envMap["DOCKER_CERT_PATH"],
DockerHost: envMap["DOCKER_HOST"],
DockerTLSVerify: envMap["DOCKER_TLS_VERIFY"],
DockerAPIVersion: constants.DockerAPIVersion,
UsageHint: generateUsageHint(userShell),
}

if noProxy {
Expand Down Expand Up @@ -343,7 +345,7 @@ var dockerEnvCmd = &cobra.Command{
if err != nil {
exit.WithError("Error getting host", err)
}
if host.Driver.DriverName() == constants.DriverNone {
if host.Driver.DriverName() == "none" {
exit.Usage(`'none' driver does not support 'minikube docker-env' command`)
}
hostSt, err := cluster.GetHostStatus(api)
Expand Down
Loading

0 comments on commit 7d44ae4

Please sign in to comment.