Merge pull request #4364 from tstromberg/no-docker-version
docker-env: Remove DOCKER_API_VERSIONpull/4370/head
commit
db37c03063
|
@ -35,13 +35,12 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"k8s.io/minikube/pkg/minikube/cluster"
|
"k8s.io/minikube/pkg/minikube/cluster"
|
||||||
"k8s.io/minikube/pkg/minikube/config"
|
"k8s.io/minikube/pkg/minikube/config"
|
||||||
"k8s.io/minikube/pkg/minikube/constants"
|
|
||||||
"k8s.io/minikube/pkg/minikube/exit"
|
"k8s.io/minikube/pkg/minikube/exit"
|
||||||
"k8s.io/minikube/pkg/minikube/machine"
|
"k8s.io/minikube/pkg/minikube/machine"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
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 }}`
|
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 }}`
|
||||||
|
|
||||||
fishSetPfx = "set -gx "
|
fishSetPfx = "set -gx "
|
||||||
fishSetSfx = "\";\n"
|
fishSetSfx = "\";\n"
|
||||||
|
@ -114,7 +113,6 @@ type ShellConfig struct {
|
||||||
DockerCertPath string
|
DockerCertPath string
|
||||||
DockerHost string
|
DockerHost string
|
||||||
DockerTLSVerify string
|
DockerTLSVerify string
|
||||||
DockerAPIVersion string
|
|
||||||
UsageHint string
|
UsageHint string
|
||||||
NoProxyVar string
|
NoProxyVar string
|
||||||
NoProxyValue string
|
NoProxyValue string
|
||||||
|
@ -168,7 +166,6 @@ func shellCfgSet(api libmachine.API) (*ShellConfig, error) {
|
||||||
DockerCertPath: envMap["DOCKER_CERT_PATH"],
|
DockerCertPath: envMap["DOCKER_CERT_PATH"],
|
||||||
DockerHost: envMap["DOCKER_HOST"],
|
DockerHost: envMap["DOCKER_HOST"],
|
||||||
DockerTLSVerify: envMap["DOCKER_TLS_VERIFY"],
|
DockerTLSVerify: envMap["DOCKER_TLS_VERIFY"],
|
||||||
DockerAPIVersion: constants.DockerAPIVersion,
|
|
||||||
UsageHint: generateUsageHint(userShell),
|
UsageHint: generateUsageHint(userShell),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,6 @@ func newShellCfg(shell, prefix, suffix, delim string) *ShellConfig {
|
||||||
DockerCertPath: constants.MakeMiniPath("certs"),
|
DockerCertPath: constants.MakeMiniPath("certs"),
|
||||||
DockerTLSVerify: "1",
|
DockerTLSVerify: "1",
|
||||||
DockerHost: "tcp://127.0.0.1:2376",
|
DockerHost: "tcp://127.0.0.1:2376",
|
||||||
DockerAPIVersion: constants.DockerAPIVersion,
|
|
||||||
UsageHint: generateUsageHint(shell),
|
UsageHint: generateUsageHint(shell),
|
||||||
Prefix: prefix,
|
Prefix: prefix,
|
||||||
Suffix: suffix,
|
Suffix: suffix,
|
||||||
|
@ -144,7 +143,6 @@ func TestShellCfgSet(t *testing.T) {
|
||||||
DockerCertPath: constants.MakeMiniPath("certs"),
|
DockerCertPath: constants.MakeMiniPath("certs"),
|
||||||
DockerTLSVerify: "1",
|
DockerTLSVerify: "1",
|
||||||
DockerHost: "tcp://127.0.0.1:2376",
|
DockerHost: "tcp://127.0.0.1:2376",
|
||||||
DockerAPIVersion: constants.DockerAPIVersion,
|
|
||||||
UsageHint: usageHintMap["bash"],
|
UsageHint: usageHintMap["bash"],
|
||||||
Prefix: bashSetPfx,
|
Prefix: bashSetPfx,
|
||||||
Suffix: bashSetSfx,
|
Suffix: bashSetSfx,
|
||||||
|
@ -164,7 +162,6 @@ func TestShellCfgSet(t *testing.T) {
|
||||||
DockerCertPath: constants.MakeMiniPath("certs"),
|
DockerCertPath: constants.MakeMiniPath("certs"),
|
||||||
DockerTLSVerify: "1",
|
DockerTLSVerify: "1",
|
||||||
DockerHost: "tcp://127.0.0.1:2376",
|
DockerHost: "tcp://127.0.0.1:2376",
|
||||||
DockerAPIVersion: constants.DockerAPIVersion,
|
|
||||||
UsageHint: usageHintMap["bash"],
|
UsageHint: usageHintMap["bash"],
|
||||||
Prefix: bashSetPfx,
|
Prefix: bashSetPfx,
|
||||||
Suffix: bashSetSfx,
|
Suffix: bashSetSfx,
|
||||||
|
@ -184,7 +181,6 @@ func TestShellCfgSet(t *testing.T) {
|
||||||
DockerCertPath: constants.MakeMiniPath("certs"),
|
DockerCertPath: constants.MakeMiniPath("certs"),
|
||||||
DockerTLSVerify: "1",
|
DockerTLSVerify: "1",
|
||||||
DockerHost: "tcp://127.0.0.1:2376",
|
DockerHost: "tcp://127.0.0.1:2376",
|
||||||
DockerAPIVersion: constants.DockerAPIVersion,
|
|
||||||
UsageHint: usageHintMap["bash"],
|
UsageHint: usageHintMap["bash"],
|
||||||
Prefix: bashSetPfx,
|
Prefix: bashSetPfx,
|
||||||
Suffix: bashSetSfx,
|
Suffix: bashSetSfx,
|
||||||
|
@ -204,7 +200,6 @@ func TestShellCfgSet(t *testing.T) {
|
||||||
DockerCertPath: constants.MakeMiniPath("certs"),
|
DockerCertPath: constants.MakeMiniPath("certs"),
|
||||||
DockerTLSVerify: "1",
|
DockerTLSVerify: "1",
|
||||||
DockerHost: "tcp://127.0.0.1:2376",
|
DockerHost: "tcp://127.0.0.1:2376",
|
||||||
DockerAPIVersion: constants.DockerAPIVersion,
|
|
||||||
UsageHint: usageHintMap["bash"],
|
UsageHint: usageHintMap["bash"],
|
||||||
Prefix: bashSetPfx,
|
Prefix: bashSetPfx,
|
||||||
Suffix: bashSetSfx,
|
Suffix: bashSetSfx,
|
||||||
|
@ -224,7 +219,6 @@ func TestShellCfgSet(t *testing.T) {
|
||||||
DockerCertPath: constants.MakeMiniPath("certs"),
|
DockerCertPath: constants.MakeMiniPath("certs"),
|
||||||
DockerTLSVerify: "1",
|
DockerTLSVerify: "1",
|
||||||
DockerHost: "tcp://127.0.0.1:2376",
|
DockerHost: "tcp://127.0.0.1:2376",
|
||||||
DockerAPIVersion: constants.DockerAPIVersion,
|
|
||||||
UsageHint: usageHintMap["bash"],
|
UsageHint: usageHintMap["bash"],
|
||||||
Prefix: bashSetPfx,
|
Prefix: bashSetPfx,
|
||||||
Suffix: bashSetSfx,
|
Suffix: bashSetSfx,
|
||||||
|
|
|
@ -181,9 +181,6 @@ func GetProfileFile(profile string) string {
|
||||||
return filepath.Join(GetMinipath(), "profiles", profile, "config.json")
|
return filepath.Join(GetMinipath(), "profiles", profile, "config.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
// DockerAPIVersion is the API version implemented by Docker running in the minikube VM.
|
|
||||||
const DockerAPIVersion = "1.39"
|
|
||||||
|
|
||||||
// ReportingURL is the URL for reporting a minikube error
|
// ReportingURL is the URL for reporting a minikube error
|
||||||
const ReportingURL = "https://clouderrorreporting.googleapis.com/v1beta1/projects/k8s-minikube/events:report?key=AIzaSyACUwzG0dEPcl-eOgpDKnyKoUFgHdfoFuA"
|
const ReportingURL = "https://clouderrorreporting.googleapis.com/v1beta1/projects/k8s-minikube/events:report?key=AIzaSyACUwzG0dEPcl-eOgpDKnyKoUFgHdfoFuA"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue