Merge branch 'master' into sha256-checksum
commit
1226770e1e
|
@ -2,8 +2,11 @@ name: CI
|
|||
|
||||
on: [pull_request]
|
||||
|
||||
|
||||
jobs:
|
||||
docker_ubuntu_16_04:
|
||||
env:
|
||||
ELAPSED: time
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -20,17 +23,32 @@ jobs:
|
|||
- name: run integration test
|
||||
run: |
|
||||
mkdir -p /tmp/testhome
|
||||
|
||||
START_TIME=$(date -u +%s)
|
||||
|
||||
MINIKUBE_HOME=/tmp/testhome ./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||
|
||||
END_TIME=$(date -u +%s)
|
||||
ELAPSED=$(($END_TIME-$START_TIME))
|
||||
min=$((${ELAPSED}/60))
|
||||
sec=$((${ELAPSED}%60))
|
||||
ELAPSED="${min} min $sec seconds "
|
||||
|
||||
echo ::set-env name=ELAPSED::${ELAPSED}
|
||||
- name: generate gopogh report
|
||||
run: |
|
||||
export PATH=${PATH}:`go env GOPATH`/bin
|
||||
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
|
||||
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/ || true
|
||||
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/) || true
|
||||
report="Docker_Ubuntu_16_04 : Completed with ${STAT} in ${ELAPSED}"
|
||||
echo ${report}
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: docker_on_ubuntu_16_04_report
|
||||
path: report
|
||||
docker_ubuntu_18_04:
|
||||
env:
|
||||
ELAPSED: time
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -47,17 +65,31 @@ jobs:
|
|||
- name: run integration test
|
||||
run: |
|
||||
mkdir -p /tmp/testhome
|
||||
START_TIME=$(date -u +%s)
|
||||
|
||||
MINIKUBE_HOME=/tmp/testhome ./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||
|
||||
END_TIME=$(date -u +%s)
|
||||
ELAPSED=$(($END_TIME-$START_TIME))
|
||||
min=$((${ELAPSED}/60))
|
||||
sec=$((${ELAPSED}%60))
|
||||
ELAPSED="${min} min $sec seconds"
|
||||
|
||||
echo ::set-env name=ELAPSED::${ELAPSED}
|
||||
- name: generate gopogh report
|
||||
run: |
|
||||
export PATH=${PATH}:`go env GOPATH`/bin
|
||||
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
|
||||
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/ || true
|
||||
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/) || true
|
||||
report="Docker_Ubuntu_18_04 : Completed with ${STAT} in ${ELAPSED}"
|
||||
echo ${report}
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: docker_on_ubuntu_18_04_report
|
||||
path: report
|
||||
docker_macos:
|
||||
env:
|
||||
ELAPSED: time
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -79,17 +111,32 @@ jobs:
|
|||
- name: run integration test
|
||||
run: |
|
||||
mkdir -p /tmp/testhome
|
||||
|
||||
START_TIME=$(date -u +%s)
|
||||
|
||||
MINIKUBE_HOME=/tmp/testhome ./out/e2e-darwin-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./out/minikube-darwin-amd64 2>&1 | tee ./report/testout.txt
|
||||
|
||||
END_TIME=$(date -u +%s)
|
||||
ELAPSED=$(($END_TIME-$START_TIME))
|
||||
min=$((${ELAPSED}/60))
|
||||
sec=$((${ELAPSED}%60))
|
||||
ELAPSED="${min} min $sec seconds"
|
||||
|
||||
echo ::set-env name=ELAPSED::${ELAPSED}
|
||||
- name: generate gopogh report
|
||||
run: |
|
||||
export PATH=${PATH}:`go env GOPATH`/bin
|
||||
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
|
||||
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker macos" -repo github.com/kubernetes/minikube/ || true
|
||||
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "docker macos" -repo github.com/kubernetes/minikube/) || true
|
||||
report="Docker_mac_os : Completed with ${STAT} in ${ELAPSED}"
|
||||
echo ${report}
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: docker_on_macos_report
|
||||
path: ./report
|
||||
none_ubuntu16_04:
|
||||
env:
|
||||
ELAPSED: time
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -106,17 +153,32 @@ jobs:
|
|||
- name: run integration test
|
||||
run: |
|
||||
mkdir -p /tmp/testhome
|
||||
|
||||
START_TIME=$(date -u +%s)
|
||||
|
||||
MINIKUBE_HOME=/tmp/testhome sudo -E ./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=none -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||
|
||||
END_TIME=$(date -u +%s)
|
||||
ELAPSED=$(($END_TIME-$START_TIME))
|
||||
min=$((${ELAPSED}/60))
|
||||
sec=$((${ELAPSED}%60))
|
||||
ELAPSED="${min} min $sec seconds"
|
||||
|
||||
echo ::set-env name=ELAPSED::${ELAPSED}
|
||||
- name: generate gopogh report
|
||||
run: |
|
||||
export PATH=${PATH}:`go env GOPATH`/bin
|
||||
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
|
||||
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/ || true
|
||||
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/) || true
|
||||
report="None_Ubuntu_16_04 : Completed with ${STAT} in ${ELAPSED}"
|
||||
echo ${report}
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: none_on_ubuntu_16_04
|
||||
path: report
|
||||
none_ubuntu_18_04:
|
||||
env:
|
||||
ELAPSED: time
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -132,13 +194,60 @@ jobs:
|
|||
- name: run integration test
|
||||
run: |
|
||||
mkdir -p /tmp/testhome
|
||||
|
||||
START_TIME=$(date -u +%s)
|
||||
|
||||
MINIKUBE_HOME=/tmp/testhome sudo -E ./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=none -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||
|
||||
END_TIME=$(date -u +%s)
|
||||
ELAPSED=$(($END_TIME-$START_TIME))
|
||||
min=$((${ELAPSED}/60))
|
||||
sec=$((${ELAPSED}%60))
|
||||
ELAPSED="${min} min $sec seconds"
|
||||
|
||||
echo ::set-env name=ELAPSED::${ELAPSED}
|
||||
- name: generate gopogh report
|
||||
run: |
|
||||
export PATH=${PATH}:`go env GOPATH`/bin
|
||||
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
|
||||
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/ || true
|
||||
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/) || true
|
||||
report="None_Ubuntu_18_04 : Completed with ${STAT} in ${ELAPSED}"
|
||||
echo ${report}
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: none_on_ubuntu_latest_report
|
||||
path: report
|
||||
podman_ubuntu_18_04:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install podman
|
||||
run: |
|
||||
. /etc/os-release
|
||||
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
|
||||
wget -q https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add -
|
||||
sudo apt-key add - < Release.key || true
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get -qq -y install podman
|
||||
- name: build binaries
|
||||
run : |
|
||||
make minikube-linux-amd64
|
||||
make e2e-linux-amd64
|
||||
- name: install gopogh
|
||||
run: |
|
||||
cd /tmp
|
||||
GO111MODULE="on" go get github.com/medyagh/gopogh@v0.0.17 || true
|
||||
cd -
|
||||
- name: run integration test
|
||||
run: |
|
||||
mkdir -p /tmp/testhome
|
||||
MINIKUBE_HOME=/tmp/testhome sudo -E ./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=podman -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||
- name: generate gopogh report
|
||||
run: |
|
||||
export PATH=${PATH}:`go env GOPATH`/bin
|
||||
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
|
||||
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/ || true
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: podman_on_ubuntu_latest_report
|
||||
path: report
|
||||
|
|
16
Makefile
16
Makefile
|
@ -19,11 +19,14 @@ VERSION_BUILD ?= 2
|
|||
RAW_VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).${VERSION_BUILD}
|
||||
VERSION ?= v$(RAW_VERSION)
|
||||
|
||||
KUBERNETES_VERSION ?= $(shell egrep "^var DefaultKubernetesVersion" pkg/minikube/constants/constants.go | cut -d \" -f2)
|
||||
|
||||
# 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
|
||||
# Dashes are valid in semver, but not Linux packaging. Use ~ to delimit alpha/beta
|
||||
DEB_VERSION ?= $(subst -,~,$(RAW_VERSION))
|
||||
RPM_VERSION ?= $(DEB_VERSION)
|
||||
KIC_VERSION ?= 0.0.5
|
||||
|
||||
# used by hack/jenkins/release_build_and_upload.sh and KVM_BUILD_IMAGE, see also BUILD_IMAGE below
|
||||
GO_VERSION ?= 1.13.4
|
||||
|
@ -505,10 +508,19 @@ storage-provisioner-image: out/storage-provisioner-$(GOARCH) ## Build storage-pr
|
|||
|
||||
.PHONY: kic-base-image
|
||||
kic-base-image: ## builds the base image used for kic.
|
||||
docker rmi -f $(REGISTRY)/kicbase:v0.0.5-snapshot || true
|
||||
docker build -f ./hack/images/kicbase.Dockerfile -t $(REGISTRY)/kicbase:v0.0.5-snapshot --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) .
|
||||
docker rmi -f $(REGISTRY)/kicbase:v$(KIC_VERSION)-snapshot || true
|
||||
docker build -f ./hack/images/kicbase.Dockerfile -t $(REGISTRY)/kicbase:v$(KIC_VERSION)-snapshot --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) --target base .
|
||||
|
||||
|
||||
.PHONY: kic-preloaded-base-image
|
||||
kic-preloaded-base-image: generate-preloaded-images-tar ## builds the base image used for kic.
|
||||
docker rmi -f $(REGISTRY)/kicbase:v$(KIC_VERSION)-k8s-${KUBERNETES_VERSION} || true
|
||||
docker build -f ./hack/images/kicbase.Dockerfile -t $(REGISTRY)/kicbase:v$(KIC_VERSION)-k8s-${KUBERNETES_VERSION} --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) --build-arg KUBERNETES_VERSION=${KUBERNETES_VERSION} .
|
||||
|
||||
.PHONY: generate-preloaded-images-tar
|
||||
generate-preloaded-images-tar: out/minikube
|
||||
go run ./hack/preload-images/preload_images.go -kubernetes-version ${KUBERNETES_VERSION}
|
||||
|
||||
|
||||
.PHONY: push-storage-provisioner-image
|
||||
push-storage-provisioner-image: storage-provisioner-image ## Push storage-provisioner docker image using gcloud
|
||||
|
|
|
@ -23,7 +23,6 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
pkgConfig "k8s.io/minikube/pkg/minikube/config"
|
||||
pkg_config "k8s.io/minikube/pkg/minikube/config"
|
||||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
"k8s.io/minikube/pkg/minikube/exit"
|
||||
"k8s.io/minikube/pkg/minikube/kubeconfig"
|
||||
"k8s.io/minikube/pkg/minikube/out"
|
||||
|
@ -87,7 +86,7 @@ var ProfileCmd = &cobra.Command{
|
|||
out.SuccessT("Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.", out.V{"profile_name": profile})
|
||||
out.SuccessT("To connect to this cluster, use: kubectl --context={{.profile_name}}", out.V{"profile_name": profile})
|
||||
} else {
|
||||
err := kubeconfig.SetCurrentContext(profile, constants.KubeconfigPath)
|
||||
err := kubeconfig.SetCurrentContext(profile, kubeconfig.PathFromEnv())
|
||||
if err != nil {
|
||||
out.ErrT(out.Sad, `Error while setting kubectl current context : {{.error}}`, out.V{"error": err})
|
||||
}
|
||||
|
|
|
@ -26,15 +26,11 @@ import (
|
|||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/docker/machine/libmachine/drivers"
|
||||
"github.com/docker/machine/libmachine/shell"
|
||||
"github.com/docker/machine/libmachine/state"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"k8s.io/minikube/pkg/drivers/kic"
|
||||
"k8s.io/minikube/pkg/drivers/kic/oci"
|
||||
"k8s.io/minikube/pkg/minikube/cluster"
|
||||
"k8s.io/minikube/pkg/minikube/config"
|
||||
|
@ -44,71 +40,25 @@ import (
|
|||
"k8s.io/minikube/pkg/minikube/localpath"
|
||||
"k8s.io/minikube/pkg/minikube/machine"
|
||||
"k8s.io/minikube/pkg/minikube/out"
|
||||
"k8s.io/minikube/pkg/minikube/shell"
|
||||
)
|
||||
|
||||
var envTmpl = fmt.Sprintf("{{ .Prefix }}%s{{ .Delimiter }}{{ .DockerTLSVerify }}{{ .Suffix }}{{ .Prefix }}%s{{ .Delimiter }}{{ .DockerHost }}{{ .Suffix }}{{ .Prefix }}%s{{ .Delimiter }}{{ .DockerCertPath }}{{ .Suffix }}{{ .Prefix }}%s{{ .Delimiter }}{{ .MinikubeDockerdProfile }}{{ .Suffix }}{{ if .NoProxyVar }}{{ .Prefix }}{{ .NoProxyVar }}{{ .Delimiter }}{{ .NoProxyValue }}{{ .Suffix }}{{end}}{{ .UsageHint }}", constants.DockerTLSVerifyEnv, constants.DockerHostEnv, constants.DockerCertPathEnv, constants.MinikubeActiveDockerdEnv)
|
||||
var dockerEnvTmpl = fmt.Sprintf("{{ .Prefix }}%s{{ .Delimiter }}{{ .DockerTLSVerify }}{{ .Suffix }}{{ .Prefix }}%s{{ .Delimiter }}{{ .DockerHost }}{{ .Suffix }}{{ .Prefix }}%s{{ .Delimiter }}{{ .DockerCertPath }}{{ .Suffix }}{{ .Prefix }}%s{{ .Delimiter }}{{ .MinikubeDockerdProfile }}{{ .Suffix }}{{ if .NoProxyVar }}{{ .Prefix }}{{ .NoProxyVar }}{{ .Delimiter }}{{ .NoProxyValue }}{{ .Suffix }}{{end}}{{ .UsageHint }}", constants.DockerTLSVerifyEnv, constants.DockerHostEnv, constants.DockerCertPathEnv, constants.MinikubeActiveDockerdEnv)
|
||||
|
||||
const (
|
||||
fishSetPfx = "set -gx "
|
||||
fishSetSfx = "\"\n"
|
||||
fishSetDelim = " \""
|
||||
|
||||
fishUnsetPfx = "set -e "
|
||||
fishUnsetSfx = "\n"
|
||||
|
||||
psSetPfx = "$Env:"
|
||||
psSetSfx = "\"\n"
|
||||
psSetDelim = " = \""
|
||||
|
||||
psUnsetPfx = `Remove-Item Env:\\`
|
||||
psUnsetSfx = "\n"
|
||||
|
||||
cmdSetPfx = "SET "
|
||||
cmdSetSfx = "\n"
|
||||
cmdSetDelim = "="
|
||||
|
||||
cmdUnsetPfx = "SET "
|
||||
cmdUnsetSfx = "\n"
|
||||
cmdUnsetDelim = "="
|
||||
|
||||
emacsSetPfx = "(setenv \""
|
||||
emacsSetSfx = "\")\n"
|
||||
emacsSetDelim = "\" \""
|
||||
|
||||
emacsUnsetPfx = "(setenv \""
|
||||
emacsUnsetSfx = ")\n"
|
||||
emacsUnsetDelim = "\" nil"
|
||||
|
||||
bashSetPfx = "export "
|
||||
bashSetSfx = "\"\n"
|
||||
bashSetDelim = "=\""
|
||||
|
||||
bashUnsetPfx = "unset "
|
||||
bashUnsetSfx = "\n"
|
||||
|
||||
nonePfx = ""
|
||||
noneSfx = "\n"
|
||||
noneDelim = "="
|
||||
)
|
||||
|
||||
// ShellConfig represents the shell config
|
||||
type ShellConfig struct {
|
||||
Prefix string
|
||||
Delimiter string
|
||||
Suffix string
|
||||
// DockerShellConfig represents the shell config for Docker
|
||||
type DockerShellConfig struct {
|
||||
shell.Config
|
||||
DockerCertPath string
|
||||
DockerHost string
|
||||
DockerTLSVerify string
|
||||
MinikubeDockerdProfile string
|
||||
UsageHint string
|
||||
NoProxyVar string
|
||||
NoProxyValue string
|
||||
}
|
||||
|
||||
var (
|
||||
noProxy bool
|
||||
forceShell string
|
||||
unset bool
|
||||
dockerUnset bool
|
||||
defaultNoProxyGetter NoProxyGetter
|
||||
)
|
||||
|
||||
|
@ -120,45 +70,18 @@ type NoProxyGetter interface {
|
|||
// EnvNoProxyGetter gets the no_proxy variable, using environment
|
||||
type EnvNoProxyGetter struct{}
|
||||
|
||||
func generateUsageHint(profile, sh string) string {
|
||||
// dockerShellCfgSet generates context variables for "docker-env"
|
||||
func dockerShellCfgSet(ec DockerEnvConfig, envMap map[string]string) *DockerShellConfig {
|
||||
profile := ec.profile
|
||||
const usgPlz = "To point your shell to minikube's docker-daemon, run:"
|
||||
var usgCmd = fmt.Sprintf("minikube -p %s docker-env", profile)
|
||||
var usageHintMap = map[string]string{
|
||||
"bash": fmt.Sprintf(`
|
||||
# %s
|
||||
# eval $(%s)
|
||||
`, usgPlz, usgCmd),
|
||||
"fish": fmt.Sprintf(`
|
||||
# %s
|
||||
# eval (%s)
|
||||
`, usgPlz, usgCmd),
|
||||
"powershell": fmt.Sprintf(`# %s
|
||||
# & %s | Invoke-Expression
|
||||
`, usgPlz, usgCmd),
|
||||
"cmd": fmt.Sprintf(`REM %s
|
||||
REM @FOR /f "tokens=*" %%i IN ('%s') DO @%%i
|
||||
`, usgPlz, usgCmd),
|
||||
"emacs": fmt.Sprintf(`;; %s
|
||||
;; (with-temp-buffer (shell-command "%s" (current-buffer)) (eval-buffer))
|
||||
`, usgPlz, usgCmd),
|
||||
}
|
||||
|
||||
hint, ok := usageHintMap[sh]
|
||||
if !ok {
|
||||
return usageHintMap["bash"]
|
||||
}
|
||||
return hint
|
||||
}
|
||||
|
||||
// shellCfgSet generates context variables for "docker-env"
|
||||
func shellCfgSet(ec EnvConfig, envMap map[string]string) *ShellConfig {
|
||||
s := &ShellConfig{
|
||||
DockerCertPath: envMap[constants.DockerCertPathEnv],
|
||||
DockerHost: envMap[constants.DockerHostEnv],
|
||||
DockerTLSVerify: envMap[constants.DockerTLSVerifyEnv],
|
||||
MinikubeDockerdProfile: envMap[constants.MinikubeActiveDockerdEnv],
|
||||
UsageHint: generateUsageHint(ec.profile, ec.shell),
|
||||
s := &DockerShellConfig{
|
||||
Config: *shell.CfgSet(ec.EnvConfig, usgPlz, usgCmd),
|
||||
}
|
||||
s.DockerCertPath = envMap[constants.DockerCertPathEnv]
|
||||
s.DockerHost = envMap[constants.DockerHostEnv]
|
||||
s.DockerTLSVerify = envMap[constants.DockerTLSVerifyEnv]
|
||||
s.MinikubeDockerdProfile = envMap[constants.MinikubeActiveDockerdEnv]
|
||||
|
||||
if ec.noProxy {
|
||||
noProxyVar, noProxyValue := defaultNoProxyGetter.GetNoProxyVar()
|
||||
|
@ -177,33 +100,6 @@ func shellCfgSet(ec EnvConfig, envMap map[string]string) *ShellConfig {
|
|||
s.NoProxyValue = noProxyValue
|
||||
}
|
||||
|
||||
switch ec.shell {
|
||||
case "fish":
|
||||
s.Prefix = fishSetPfx
|
||||
s.Suffix = fishSetSfx
|
||||
s.Delimiter = fishSetDelim
|
||||
case "powershell":
|
||||
s.Prefix = psSetPfx
|
||||
s.Suffix = psSetSfx
|
||||
s.Delimiter = psSetDelim
|
||||
case "cmd":
|
||||
s.Prefix = cmdSetPfx
|
||||
s.Suffix = cmdSetSfx
|
||||
s.Delimiter = cmdSetDelim
|
||||
case "emacs":
|
||||
s.Prefix = emacsSetPfx
|
||||
s.Suffix = emacsSetSfx
|
||||
s.Delimiter = emacsSetDelim
|
||||
case "none":
|
||||
s.Prefix = nonePfx
|
||||
s.Suffix = noneSfx
|
||||
s.Delimiter = noneDelim
|
||||
s.UsageHint = ""
|
||||
default:
|
||||
s.Prefix = bashSetPfx
|
||||
s.Suffix = bashSetSfx
|
||||
s.Delimiter = bashSetDelim
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
|
@ -236,7 +132,7 @@ func isDockerActive(d drivers.Driver) (bool, error) {
|
|||
return err == nil && s == "active", nil
|
||||
}
|
||||
|
||||
// envCmd represents the docker-env command
|
||||
// dockerEnvCmd represents the docker-env command
|
||||
var dockerEnvCmd = &cobra.Command{
|
||||
Use: "docker-env",
|
||||
Short: "Sets up docker env variables; similar to '$(docker-machine env)'",
|
||||
|
@ -282,57 +178,68 @@ var dockerEnvCmd = &cobra.Command{
|
|||
exit.WithError("Error getting host IP", err)
|
||||
}
|
||||
|
||||
ec := EnvConfig{
|
||||
profile: profile,
|
||||
driver: host.DriverName,
|
||||
shell: forceShell,
|
||||
hostIP: hostIP,
|
||||
certsDir: localpath.MakeMiniPath("certs"),
|
||||
noProxy: noProxy,
|
||||
sh := shell.EnvConfig{
|
||||
Shell: shell.ForceShell,
|
||||
}
|
||||
|
||||
if ec.shell == "" {
|
||||
ec.shell, err = shell.Detect()
|
||||
port := constants.DockerDaemonPort
|
||||
if driver.IsKIC(host.DriverName) { // for kic we need to find what port docker/podman chose for us
|
||||
hostIP = oci.DefaultBindIPV4
|
||||
port, err = oci.HostPortBinding(host.DriverName, profile, port)
|
||||
if err != nil {
|
||||
exit.WithCodeT(exit.Failure, "Error getting port binding for '{{.driver_name}} driver: {{.error}}", out.V{"driver_name": host.DriverName, "error": err})
|
||||
}
|
||||
}
|
||||
|
||||
ec := DockerEnvConfig{
|
||||
EnvConfig: sh,
|
||||
profile: profile,
|
||||
driver: host.DriverName,
|
||||
hostIP: hostIP,
|
||||
port: port,
|
||||
certsDir: localpath.MakeMiniPath("certs"),
|
||||
noProxy: noProxy,
|
||||
}
|
||||
|
||||
if ec.Shell == "" {
|
||||
ec.Shell, err = shell.Detect()
|
||||
if err != nil {
|
||||
exit.WithError("Error detecting shell", err)
|
||||
}
|
||||
}
|
||||
|
||||
if unset {
|
||||
if err := unsetScript(ec, os.Stdout); err != nil {
|
||||
if dockerUnset {
|
||||
if err := dockerUnsetScript(ec, os.Stdout); err != nil {
|
||||
exit.WithError("Error generating unset output", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if err := setScript(ec, os.Stdout); err != nil {
|
||||
if err := dockerSetScript(ec, os.Stdout); err != nil {
|
||||
exit.WithError("Error generating set output", err)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
// EnvConfig encapsulates all external inputs into shell generation
|
||||
type EnvConfig struct {
|
||||
// DockerEnvConfig encapsulates all external inputs into shell generation for Docker
|
||||
type DockerEnvConfig struct {
|
||||
shell.EnvConfig
|
||||
profile string
|
||||
shell string
|
||||
driver string
|
||||
hostIP string
|
||||
port int
|
||||
certsDir string
|
||||
noProxy bool
|
||||
}
|
||||
|
||||
// setScript writes out a shell-compatible 'docker-env' script
|
||||
func setScript(ec EnvConfig, w io.Writer) error {
|
||||
tmpl := template.Must(template.New("envConfig").Parse(envTmpl))
|
||||
envVars, err := dockerEnvVars(ec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return tmpl.Execute(w, shellCfgSet(ec, envVars))
|
||||
// dockerSetScript writes out a shell-compatible 'docker-env' script
|
||||
func dockerSetScript(ec DockerEnvConfig, w io.Writer) error {
|
||||
envVars := dockerEnvVars(ec)
|
||||
return shell.SetScript(ec.EnvConfig, w, dockerEnvTmpl, dockerShellCfgSet(ec, envVars))
|
||||
}
|
||||
|
||||
// setScript writes out a shell-compatible 'docker-env unset' script
|
||||
func unsetScript(ec EnvConfig, w io.Writer) error {
|
||||
// dockerSetScript writes out a shell-compatible 'docker-env unset' script
|
||||
func dockerUnsetScript(ec DockerEnvConfig, w io.Writer) error {
|
||||
vars := []string{
|
||||
constants.DockerTLSVerifyEnv,
|
||||
constants.DockerHostEnv,
|
||||
|
@ -347,29 +254,7 @@ func unsetScript(ec EnvConfig, w io.Writer) error {
|
|||
}
|
||||
}
|
||||
|
||||
var sb strings.Builder
|
||||
switch ec.shell {
|
||||
case "fish":
|
||||
for _, v := range vars {
|
||||
sb.WriteString(fmt.Sprintf("%s%s%s", fishUnsetPfx, v, fishUnsetSfx))
|
||||
}
|
||||
case "powershell":
|
||||
sb.WriteString(fmt.Sprintf("%s%s%s", psUnsetPfx, strings.Join(vars, " Env:\\\\"), psUnsetSfx))
|
||||
case "cmd":
|
||||
for _, v := range vars {
|
||||
sb.WriteString(fmt.Sprintf("%s%s%s%s", cmdUnsetPfx, v, cmdUnsetDelim, cmdUnsetSfx))
|
||||
}
|
||||
case "emacs":
|
||||
for _, v := range vars {
|
||||
sb.WriteString(fmt.Sprintf("%s%s%s%s", emacsUnsetPfx, v, emacsUnsetDelim, emacsUnsetSfx))
|
||||
}
|
||||
case "none":
|
||||
sb.WriteString(fmt.Sprintf("%s%s%s", nonePfx, strings.Join(vars, " "), noneSfx))
|
||||
default:
|
||||
sb.WriteString(fmt.Sprintf("%s%s%s", bashUnsetPfx, strings.Join(vars, " "), bashUnsetSfx))
|
||||
}
|
||||
_, err := w.Write([]byte(sb.String()))
|
||||
return err
|
||||
return shell.UnsetScript(ec.EnvConfig, w, vars)
|
||||
}
|
||||
|
||||
// dockerURL returns a the docker endpoint URL for an ip/port pair.
|
||||
|
@ -378,27 +263,20 @@ func dockerURL(ip string, port int) string {
|
|||
}
|
||||
|
||||
// dockerEnvVars gets the necessary docker env variables to allow the use of minikube's docker daemon
|
||||
func dockerEnvVars(ec EnvConfig) (map[string]string, error) {
|
||||
func dockerEnvVars(ec DockerEnvConfig) map[string]string {
|
||||
env := map[string]string{
|
||||
constants.DockerTLSVerifyEnv: "1",
|
||||
constants.DockerHostEnv: dockerURL(ec.hostIP, constants.DockerDaemonPort),
|
||||
constants.DockerHostEnv: dockerURL(ec.hostIP, ec.port),
|
||||
constants.DockerCertPathEnv: ec.certsDir,
|
||||
constants.MinikubeActiveDockerdEnv: ec.profile,
|
||||
}
|
||||
|
||||
if driver.IsKIC(ec.driver) { // for kic we need to find out what port docker allocated during creation
|
||||
port, err := oci.HostPortBinding(ec.driver, ec.profile, constants.DockerDaemonPort)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "get hostbind port for %d", constants.DockerDaemonPort)
|
||||
}
|
||||
env[constants.DockerCertPathEnv] = dockerURL(kic.DefaultBindIPV4, port)
|
||||
}
|
||||
return env, nil
|
||||
return env
|
||||
}
|
||||
|
||||
func init() {
|
||||
defaultNoProxyGetter = &EnvNoProxyGetter{}
|
||||
dockerEnvCmd.Flags().BoolVar(&noProxy, "no-proxy", false, "Add machine IP to NO_PROXY environment variable")
|
||||
dockerEnvCmd.Flags().StringVar(&forceShell, "shell", "", "Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh, bash, zsh], default is auto-detect")
|
||||
dockerEnvCmd.Flags().BoolVarP(&unset, "unset", "u", false, "Unset variables instead of setting them")
|
||||
dockerEnvCmd.Flags().StringVar(&shell.ForceShell, "shell", "", "Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh, bash, zsh], default is auto-detect")
|
||||
dockerEnvCmd.Flags().BoolVarP(&dockerUnset, "unset", "u", false, "Unset variables instead of setting them")
|
||||
}
|
|
@ -32,15 +32,32 @@ func (f FakeNoProxyGetter) GetNoProxyVar() (string, string) {
|
|||
return f.NoProxyVar, f.NoProxyValue
|
||||
}
|
||||
|
||||
func TestGenerateScripts(t *testing.T) {
|
||||
func TestGenerateDockerScripts(t *testing.T) {
|
||||
var tests = []struct {
|
||||
config EnvConfig
|
||||
shell string
|
||||
config DockerEnvConfig
|
||||
noProxyGetter *FakeNoProxyGetter
|
||||
wantSet string
|
||||
wantUnset string
|
||||
}{
|
||||
{
|
||||
EnvConfig{profile: "bash", shell: "bash", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs"},
|
||||
"bash",
|
||||
DockerEnvConfig{profile: "dockerdrver", driver: "docker", hostIP: "127.0.0.1", port: 32842, certsDir: "/certs"},
|
||||
nil,
|
||||
`export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://127.0.0.1:32842"
|
||||
export DOCKER_CERT_PATH="/certs"
|
||||
export MINIKUBE_ACTIVE_DOCKERD="dockerdrver"
|
||||
|
||||
# To point your shell to minikube's docker-daemon, run:
|
||||
# eval $(minikube -p dockerdrver docker-env)
|
||||
`,
|
||||
`unset DOCKER_TLS_VERIFY DOCKER_HOST DOCKER_CERT_PATH MINIKUBE_ACTIVE_DOCKERD
|
||||
`,
|
||||
},
|
||||
{
|
||||
"bash",
|
||||
DockerEnvConfig{profile: "bash", driver: "kvm2", hostIP: "127.0.0.1", port: 2376, certsDir: "/certs"},
|
||||
nil,
|
||||
`export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://127.0.0.1:2376"
|
||||
|
@ -54,7 +71,8 @@ export MINIKUBE_ACTIVE_DOCKERD="bash"
|
|||
`,
|
||||
},
|
||||
{
|
||||
EnvConfig{profile: "ipv6", shell: "bash", driver: "kvm2", hostIP: "fe80::215:5dff:fe00:a903", certsDir: "/certs"},
|
||||
"bash",
|
||||
DockerEnvConfig{profile: "ipv6", driver: "kvm2", hostIP: "fe80::215:5dff:fe00:a903", port: 2376, certsDir: "/certs"},
|
||||
nil,
|
||||
`export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://[fe80::215:5dff:fe00:a903]:2376"
|
||||
|
@ -68,7 +86,8 @@ export MINIKUBE_ACTIVE_DOCKERD="ipv6"
|
|||
`,
|
||||
},
|
||||
{
|
||||
EnvConfig{profile: "fish", shell: "fish", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs"},
|
||||
"fish",
|
||||
DockerEnvConfig{profile: "fish", driver: "kvm2", hostIP: "127.0.0.1", port: 2376, certsDir: "/certs"},
|
||||
nil,
|
||||
`set -gx DOCKER_TLS_VERIFY "1"
|
||||
set -gx DOCKER_HOST "tcp://127.0.0.1:2376"
|
||||
|
@ -85,7 +104,8 @@ set -e MINIKUBE_ACTIVE_DOCKERD
|
|||
`,
|
||||
},
|
||||
{
|
||||
EnvConfig{profile: "powershell", shell: "powershell", driver: "hyperv", hostIP: "192.168.0.1", certsDir: "/certs"},
|
||||
"powershell",
|
||||
DockerEnvConfig{profile: "powershell", driver: "hyperv", hostIP: "192.168.0.1", port: 2376, certsDir: "/certs"},
|
||||
nil,
|
||||
`$Env:DOCKER_TLS_VERIFY = "1"
|
||||
$Env:DOCKER_HOST = "tcp://192.168.0.1:2376"
|
||||
|
@ -99,7 +119,8 @@ $Env:MINIKUBE_ACTIVE_DOCKERD = "powershell"
|
|||
`,
|
||||
},
|
||||
{
|
||||
EnvConfig{profile: "cmd", shell: "cmd", driver: "hyperv", hostIP: "192.168.0.1", certsDir: "/certs"},
|
||||
"cmd",
|
||||
DockerEnvConfig{profile: "cmd", driver: "hyperv", hostIP: "192.168.0.1", port: 2376, certsDir: "/certs"},
|
||||
nil,
|
||||
`SET DOCKER_TLS_VERIFY=1
|
||||
SET DOCKER_HOST=tcp://192.168.0.1:2376
|
||||
|
@ -116,7 +137,8 @@ SET MINIKUBE_ACTIVE_DOCKERD=
|
|||
`,
|
||||
},
|
||||
{
|
||||
EnvConfig{profile: "emacs", shell: "emacs", driver: "hyperv", hostIP: "192.168.0.1", certsDir: "/certs"},
|
||||
"emacs",
|
||||
DockerEnvConfig{profile: "emacs", driver: "hyperv", hostIP: "192.168.0.1", port: 2376, certsDir: "/certs"},
|
||||
nil,
|
||||
`(setenv "DOCKER_TLS_VERIFY" "1")
|
||||
(setenv "DOCKER_HOST" "tcp://192.168.0.1:2376")
|
||||
|
@ -132,7 +154,8 @@ SET MINIKUBE_ACTIVE_DOCKERD=
|
|||
`,
|
||||
},
|
||||
{
|
||||
EnvConfig{profile: "bash-no-proxy", shell: "bash", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs", noProxy: true},
|
||||
"bash",
|
||||
DockerEnvConfig{profile: "bash-no-proxy", driver: "kvm2", hostIP: "127.0.0.1", port: 2376, certsDir: "/certs", noProxy: true},
|
||||
&FakeNoProxyGetter{"NO_PROXY", "127.0.0.1"},
|
||||
`export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://127.0.0.1:2376"
|
||||
|
@ -148,7 +171,8 @@ export NO_PROXY="127.0.0.1"
|
|||
`,
|
||||
},
|
||||
{
|
||||
EnvConfig{profile: "bash-no-proxy-lower", shell: "bash", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs", noProxy: true},
|
||||
"bash",
|
||||
DockerEnvConfig{profile: "bash-no-proxy-lower", driver: "kvm2", hostIP: "127.0.0.1", port: 2376, certsDir: "/certs", noProxy: true},
|
||||
&FakeNoProxyGetter{"no_proxy", "127.0.0.1"},
|
||||
`export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://127.0.0.1:2376"
|
||||
|
@ -164,7 +188,8 @@ export no_proxy="127.0.0.1"
|
|||
`,
|
||||
},
|
||||
{
|
||||
EnvConfig{profile: "powershell-no-proxy-idempotent", shell: "powershell", driver: "hyperv", hostIP: "192.168.0.1", certsDir: "/certs", noProxy: true},
|
||||
"powershell",
|
||||
DockerEnvConfig{profile: "powershell-no-proxy-idempotent", driver: "hyperv", hostIP: "192.168.0.1", port: 2376, certsDir: "/certs", noProxy: true},
|
||||
&FakeNoProxyGetter{"no_proxy", "192.168.0.1"},
|
||||
`$Env:DOCKER_TLS_VERIFY = "1"
|
||||
$Env:DOCKER_HOST = "tcp://192.168.0.1:2376"
|
||||
|
@ -179,7 +204,8 @@ $Env:no_proxy = "192.168.0.1"
|
|||
`,
|
||||
},
|
||||
{
|
||||
EnvConfig{profile: "sh-no-proxy-add", shell: "bash", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs", noProxy: true},
|
||||
"bash",
|
||||
DockerEnvConfig{profile: "sh-no-proxy-add", driver: "kvm2", hostIP: "127.0.0.1", port: 2376, certsDir: "/certs", noProxy: true},
|
||||
&FakeNoProxyGetter{"NO_PROXY", "192.168.0.1,10.0.0.4"},
|
||||
`export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://127.0.0.1:2376"
|
||||
|
@ -197,10 +223,11 @@ export NO_PROXY="192.168.0.1,10.0.0.4,127.0.0.1"
|
|||
}
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.config.profile, func(t *testing.T) {
|
||||
tc.config.EnvConfig.Shell = tc.shell
|
||||
defaultNoProxyGetter = tc.noProxyGetter
|
||||
var b []byte
|
||||
buf := bytes.NewBuffer(b)
|
||||
if err := setScript(tc.config, buf); err != nil {
|
||||
if err := dockerSetScript(tc.config, buf); err != nil {
|
||||
t.Errorf("setScript(%+v) error: %v", tc.config, err)
|
||||
}
|
||||
got := buf.String()
|
||||
|
@ -209,7 +236,7 @@ export NO_PROXY="192.168.0.1,10.0.0.4,127.0.0.1"
|
|||
}
|
||||
|
||||
buf = bytes.NewBuffer(b)
|
||||
if err := unsetScript(tc.config, buf); err != nil {
|
||||
if err := dockerUnsetScript(tc.config, buf); err != nil {
|
||||
t.Errorf("unsetScript(%+v) error: %v", tc.config, err)
|
||||
}
|
||||
got = buf.String()
|
|
@ -28,7 +28,6 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
"k8s.io/minikube/pkg/minikube/config"
|
||||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
"k8s.io/minikube/pkg/minikube/exit"
|
||||
"k8s.io/minikube/pkg/minikube/machine"
|
||||
"k8s.io/minikube/pkg/minikube/out"
|
||||
)
|
||||
|
@ -55,19 +54,14 @@ minikube kubectl -- get pods --namespace kube-system`,
|
|||
out.ErrLn("Error loading profile config: %v", err)
|
||||
}
|
||||
|
||||
binary := "kubectl"
|
||||
if runtime.GOOS == "windows" {
|
||||
binary = "kubectl.exe"
|
||||
}
|
||||
|
||||
version := constants.DefaultKubernetesVersion
|
||||
if cc != nil {
|
||||
version = cc.KubernetesConfig.KubernetesVersion
|
||||
}
|
||||
|
||||
path, err := machine.CacheBinary(binary, version, runtime.GOOS, runtime.GOARCH)
|
||||
path, err := cacheKubectlBinary(version)
|
||||
if err != nil {
|
||||
exit.WithError("Failed to download kubectl", err)
|
||||
out.ErrLn("Error caching kubectl: %v", err)
|
||||
}
|
||||
|
||||
glog.Infof("Running %s %v", path, args)
|
||||
|
@ -88,3 +82,12 @@ minikube kubectl -- get pods --namespace kube-system`,
|
|||
}
|
||||
},
|
||||
}
|
||||
|
||||
func cacheKubectlBinary(k8sVerison string) (string, error) {
|
||||
binary := "kubectl"
|
||||
if runtime.GOOS == "windows" {
|
||||
binary = "kubectl.exe"
|
||||
}
|
||||
|
||||
return machine.CacheBinary(binary, k8sVerison, runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,226 @@
|
|||
/*
|
||||
Copyright 2020 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.
|
||||
*/
|
||||
|
||||
// Part of this code is heavily inspired/copied by the following file:
|
||||
// github.com/docker/machine/commands/env.go
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/machine/libmachine/drivers"
|
||||
"github.com/docker/machine/libmachine/host"
|
||||
"github.com/docker/machine/libmachine/ssh"
|
||||
"github.com/docker/machine/libmachine/state"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"k8s.io/minikube/pkg/minikube/cluster"
|
||||
"k8s.io/minikube/pkg/minikube/config"
|
||||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
"k8s.io/minikube/pkg/minikube/driver"
|
||||
"k8s.io/minikube/pkg/minikube/exit"
|
||||
"k8s.io/minikube/pkg/minikube/machine"
|
||||
"k8s.io/minikube/pkg/minikube/out"
|
||||
"k8s.io/minikube/pkg/minikube/shell"
|
||||
)
|
||||
|
||||
var podmanEnvTmpl = fmt.Sprintf("{{ .Prefix }}%s{{ .Delimiter }}{{ .VarlinkBridge }}{{ .Suffix }}{{ .UsageHint }}", constants.PodmanVarlinkBridgeEnv)
|
||||
|
||||
// PodmanShellConfig represents the shell config for Podman
|
||||
type PodmanShellConfig struct {
|
||||
shell.Config
|
||||
VarlinkBridge string
|
||||
}
|
||||
|
||||
var (
|
||||
podmanUnset bool
|
||||
)
|
||||
|
||||
// podmanShellCfgSet generates context variables for "podman-env"
|
||||
func podmanShellCfgSet(ec PodmanEnvConfig, envMap map[string]string) *PodmanShellConfig {
|
||||
profile := ec.profile
|
||||
const usgPlz = "To point your shell to minikube's podman service, run:"
|
||||
var usgCmd = fmt.Sprintf("minikube -p %s podman-env", profile)
|
||||
s := &PodmanShellConfig{
|
||||
Config: *shell.CfgSet(ec.EnvConfig, usgPlz, usgCmd),
|
||||
}
|
||||
s.VarlinkBridge = envMap[constants.PodmanVarlinkBridgeEnv]
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
// isPodmanAvailable checks if Podman is available
|
||||
func isPodmanAvailable(host *host.Host) (bool, error) {
|
||||
// we need both "varlink bridge" and "podman varlink"
|
||||
if _, err := host.RunSSHCommand("which varlink"); err != nil {
|
||||
return false, err
|
||||
}
|
||||
if _, err := host.RunSSHCommand("which podman"); err != nil {
|
||||
return false, err
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func createExternalSSHClient(d drivers.Driver) (*ssh.ExternalClient, error) {
|
||||
sshBinaryPath, err := exec.LookPath("ssh")
|
||||
if err != nil {
|
||||
return &ssh.ExternalClient{}, err
|
||||
}
|
||||
|
||||
addr, err := d.GetSSHHostname()
|
||||
if err != nil {
|
||||
return &ssh.ExternalClient{}, err
|
||||
}
|
||||
|
||||
port, err := d.GetSSHPort()
|
||||
if err != nil {
|
||||
return &ssh.ExternalClient{}, err
|
||||
}
|
||||
|
||||
auth := &ssh.Auth{}
|
||||
if d.GetSSHKeyPath() != "" {
|
||||
auth.Keys = []string{d.GetSSHKeyPath()}
|
||||
}
|
||||
|
||||
return ssh.NewExternalClient(sshBinaryPath, d.GetSSHUsername(), addr, port, auth)
|
||||
}
|
||||
|
||||
// podmanEnvCmd represents the podman-env command
|
||||
var podmanEnvCmd = &cobra.Command{
|
||||
Use: "podman-env",
|
||||
Short: "Sets up podman env variables; similar to '$(podman-machine env)'",
|
||||
Long: `Sets up podman env variables; similar to '$(podman-machine env)'.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
api, err := machine.NewAPIClient()
|
||||
if err != nil {
|
||||
exit.WithError("Error getting client", err)
|
||||
}
|
||||
defer api.Close()
|
||||
|
||||
profile := viper.GetString(config.MachineProfile)
|
||||
cc, err := config.Load(profile)
|
||||
if err != nil {
|
||||
exit.WithError("Error getting config", err)
|
||||
}
|
||||
host, err := cluster.CheckIfHostExistsAndLoad(api, cc.Name)
|
||||
if err != nil {
|
||||
exit.WithError("Error getting host", err)
|
||||
}
|
||||
if host.Driver.DriverName() == driver.None {
|
||||
exit.UsageT(`'none' driver does not support 'minikube podman-env' command`)
|
||||
}
|
||||
|
||||
hostSt, err := cluster.GetHostStatus(api, cc.Name)
|
||||
if err != nil {
|
||||
exit.WithError("Error getting host status", err)
|
||||
}
|
||||
if hostSt != state.Running.String() {
|
||||
exit.WithCodeT(exit.Unavailable, `'{{.profile}}' is not running`, out.V{"profile": profile})
|
||||
}
|
||||
ok, err := isPodmanAvailable(host)
|
||||
if err != nil {
|
||||
exit.WithError("Error getting service status", err)
|
||||
}
|
||||
|
||||
if !ok {
|
||||
exit.WithCodeT(exit.Unavailable, `The podman service within '{{.profile}}' is not active`, out.V{"profile": profile})
|
||||
}
|
||||
|
||||
client, err := createExternalSSHClient(host.Driver)
|
||||
if err != nil {
|
||||
exit.WithError("Error getting ssh client", err)
|
||||
}
|
||||
|
||||
sh := shell.EnvConfig{
|
||||
Shell: shell.ForceShell,
|
||||
}
|
||||
ec := PodmanEnvConfig{
|
||||
EnvConfig: sh,
|
||||
profile: profile,
|
||||
driver: host.DriverName,
|
||||
client: client,
|
||||
}
|
||||
|
||||
if ec.Shell == "" {
|
||||
ec.Shell, err = shell.Detect()
|
||||
if err != nil {
|
||||
exit.WithError("Error detecting shell", err)
|
||||
}
|
||||
}
|
||||
|
||||
if podmanUnset {
|
||||
if err := podmanUnsetScript(ec, os.Stdout); err != nil {
|
||||
exit.WithError("Error generating unset output", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if err := podmanSetScript(ec, os.Stdout); err != nil {
|
||||
exit.WithError("Error generating set output", err)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
// PodmanEnvConfig encapsulates all external inputs into shell generation for Podman
|
||||
type PodmanEnvConfig struct {
|
||||
shell.EnvConfig
|
||||
profile string
|
||||
driver string
|
||||
client *ssh.ExternalClient
|
||||
}
|
||||
|
||||
// podmanSetScript writes out a shell-compatible 'podman-env' script
|
||||
func podmanSetScript(ec PodmanEnvConfig, w io.Writer) error {
|
||||
envVars, err := podmanEnvVars(ec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return shell.SetScript(ec.EnvConfig, w, podmanEnvTmpl, podmanShellCfgSet(ec, envVars))
|
||||
}
|
||||
|
||||
// podmanUnsetScript writes out a shell-compatible 'podman-env unset' script
|
||||
func podmanUnsetScript(ec PodmanEnvConfig, w io.Writer) error {
|
||||
vars := []string{
|
||||
constants.PodmanVarlinkBridgeEnv,
|
||||
}
|
||||
return shell.UnsetScript(ec.EnvConfig, w, vars)
|
||||
}
|
||||
|
||||
// podmanBridge returns the command to use in a var for accessing the podman varlink bridge over ssh
|
||||
func podmanBridge(client *ssh.ExternalClient) string {
|
||||
command := []string{client.BinaryPath}
|
||||
command = append(command, client.BaseArgs...)
|
||||
command = append(command, "--", "sudo", "varlink", "-A", `\'podman varlink \\\$VARLINK_ADDRESS\'`, "bridge")
|
||||
return strings.Join(command, " ")
|
||||
}
|
||||
|
||||
// podmanEnvVars gets the necessary podman env variables to allow the use of minikube's podman service
|
||||
func podmanEnvVars(ec PodmanEnvConfig) (map[string]string, error) { // nolint result 1 (error) is always nil
|
||||
env := map[string]string{
|
||||
constants.PodmanVarlinkBridgeEnv: podmanBridge(ec.client),
|
||||
}
|
||||
return env, nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
podmanEnvCmd.Flags().StringVar(&shell.ForceShell, "shell", "", "Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh, bash, zsh], default is auto-detect")
|
||||
podmanEnvCmd.Flags().BoolVarP(&podmanUnset, "unset", "u", false, "Unset variables instead of setting them")
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
Copyright 2020 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.
|
||||
*/
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/machine/libmachine/ssh"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
)
|
||||
|
||||
func newFakeClient() *ssh.ExternalClient {
|
||||
return &ssh.ExternalClient{
|
||||
BaseArgs: []string{"root@host"},
|
||||
BinaryPath: "/usr/bin/ssh",
|
||||
}
|
||||
}
|
||||
|
||||
func TestGeneratePodmanScripts(t *testing.T) {
|
||||
var tests = []struct {
|
||||
shell string
|
||||
config PodmanEnvConfig
|
||||
noProxyGetter *FakeNoProxyGetter
|
||||
wantSet string
|
||||
wantUnset string
|
||||
}{
|
||||
{
|
||||
"bash",
|
||||
PodmanEnvConfig{profile: "bash", driver: "kvm2", client: newFakeClient()},
|
||||
nil,
|
||||
`export PODMAN_VARLINK_BRIDGE="/usr/bin/ssh root@host -- sudo varlink -A \'podman varlink \\\$VARLINK_ADDRESS\' bridge"
|
||||
|
||||
# To point your shell to minikube's podman service, run:
|
||||
# eval $(minikube -p bash podman-env)
|
||||
`,
|
||||
`unset PODMAN_VARLINK_BRIDGE
|
||||
`,
|
||||
},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.config.profile, func(t *testing.T) {
|
||||
tc.config.EnvConfig.Shell = tc.shell
|
||||
defaultNoProxyGetter = tc.noProxyGetter
|
||||
var b []byte
|
||||
buf := bytes.NewBuffer(b)
|
||||
if err := podmanSetScript(tc.config, buf); err != nil {
|
||||
t.Errorf("setScript(%+v) error: %v", tc.config, err)
|
||||
}
|
||||
got := buf.String()
|
||||
if diff := cmp.Diff(tc.wantSet, got); diff != "" {
|
||||
t.Errorf("setScript(%+v) mismatch (-want +got):\n%s\n\nraw output:\n%s\nquoted: %q", tc.config, diff, got, got)
|
||||
}
|
||||
|
||||
buf = bytes.NewBuffer(b)
|
||||
if err := podmanUnsetScript(tc.config, buf); err != nil {
|
||||
t.Errorf("unsetScript(%+v) error: %v", tc.config, err)
|
||||
}
|
||||
got = buf.String()
|
||||
if diff := cmp.Diff(tc.wantUnset, got); diff != "" {
|
||||
t.Errorf("unsetScript(%+v) mismatch (-want +got):\n%s\n\nraw output:\n%s\nquoted: %q", tc.config, diff, got, got)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
|
@ -180,6 +180,7 @@ func init() {
|
|||
Message: translate.T("Images Commands:"),
|
||||
Commands: []*cobra.Command{
|
||||
dockerEnvCmd,
|
||||
podmanEnvCmd,
|
||||
cacheCmd,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -73,59 +73,61 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
isoURL = "iso-url"
|
||||
memory = "memory"
|
||||
cpus = "cpus"
|
||||
humanReadableDiskSize = "disk-size"
|
||||
nfsSharesRoot = "nfs-shares-root"
|
||||
nfsShare = "nfs-share"
|
||||
kubernetesVersion = "kubernetes-version"
|
||||
hostOnlyCIDR = "host-only-cidr"
|
||||
containerRuntime = "container-runtime"
|
||||
criSocket = "cri-socket"
|
||||
networkPlugin = "network-plugin"
|
||||
enableDefaultCNI = "enable-default-cni"
|
||||
hypervVirtualSwitch = "hyperv-virtual-switch"
|
||||
kvmNetwork = "kvm-network"
|
||||
kvmQemuURI = "kvm-qemu-uri"
|
||||
kvmGPU = "kvm-gpu"
|
||||
kvmHidden = "kvm-hidden"
|
||||
minikubeEnvPrefix = "MINIKUBE"
|
||||
defaultMemorySize = "2000mb"
|
||||
installAddons = "install-addons"
|
||||
defaultDiskSize = "20000mb"
|
||||
keepContext = "keep-context"
|
||||
createMount = "mount"
|
||||
featureGates = "feature-gates"
|
||||
apiServerName = "apiserver-name"
|
||||
apiServerPort = "apiserver-port"
|
||||
dnsDomain = "dns-domain"
|
||||
serviceCIDR = "service-cluster-ip-range"
|
||||
imageRepository = "image-repository"
|
||||
imageMirrorCountry = "image-mirror-country"
|
||||
mountString = "mount-string"
|
||||
disableDriverMounts = "disable-driver-mounts"
|
||||
cacheImages = "cache-images"
|
||||
uuid = "uuid"
|
||||
vpnkitSock = "hyperkit-vpnkit-sock"
|
||||
vsockPorts = "hyperkit-vsock-ports"
|
||||
embedCerts = "embed-certs"
|
||||
noVTXCheck = "no-vtx-check"
|
||||
downloadOnly = "download-only"
|
||||
dnsProxy = "dns-proxy"
|
||||
hostDNSResolver = "host-dns-resolver"
|
||||
waitUntilHealthy = "wait"
|
||||
force = "force"
|
||||
dryRun = "dry-run"
|
||||
interactive = "interactive"
|
||||
waitTimeout = "wait-timeout"
|
||||
nativeSSH = "native-ssh"
|
||||
minimumMemorySize = "1024mb"
|
||||
minimumCPUS = 2
|
||||
minimumDiskSize = "2000mb"
|
||||
autoUpdate = "auto-update-drivers"
|
||||
hostOnlyNicType = "host-only-nic-type"
|
||||
natNicType = "nat-nic-type"
|
||||
isoURL = "iso-url"
|
||||
memory = "memory"
|
||||
cpus = "cpus"
|
||||
humanReadableDiskSize = "disk-size"
|
||||
nfsSharesRoot = "nfs-shares-root"
|
||||
nfsShare = "nfs-share"
|
||||
kubernetesVersion = "kubernetes-version"
|
||||
hostOnlyCIDR = "host-only-cidr"
|
||||
containerRuntime = "container-runtime"
|
||||
criSocket = "cri-socket"
|
||||
networkPlugin = "network-plugin"
|
||||
enableDefaultCNI = "enable-default-cni"
|
||||
hypervVirtualSwitch = "hyperv-virtual-switch"
|
||||
hypervUseExternalSwitch = "hyperv-use-external-switch"
|
||||
hypervExternalAdapter = "hyperv-external-adapter"
|
||||
kvmNetwork = "kvm-network"
|
||||
kvmQemuURI = "kvm-qemu-uri"
|
||||
kvmGPU = "kvm-gpu"
|
||||
kvmHidden = "kvm-hidden"
|
||||
minikubeEnvPrefix = "MINIKUBE"
|
||||
defaultMemorySize = "2000mb"
|
||||
installAddons = "install-addons"
|
||||
defaultDiskSize = "20000mb"
|
||||
keepContext = "keep-context"
|
||||
createMount = "mount"
|
||||
featureGates = "feature-gates"
|
||||
apiServerName = "apiserver-name"
|
||||
apiServerPort = "apiserver-port"
|
||||
dnsDomain = "dns-domain"
|
||||
serviceCIDR = "service-cluster-ip-range"
|
||||
imageRepository = "image-repository"
|
||||
imageMirrorCountry = "image-mirror-country"
|
||||
mountString = "mount-string"
|
||||
disableDriverMounts = "disable-driver-mounts"
|
||||
cacheImages = "cache-images"
|
||||
uuid = "uuid"
|
||||
vpnkitSock = "hyperkit-vpnkit-sock"
|
||||
vsockPorts = "hyperkit-vsock-ports"
|
||||
embedCerts = "embed-certs"
|
||||
noVTXCheck = "no-vtx-check"
|
||||
downloadOnly = "download-only"
|
||||
dnsProxy = "dns-proxy"
|
||||
hostDNSResolver = "host-dns-resolver"
|
||||
waitUntilHealthy = "wait"
|
||||
force = "force"
|
||||
dryRun = "dry-run"
|
||||
interactive = "interactive"
|
||||
waitTimeout = "wait-timeout"
|
||||
nativeSSH = "native-ssh"
|
||||
minimumMemorySize = "1024mb"
|
||||
minimumCPUS = 2
|
||||
minimumDiskSize = "2000mb"
|
||||
autoUpdate = "auto-update-drivers"
|
||||
hostOnlyNicType = "host-only-nic-type"
|
||||
natNicType = "nat-nic-type"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -227,6 +229,8 @@ func initDriverFlags() {
|
|||
|
||||
// hyperv
|
||||
startCmd.Flags().String(hypervVirtualSwitch, "", "The hyperv virtual switch name. Defaults to first found. (hyperv driver only)")
|
||||
startCmd.Flags().Bool(hypervUseExternalSwitch, false, "Whether to use external switch over Default Switch if virtual switch not explicitly specified. (hyperv driver only)")
|
||||
startCmd.Flags().String(hypervExternalAdapter, "", "External Adapter on which external switch will be created if no external switch is found. (hyperv driver only)")
|
||||
}
|
||||
|
||||
// initNetworkingFlags inits the commandline flags for connectivity related flags for start
|
||||
|
@ -480,6 +484,9 @@ func handleDownloadOnly(cacheGroup *errgroup.Group, k8sVersion string) {
|
|||
if err := doCacheBinaries(k8sVersion); err != nil {
|
||||
exit.WithError("Failed to cache binaries", err)
|
||||
}
|
||||
if _, err := cacheKubectlBinary(k8sVersion); err != nil {
|
||||
exit.WithError("Failed to cache kubectl", err)
|
||||
}
|
||||
waitCacheRequiredImages(cacheGroup)
|
||||
if err := saveImagesToTarFromConfig(); err != nil {
|
||||
exit.WithError("Failed to cache images to tar", err)
|
||||
|
@ -740,11 +747,11 @@ func validateUser(drvName string) {
|
|||
|
||||
useForce := viper.GetBool(force)
|
||||
|
||||
if driver.BareMetal(drvName) && u.Uid != "0" && !useForce {
|
||||
if driver.NeedsRoot(drvName) && u.Uid != "0" && !useForce {
|
||||
exit.WithCodeT(exit.Permissions, `The "{{.driver_name}}" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}'.`, out.V{"driver_name": drvName})
|
||||
}
|
||||
|
||||
if driver.BareMetal(drvName) || u.Uid != "0" {
|
||||
if driver.NeedsRoot(drvName) || u.Uid != "0" {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -808,16 +815,18 @@ func validateFlags(cmd *cobra.Command, drvName string) {
|
|||
validateDiskSize()
|
||||
validateMemorySize()
|
||||
|
||||
if driver.BareMetal(drvName) {
|
||||
if viper.GetString(config.MachineProfile) != constants.DefaultMachineName {
|
||||
exit.WithCodeT(exit.Config, "The 'none' driver does not support multiple profiles: https://minikube.sigs.k8s.io/docs/reference/drivers/none/")
|
||||
}
|
||||
|
||||
if !driver.HasResourceLimits(drvName) { // both podman and none need root and they both cant specify resources
|
||||
if cmd.Flags().Changed(cpus) {
|
||||
out.WarningT("The 'none' driver does not respect the --cpus flag")
|
||||
out.WarningT("The '{{.name}}' driver does not respect the --cpus flag", out.V{"name": drvName})
|
||||
}
|
||||
if cmd.Flags().Changed(memory) {
|
||||
out.WarningT("The 'none' driver does not respect the --memory flag")
|
||||
out.WarningT("The '{{.name}}' driver does not respect the --memory flag", out.V{"name": drvName})
|
||||
}
|
||||
}
|
||||
|
||||
if driver.BareMetal(drvName) {
|
||||
if viper.GetString(config.MachineProfile) != constants.DefaultMachineName {
|
||||
exit.WithCodeT(exit.Config, "The '{{.name}} driver does not support multiple profiles: https://minikube.sigs.k8s.io/docs/reference/drivers/none/", out.V{"name": drvName})
|
||||
}
|
||||
|
||||
runtime := viper.GetString(containerRuntime)
|
||||
|
@ -943,36 +952,38 @@ func generateCfgFromFlags(cmd *cobra.Command, k8sVersion string, drvName string)
|
|||
}
|
||||
|
||||
cfg := config.MachineConfig{
|
||||
Name: viper.GetString(config.MachineProfile),
|
||||
KeepContext: viper.GetBool(keepContext),
|
||||
EmbedCerts: viper.GetBool(embedCerts),
|
||||
MinikubeISO: viper.GetString(isoURL),
|
||||
Memory: pkgutil.CalculateSizeInMB(viper.GetString(memory)),
|
||||
CPUs: viper.GetInt(cpus),
|
||||
DiskSize: pkgutil.CalculateSizeInMB(viper.GetString(humanReadableDiskSize)),
|
||||
VMDriver: drvName,
|
||||
HyperkitVpnKitSock: viper.GetString(vpnkitSock),
|
||||
HyperkitVSockPorts: viper.GetStringSlice(vsockPorts),
|
||||
NFSShare: viper.GetStringSlice(nfsShare),
|
||||
NFSSharesRoot: viper.GetString(nfsSharesRoot),
|
||||
DockerEnv: dockerEnv,
|
||||
DockerOpt: dockerOpt,
|
||||
InsecureRegistry: insecureRegistry,
|
||||
RegistryMirror: registryMirror,
|
||||
HostOnlyCIDR: viper.GetString(hostOnlyCIDR),
|
||||
HypervVirtualSwitch: viper.GetString(hypervVirtualSwitch),
|
||||
KVMNetwork: viper.GetString(kvmNetwork),
|
||||
KVMQemuURI: viper.GetString(kvmQemuURI),
|
||||
KVMGPU: viper.GetBool(kvmGPU),
|
||||
KVMHidden: viper.GetBool(kvmHidden),
|
||||
Downloader: pkgutil.DefaultDownloader{},
|
||||
DisableDriverMounts: viper.GetBool(disableDriverMounts),
|
||||
UUID: viper.GetString(uuid),
|
||||
NoVTXCheck: viper.GetBool(noVTXCheck),
|
||||
DNSProxy: viper.GetBool(dnsProxy),
|
||||
HostDNSResolver: viper.GetBool(hostDNSResolver),
|
||||
HostOnlyNicType: viper.GetString(hostOnlyNicType),
|
||||
NatNicType: viper.GetString(natNicType),
|
||||
Name: viper.GetString(config.MachineProfile),
|
||||
KeepContext: viper.GetBool(keepContext),
|
||||
EmbedCerts: viper.GetBool(embedCerts),
|
||||
MinikubeISO: viper.GetString(isoURL),
|
||||
Memory: pkgutil.CalculateSizeInMB(viper.GetString(memory)),
|
||||
CPUs: viper.GetInt(cpus),
|
||||
DiskSize: pkgutil.CalculateSizeInMB(viper.GetString(humanReadableDiskSize)),
|
||||
VMDriver: drvName,
|
||||
HyperkitVpnKitSock: viper.GetString(vpnkitSock),
|
||||
HyperkitVSockPorts: viper.GetStringSlice(vsockPorts),
|
||||
NFSShare: viper.GetStringSlice(nfsShare),
|
||||
NFSSharesRoot: viper.GetString(nfsSharesRoot),
|
||||
DockerEnv: dockerEnv,
|
||||
DockerOpt: dockerOpt,
|
||||
InsecureRegistry: insecureRegistry,
|
||||
RegistryMirror: registryMirror,
|
||||
HostOnlyCIDR: viper.GetString(hostOnlyCIDR),
|
||||
HypervVirtualSwitch: viper.GetString(hypervVirtualSwitch),
|
||||
HypervUseExternalSwitch: viper.GetBool(hypervUseExternalSwitch),
|
||||
HypervExternalAdapter: viper.GetString(hypervExternalAdapter),
|
||||
KVMNetwork: viper.GetString(kvmNetwork),
|
||||
KVMQemuURI: viper.GetString(kvmQemuURI),
|
||||
KVMGPU: viper.GetBool(kvmGPU),
|
||||
KVMHidden: viper.GetBool(kvmHidden),
|
||||
Downloader: pkgutil.DefaultDownloader{},
|
||||
DisableDriverMounts: viper.GetBool(disableDriverMounts),
|
||||
UUID: viper.GetString(uuid),
|
||||
NoVTXCheck: viper.GetBool(noVTXCheck),
|
||||
DNSProxy: viper.GetBool(dnsProxy),
|
||||
HostDNSResolver: viper.GetBool(hostDNSResolver),
|
||||
HostOnlyNicType: viper.GetString(hostOnlyNicType),
|
||||
NatNicType: viper.GetString(natNicType),
|
||||
KubernetesConfig: config.KubernetesConfig{
|
||||
KubernetesVersion: k8sVersion,
|
||||
ClusterName: viper.GetString(config.MachineProfile),
|
||||
|
@ -1083,6 +1094,13 @@ func startHost(api libmachine.API, mc config.MachineConfig) (*host.Host, bool) {
|
|||
|
||||
host, err := cluster.StartHost(api, mc)
|
||||
if err != nil {
|
||||
// If virtual machine does not exist due to user interrupt cancel(i.e. Ctrl + C), initialize exists flag
|
||||
if err == cluster.ErrorMachineNotExist {
|
||||
// If Machine does not exist, of course the machine does not have kubeadm config files
|
||||
// In order not to determine the machine has kubeadm config files, initialize exists flag
|
||||
// ※ If exists flag is true, minikube determines the machine has kubeadm config files
|
||||
return host, false
|
||||
}
|
||||
exit.WithError("Unable to start VM. Please investigate and run 'minikube delete' if possible", err)
|
||||
}
|
||||
return host, exists
|
||||
|
|
|
@ -26,7 +26,6 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
"k8s.io/minikube/pkg/minikube/cluster"
|
||||
pkg_config "k8s.io/minikube/pkg/minikube/config"
|
||||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
"k8s.io/minikube/pkg/minikube/exit"
|
||||
"k8s.io/minikube/pkg/minikube/kubeconfig"
|
||||
"k8s.io/minikube/pkg/minikube/machine"
|
||||
|
@ -82,7 +81,7 @@ func runStop(cmd *cobra.Command, args []string) {
|
|||
out.T(out.WarningType, "Unable to kill mount process: {{.error}}", out.V{"error": err})
|
||||
}
|
||||
|
||||
err = kubeconfig.UnsetCurrentContext(profile, constants.KubeconfigPath)
|
||||
err = kubeconfig.UnsetCurrentContext(profile, kubeconfig.PathFromEnv())
|
||||
if err != nil {
|
||||
exit.WithError("update config", err)
|
||||
}
|
||||
|
|
|
@ -17,13 +17,10 @@ limitations under the License.
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"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/kubeconfig"
|
||||
"k8s.io/minikube/pkg/minikube/machine"
|
||||
|
@ -47,13 +44,7 @@ var updateContextCmd = &cobra.Command{
|
|||
if err != nil {
|
||||
exit.WithError("Error host driver ip status", err)
|
||||
}
|
||||
var updated bool
|
||||
kubeConfigPath := os.Getenv("KUBECONFIG")
|
||||
if kubeConfigPath == "" {
|
||||
updated, err = kubeconfig.UpdateIP(ip, machineName, constants.KubeconfigPath)
|
||||
} else {
|
||||
updated, err = kubeconfig.UpdateIP(ip, machineName, kubeConfigPath)
|
||||
}
|
||||
updated, err := kubeconfig.UpdateIP(ip, machineName, kubeconfig.PathFromEnv())
|
||||
if err != nil {
|
||||
exit.WithError("update config", err)
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ spec:
|
|||
value: kube-system
|
||||
- name: TILLER_HISTORY_MAX
|
||||
value: "0"
|
||||
image: gcr.io/kubernetes-helm/tiller:v2.14.3
|
||||
image: gcr.io/kubernetes-helm/tiller:v2.16.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
|
|
|
@ -28,6 +28,7 @@ CONFIG_CGROUP_PERF=y
|
|||
CONFIG_USER_NS=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_CGROUP_BPF=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_SMP=y
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
[
|
||||
{
|
||||
"name": "v1.7.2",
|
||||
"checksums": {
|
||||
"darwin": "fcfb05f44620e54ce81fe8ac415196230ceb42c4007171533ef2049b7d4e8646",
|
||||
"linux": "9f543f464b4d93a259f7d5a7578edff1316370d45b5a0679b86ed7a61b01634d",
|
||||
"windows": "cbbe30445baffa9a3d77834d4e24c1ec595ecc2b7933db21109aa90aa79eaddd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "v1.7.1",
|
||||
"checksums": {
|
||||
|
|
10
go.mod
10
go.mod
|
@ -4,7 +4,6 @@ go 1.13
|
|||
|
||||
require (
|
||||
github.com/Parallels/docker-machine-parallels v1.3.0
|
||||
github.com/Sirupsen/logrus v0.0.0-20170822132746-89742aefa4b2 // indirect
|
||||
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
|
||||
github.com/blang/semver v3.5.0+incompatible
|
||||
github.com/c4milo/gotoolkit v0.0.0-20170318115440-bcc06269efa9 // indirect
|
||||
|
@ -22,9 +21,8 @@ require (
|
|||
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
|
||||
github.com/google/go-cmp v0.3.0
|
||||
github.com/google/go-containerregistry v0.0.0-20180731221751-697ee0b3d46e
|
||||
github.com/google/go-containerregistry v0.0.0-20200131185320-aec8da010de2
|
||||
github.com/googleapis/gnostic v0.3.0 // indirect
|
||||
github.com/gorilla/mux v1.7.3 // indirect
|
||||
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce // indirect
|
||||
github.com/hashicorp/go-getter v1.4.0
|
||||
github.com/hashicorp/go-multierror v0.0.0-20160811015721-8c5f0ad93604 // indirect
|
||||
|
@ -67,9 +65,9 @@ require (
|
|||
github.com/xeipuuv/gojsonschema v0.0.0-20160623135812-c539bca196be
|
||||
github.com/zchee/go-vmnet v0.0.0-20161021174912-97ebf9174097
|
||||
golang.org/x/build v0.0.0-20190927031335-2835ba2e683f
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
|
||||
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456
|
||||
golang.org/x/sys v0.0.0-20191010194322-b09406accb47
|
||||
golang.org/x/text v0.3.2
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
|
||||
k8s.io/api v0.17.2
|
||||
|
@ -83,8 +81,10 @@ require (
|
|||
|
||||
replace (
|
||||
git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999
|
||||
github.com/docker/docker => github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7
|
||||
github.com/docker/machine => github.com/machine-drivers/machine v0.7.1-0.20191109154235-b39d5b50de51
|
||||
github.com/hashicorp/go-getter => github.com/afbjorklund/go-getter v1.4.1-0.20190910175809-eb9f6c26742c
|
||||
github.com/samalba/dockerclient => github.com/sayboras/dockerclient v0.0.0-20191231050035-015626177a97
|
||||
k8s.io/api => k8s.io/api v0.17.2
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.17.2
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.17.2
|
||||
|
|
72
go.sum
72
go.sum
|
@ -9,14 +9,21 @@ cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTj
|
|||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
|
||||
github.com/Azure/azure-sdk-for-go v38.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
|
||||
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
|
||||
github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
|
||||
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
|
||||
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
|
||||
github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc=
|
||||
github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA=
|
||||
github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8=
|
||||
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
|
||||
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
|
||||
|
@ -29,6 +36,9 @@ github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp
|
|||
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
|
||||
github.com/Microsoft/go-winio v0.4.11 h1:zoIOcVf0xPN1tnMVbTtEdI+P8OofVk3NObnwOQ6nK2Q=
|
||||
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||
github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU=
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d h1:u64+IetywsPQ0gJ/4cXBJ/KiXV9xTKRMoaCOzW9PI3g=
|
||||
github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o=
|
||||
|
@ -41,8 +51,6 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
|
|||
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/Rican7/retry v0.1.0/go.mod h1:FgOROf8P5bebcC1DS0PdOQiqGUridaZvikzUmkFW6gg=
|
||||
github.com/Sirupsen/logrus v0.0.0-20170822132746-89742aefa4b2 h1:k1A7eIeUk6rnX2yuagwljW/pDezkK8oSpvPumT9zdZY=
|
||||
github.com/Sirupsen/logrus v0.0.0-20170822132746-89742aefa4b2/go.mod h1:rmk17hk6i8ZSAJkSDa7nOxamrG+SP4P0mm+DAvExv4U=
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
|
||||
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=
|
||||
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
|
||||
|
@ -64,6 +72,8 @@ github.com/aws/aws-sdk-go v1.15.78 h1:LaXy6lWR0YK7LKyuU0QWy2ws/LWTPfYV/UgfiBu4tv
|
|||
github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
|
||||
github.com/aws/aws-sdk-go v1.16.26 h1:GWkl3rkRO/JGRTWoLLIqwf7AWC4/W/1hMOUZqmX0js4=
|
||||
github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go v1.27.1 h1:MXnqY6SlWySaZAqNnXThOvjRFdiiOuKtC6i7baFdNdU=
|
||||
github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/bazelbuild/bazel-gazelle v0.18.2/go.mod h1:D0ehMSbS+vesFsLGiD6JXu3mVEzOlfUl8wNnq+x/9p0=
|
||||
github.com/bazelbuild/bazel-gazelle v0.19.1-0.20191105222053-70208cbdc798/go.mod h1:rPwzNHUqEzngx1iVBfO/2X2npKaT3tqPqqHW6rVsn/A=
|
||||
github.com/bazelbuild/buildtools v0.0.0-20190731111112-f720930ceb60/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
|
||||
|
@ -106,6 +116,8 @@ github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2
|
|||
github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
|
||||
github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
|
||||
github.com/containerd/containerd v1.0.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
|
||||
github.com/containerd/containerd v1.3.0 h1:xjvXQWABwS2uiv3TWgQt5Uth60Gu86LTGZXMJkjc7rY=
|
||||
github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
|
||||
github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
|
||||
github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
||||
github.com/coredns/corefile-migration v1.0.4/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E=
|
||||
|
@ -130,14 +142,18 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
|||
github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
|
||||
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017 h1:2HQmlpI3yI9deH18Q6xiSOIjXD4sLI55Y/gfpa8/558=
|
||||
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
|
||||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0 h1:w3NnFcKR5241cfmQU5ZZAsf0xcpId6mWOupTvJlUX2U=
|
||||
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v1.13.1 h1:IkZjBSIc8hBjLpqeAbeE5mca5mNgeatLHBy3GO78BWo=
|
||||
github.com/docker/docker v1.13.1/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7 h1:Cvj7S8I4Xpx78KAl6TwTmMHuHlZ/0SM60NUneGJQ7IE=
|
||||
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ=
|
||||
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
|
||||
github.com/docker/go-connections v0.3.0 h1:3lOnM9cSzgGwx8VfK/NGOW5fLQ0GjIlCkaktF+n1M6o=
|
||||
github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
||||
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk=
|
||||
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
|
||||
|
@ -291,8 +307,8 @@ github.com/google/cadvisor v0.35.0/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1
|
|||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-containerregistry v0.0.0-20180731221751-697ee0b3d46e h1:Hm0cmAopLRcMPePDVUo93UC2JGtNWPlZKo8OIzyPbhQ=
|
||||
github.com/google/go-containerregistry v0.0.0-20180731221751-697ee0b3d46e/go.mod h1:yZAFP63pRshzrEYLXLGPmUt0Ay+2zdjmMN1loCnRLUk=
|
||||
github.com/google/go-containerregistry v0.0.0-20200131185320-aec8da010de2 h1:/z0FoA29APs30PljxT6GoZQekF5c1cYhow2osFsj1XU=
|
||||
github.com/google/go-containerregistry v0.0.0-20200131185320-aec8da010de2/go.mod h1:Wtl/v6YdQxv397EREtzwgd9+Ud7Q5D8XMbi3Zazgkrs=
|
||||
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
|
||||
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
|
||||
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
|
||||
|
@ -313,6 +329,7 @@ github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+
|
|||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/googleapis/gnostic v0.3.0 h1:CcQijm0XKekKjP/YCz28LXVSpgguuB+nCxaSjCe09y0=
|
||||
github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
|
||||
|
@ -347,6 +364,8 @@ github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCO
|
|||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk=
|
||||
github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
|
@ -374,6 +393,7 @@ github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Ao
|
|||
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8=
|
||||
github.com/johanneswuerbach/nfsexports v0.0.0-20181204082207-1aa528dcb345 h1:XP1VL9iOZu4yz/rq8zj+yvB23XEY5erXRzp8JYmkWu0=
|
||||
github.com/johanneswuerbach/nfsexports v0.0.0-20181204082207-1aa528dcb345/go.mod h1:+c1/kUpg2zlkoWqTOvzDs36Wpbm3Gd1nlmtXAEB0WGU=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
|
@ -415,6 +435,8 @@ github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM52
|
|||
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
|
@ -467,6 +489,8 @@ github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vq
|
|||
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2 h1:g+4J5sZg6osfvEfkRZxJ1em0VT95/UOZgi/l7zi1/oE=
|
||||
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
|
||||
github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV59fDr4=
|
||||
github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY=
|
||||
github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
|
@ -498,6 +522,8 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb
|
|||
github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
|
||||
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE=
|
||||
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/mozilla/tls-observatory v0.0.0-20180409132520-8791a200eb40/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk=
|
||||
github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
|
@ -526,7 +552,9 @@ github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
|
|||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
||||
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
|
||||
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
||||
github.com/opencontainers/runc v1.0.0-rc9 h1:/k06BMULKF5hidyoZymkoDCzdJzltZpz/UU4LguQVtc=
|
||||
github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||
github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/opencontainers/selinux v1.3.1-0.20190929122143-5215b1806f52/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
|
||||
|
@ -581,9 +609,10 @@ github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/
|
|||
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
||||
github.com/samalba/dockerclient v0.0.0-20160414174713-91d7393ff859 h1:XRl74t6xHKI5EVIjDI5nPlHRq0bHED9/TjQuD8/UMkE=
|
||||
github.com/samalba/dockerclient v0.0.0-20160414174713-91d7393ff859/go.mod h1:yeYR4SlaRZJct6lwNRKR+qd0CocnxxWDE7Vh5dxsn/w=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/sayboras/dockerclient v0.0.0-20191231050035-015626177a97 h1:DWY4yZN6w+FSKMeqBBXaalT8zmCn4DVwBGopShnlwFE=
|
||||
github.com/sayboras/dockerclient v0.0.0-20191231050035-015626177a97/go.mod h1:mUmEoqt0b+uQg57s006FsvL4mybi+N5wINLDBGtaPTY=
|
||||
github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
|
||||
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
|
@ -596,6 +625,7 @@ github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOms
|
|||
github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
|
@ -656,6 +686,7 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC
|
|||
github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s=
|
||||
github.com/valyala/quicktemplate v1.1.1/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4=
|
||||
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
|
||||
github.com/vdemeester/k8s-pkg-credentialprovider v0.0.0-20200107171650-7c61ffa44238/go.mod h1:JwQJCMWpUDqjZrB5jpw0f5VbN7U95zxFy1ZDpoEarGo=
|
||||
github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw=
|
||||
github.com/vishvananda/netlink v1.0.0/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
|
||||
github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI=
|
||||
|
@ -701,6 +732,9 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0=
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g=
|
||||
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
@ -711,8 +745,11 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx
|
|||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20170915142106-8351a756f30f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -738,6 +775,7 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR
|
|||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI=
|
||||
|
@ -781,9 +819,12 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C17zUDepwGQBb/n+JVg=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 h1:/XfQ9z7ib8eEJX2hdgFTZJ/ntt0swNk5oYBziWeTCvY=
|
||||
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -824,9 +865,15 @@ golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgw
|
|||
golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
|
||||
golang.org/x/tools v0.0.0-20190909030654-5b82db07426d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200115165105-de0b1760071a h1:bEJ3JL2YUH3tt9KX9dsy0WUF3WOrhjtNjK93o0svepY=
|
||||
golang.org/x/tools v0.0.0-20200115165105-de0b1760071a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
|
||||
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
|
||||
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ=
|
||||
|
@ -856,6 +903,8 @@ google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8=
|
|||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk=
|
||||
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s=
|
||||
google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
|
||||
gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
|
||||
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
|
@ -899,6 +948,7 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
k8s.io/api v0.17.2 h1:NF1UFXcKN7/OOv1uxdRz3qfra8AHsPav5M93hlV9+Dc=
|
||||
k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4=
|
||||
k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs=
|
||||
|
@ -911,12 +961,14 @@ k8s.io/client-go v0.17.2/go.mod h1:QAzRgsa0C2xl4/eVpeVAZMvikCn8Nm81yqVx3Kk9XYI=
|
|||
k8s.io/cloud-provider v0.17.2/go.mod h1:9rEcGqEsUFHxC83oMUGBcsXTBpRVNVPX/U+nyQJTvHU=
|
||||
k8s.io/cluster-bootstrap v0.17.2 h1:KVjK1WviylwbBwC+3L51xKmGN3A+WmzW8rhtcfWdUqQ=
|
||||
k8s.io/cluster-bootstrap v0.17.2/go.mod h1:qiazpAM05fjAc+PEkrY8HSUhKlJSMBuLnVUSO6nvZL4=
|
||||
k8s.io/code-generator v0.17.2 h1:pTwl3rLB1fUyxmvEzmVPMM0tBSdUehd7z+bDzpj4lPE=
|
||||
k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s=
|
||||
k8s.io/component-base v0.17.2 h1:0XHf+cerTvL9I5Xwn9v+0jmqzGAZI7zNydv4tL6Cw6A=
|
||||
k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs=
|
||||
k8s.io/cri-api v0.17.2/go.mod h1:BzAkbBHHp81d+aXzbiIcUbilLkbXa40B8mUHOk6EX3s=
|
||||
k8s.io/csi-translation-lib v0.17.2/go.mod h1:NrhnhXJg/V6cHRTdPbmxvBuV3rJSqXsdLBE5JSRzcVI=
|
||||
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/gengo v0.0.0-20190822140433-26a664648505 h1:ZY6yclUKVbZ+SdWnkfY+Je5vrMpKOxmGeKRbsXVmqYM=
|
||||
k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
|
||||
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
|
|
|
@ -2,9 +2,9 @@ ARG COMMIT_SHA
|
|||
# using base image created by kind https://github.com/kubernetes-sigs/kind
|
||||
# which is an ubuntu 19.10 with an entry-point that helps running systemd
|
||||
# could be changed to any debian that can run systemd
|
||||
FROM kindest/base:v20200122-2dfe64b2
|
||||
FROM kindest/base:v20200122-2dfe64b2 as base
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
dnsutils \
|
||||
openssh-server \
|
||||
|
@ -34,12 +34,22 @@ USER root
|
|||
# https://github.com/kubernetes-sigs/kind/blob/master/images/base/files/usr/local/bin/entrypoint
|
||||
RUN mkdir -p /kind
|
||||
RUN rm -rf \
|
||||
/var/cache/debconf/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/log/* \
|
||||
/tmp/* \
|
||||
/var/tmp/* \
|
||||
/usr/share/doc/* \
|
||||
/usr/share/man/* \
|
||||
/usr/share/local/* \
|
||||
RUN echo "kic! Build: ${COMMIT_SHA} Time :$(date)" > "/kic.txt"
|
||||
/var/cache/debconf/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/log/* \
|
||||
/tmp/* \
|
||||
/var/tmp/* \
|
||||
/usr/share/doc/* \
|
||||
/usr/share/man/* \
|
||||
/usr/share/local/* \
|
||||
RUN echo "kic! Build: ${COMMIT_SHA} Time :$(date)" > "/kic.txt"
|
||||
|
||||
|
||||
FROM busybox
|
||||
ARG KUBERNETES_VERSION
|
||||
COPY out/preloaded-images-k8s-$KUBERNETES_VERSION.tar /preloaded-images.tar
|
||||
RUN tar xvf /preloaded-images.tar -C /
|
||||
|
||||
FROM base
|
||||
COPY --from=1 /var/lib/docker /var/lib/docker
|
||||
COPY --from=1 /var/lib/minikube/binaries /var/lib/minikube/binaries
|
||||
|
|
|
@ -27,8 +27,13 @@
|
|||
readonly TEST_ROOT="${HOME}/minikube-integration"
|
||||
readonly TEST_HOME="${TEST_ROOT}/${OS_ARCH}-${VM_DRIVER}-${MINIKUBE_LOCATION}-$$-${COMMIT}"
|
||||
export GOPATH="$HOME/go"
|
||||
export KUBECONFIG="${TEST_HOME}/kubeconfig"
|
||||
export PATH=$PATH:"/usr/local/bin/:/usr/local/go/bin/:$GOPATH/bin"
|
||||
|
||||
# installing golang so we could do go get for gopogh
|
||||
sudo ./installers/check_install_golang.sh "1.13.4" "/usr/local" || true
|
||||
|
||||
|
||||
echo ">> Starting at $(date)"
|
||||
echo ""
|
||||
echo "arch: ${OS_ARCH}"
|
||||
|
@ -42,6 +47,7 @@ echo "uptime: $(uptime)"
|
|||
# Setting KUBECONFIG prevents the version ceck from erroring out due to permission issues
|
||||
echo "kubectl: $(env KUBECONFIG=${TEST_HOME} kubectl version --client --short=true)"
|
||||
echo "docker: $(docker version --format '{{ .Client.Version }}')"
|
||||
echo "podman: $(sudo podman version --format '{{.Version}}' || true)"
|
||||
echo "go: $(go version || true)"
|
||||
|
||||
|
||||
|
@ -235,7 +241,6 @@ cleanup_stale_routes || true
|
|||
|
||||
mkdir -p "${TEST_HOME}"
|
||||
export MINIKUBE_HOME="${TEST_HOME}/.minikube"
|
||||
export KUBECONFIG="${TEST_HOME}/kubeconfig"
|
||||
|
||||
|
||||
# Build the gvisor image so that we can integration test changes to pkg/gvisor
|
||||
|
@ -303,7 +308,8 @@ min=$(($elapsed/60))
|
|||
sec=$(tail -c 3 <<< $((${elapsed}00/60)))
|
||||
elapsed=$min.$sec
|
||||
|
||||
JOB_GCS_BUCKET="minikube-builds/logs/${MINIKUBE_LOCATION}/${JOB_NAME}"
|
||||
SHORT_COMMIT=${COMMIT:0:7}
|
||||
JOB_GCS_BUCKET="minikube-builds/logs/${MINIKUBE_LOCATION}/${SHORT_COMMIT}/${JOB_NAME}"
|
||||
echo ">> Copying ${TEST_OUT} to gs://${JOB_GCS_BUCKET}out.txt"
|
||||
gsutil -qm cp "${TEST_OUT}" "gs://${JOB_GCS_BUCKET}out.txt"
|
||||
|
||||
|
@ -319,7 +325,7 @@ touch "${JSON_OUT}"
|
|||
echo ">> Running go test2json"
|
||||
go tool test2json -t < "${TEST_OUT}" > "${JSON_OUT}" || true
|
||||
echo ">> Installing gopogh"
|
||||
cd /tmp
|
||||
cd $(mktemp -d)
|
||||
GO111MODULE="on" go get -u github.com/medyagh/gopogh@v0.0.17 || true
|
||||
cd -
|
||||
echo ">> Running gopogh"
|
||||
|
@ -340,6 +346,7 @@ gsutil -qm cp "${JSON_OUT}" "gs://${JOB_GCS_BUCKET}.json" || true
|
|||
echo ">> uploading ${HTML_OUT}"
|
||||
gsutil -qm cp "${HTML_OUT}" "gs://${JOB_GCS_BUCKET}.html" || true
|
||||
|
||||
|
||||
public_log_url="https://storage.googleapis.com/${JOB_GCS_BUCKET}.txt"
|
||||
if grep -q html "$HTML_OUT"; then
|
||||
public_log_url="https://storage.googleapis.com/${JOB_GCS_BUCKET}.html"
|
||||
|
@ -347,7 +354,7 @@ fi
|
|||
|
||||
echo ">> Cleaning up after ourselves ..."
|
||||
${SUDO_PREFIX}${MINIKUBE_BIN} tunnel --cleanup || true
|
||||
${SUDO_PREFIX}${MINIKUBE_BIN} delete --all >/dev/null 2>/dev/null || true
|
||||
${SUDO_PREFIX}${MINIKUBE_BIN} delete --all --purge >/dev/null 2>/dev/null || true
|
||||
cleanup_stale_routes || true
|
||||
|
||||
${SUDO_PREFIX} rm -Rf "${MINIKUBE_HOME}" || true
|
||||
|
|
|
@ -32,4 +32,7 @@ JOB_NAME="Docker_Linux"
|
|||
mkdir -p cron && gsutil -qm rsync "gs://minikube-builds/${MINIKUBE_LOCATION}/cron" cron || echo "FAILED TO GET CRON FILES"
|
||||
sudo install cron/cleanup_and_reboot_Linux.sh /etc/cron.hourly/cleanup_and_reboot || echo "FAILED TO INSTALL CLEANUP"
|
||||
|
||||
# removing possible left over docker containers from previous runs
|
||||
docker rm -f -v $(docker ps -aq) >/dev/null 2>&1 || true
|
||||
|
||||
source ./common.sh
|
||||
|
|
|
@ -44,8 +44,8 @@ docker rm -f $(docker ps -aq) >/dev/null 2>&1 || true
|
|||
sudo rm -rf /data/*
|
||||
# Cleanup old Kubernetes configs
|
||||
sudo rm -rf /etc/kubernetes/*
|
||||
# Cleanup old minikube files
|
||||
sudo rm -rf /var/lib/minikube/*
|
||||
sudo rm -rf /var/lib/minikube/*
|
||||
|
||||
# Stop any leftover kubelets
|
||||
systemctl is-active --quiet kubelet \
|
||||
&& echo "stopping kubelet" \
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
# 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.
|
||||
|
||||
|
||||
# This script runs the integration tests on a Linux machine for the KVM Driver
|
||||
|
||||
# The script expects the following env variables:
|
||||
# MINIKUBE_LOCATION: GIT_COMMIT from upstream build.
|
||||
# COMMIT: Actual commit ID from upstream build
|
||||
# EXTRA_BUILD_ARGS (optional): Extra args to be passed into the minikube integrations tests
|
||||
# access_token: The Github API access token. Injected by the Jenkins credential provider.
|
||||
|
||||
set -e
|
||||
|
||||
OS_ARCH="linux-amd64"
|
||||
VM_DRIVER="podman"
|
||||
JOB_NAME="Podman_Linux"
|
||||
|
||||
mkdir -p cron && gsutil -qm rsync "gs://minikube-builds/${MINIKUBE_LOCATION}/cron" cron || echo "FAILED TO GET CRON FILES"
|
||||
sudo install cron/cleanup_and_reboot_Linux.sh /etc/cron.hourly/cleanup_and_reboot || echo "FAILED TO INSTALL CLEANUP"
|
||||
SUDO_PREFIX="sudo -E "
|
||||
|
||||
EXTRA_ARGS="--container-runtime=containerd"
|
||||
|
||||
# remove possible left over podman containers
|
||||
sudo podman rm -f -v $(sudo podman ps -aq) || true
|
||||
|
||||
source ./common.sh
|
|
@ -41,6 +41,7 @@ jobs=(
|
|||
'KVM_Linux'
|
||||
'none_Linux'
|
||||
'Docker_Linux'
|
||||
'Podman_Linux'
|
||||
)
|
||||
|
||||
# retry_github_status provides reliable github status updates
|
||||
|
@ -77,8 +78,9 @@ function retry_github_status() {
|
|||
done
|
||||
}
|
||||
|
||||
SHORT_COMMIT=${ghprbActualCommit:0:7}
|
||||
for j in ${jobs[@]}; do
|
||||
retry_github_status "${ghprbActualCommit}" "${j}" "pending" "${access_token}" \
|
||||
"https://storage.googleapis.com/minikube-builds/logs/${ghprbPullId}/${j}.pending"
|
||||
"https://storage.googleapis.com/minikube-builds/logs/${ghprbPullId}/${SHORT_COMMIT}/${j}.pending"
|
||||
done
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@ $env:result=$lastexitcode
|
|||
If($env:result -eq 0){$env:status="success"}
|
||||
Else {$env:status="failure"}
|
||||
|
||||
# $env:SHORT_COMMIT=$env:COMMIT.substring(0, 7)
|
||||
# to be used later to implement https://github.com/kubernetes/minikube/issues/6593
|
||||
$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/Hyper-V_Windows.txt"
|
||||
$json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"Hyper-V_Windows`"}"
|
||||
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
|
||||
|
|
|
@ -25,6 +25,8 @@ $env:result=$lastexitcode
|
|||
If($env:result -eq 0){$env:status="success"}
|
||||
Else {$env:status="failure"}
|
||||
|
||||
# $env:SHORT_COMMIT=$env:COMMIT.substring(0, 7)
|
||||
# to be used later
|
||||
$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/VirtualBox_Windows.txt"
|
||||
$json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"VirtualBox_Windows`"}"
|
||||
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
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
Copyright 2020 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.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
profile = "generate-preloaded-images-tar"
|
||||
minikubePath = "out/minikube"
|
||||
)
|
||||
|
||||
var (
|
||||
kubernetesVersion = ""
|
||||
tarballFilename = ""
|
||||
)
|
||||
|
||||
func init() {
|
||||
flag.StringVar(&kubernetesVersion, "kubernetes-version", "", "desired kubernetes version, for example `v1.17.2`")
|
||||
flag.Parse()
|
||||
tarballFilename = fmt.Sprintf("preloaded-images-k8s-%s.tar", kubernetesVersion)
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := executePreloadImages(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func executePreloadImages() error {
|
||||
defer func() {
|
||||
if err := deleteMinikube(); err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}()
|
||||
if err := startMinikube(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := createImageTarball(); err != nil {
|
||||
return err
|
||||
}
|
||||
return copyTarballToHost()
|
||||
}
|
||||
|
||||
func startMinikube() error {
|
||||
cmd := exec.Command(minikubePath, "start", "-p", profile, "--memory", "4000", "--kubernetes-version", kubernetesVersion, "--wait=false")
|
||||
cmd.Stdout = os.Stdout
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
func createImageTarball() error {
|
||||
cmd := exec.Command(minikubePath, "ssh", "-p", profile, "--", "sudo", "tar", "cvf", tarballFilename, "/var/lib/docker", "/var/lib/minikube/binaries")
|
||||
cmd.Stdout = os.Stdout
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
func copyTarballToHost() error {
|
||||
sshKey, err := runCmd([]string{minikubePath, "ssh-key", "-p", profile})
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "getting ssh-key")
|
||||
}
|
||||
|
||||
ip, err := runCmd([]string{minikubePath, "ip", "-p", profile})
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "getting ip")
|
||||
}
|
||||
|
||||
dest := filepath.Join("out/", tarballFilename)
|
||||
args := []string{"scp", "-o", "StrictHostKeyChecking=no", "-i", sshKey, fmt.Sprintf("docker@%s:/home/docker/%s", ip, tarballFilename), dest}
|
||||
_, err = runCmd(args)
|
||||
return err
|
||||
}
|
||||
|
||||
func deleteMinikube() error {
|
||||
cmd := exec.Command(minikubePath, "delete", "-p", profile)
|
||||
cmd.Stdout = os.Stdout
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
func runCmd(command []string) (string, error) {
|
||||
cmd := exec.Command(command[0], command[1:]...)
|
||||
output, err := cmd.Output()
|
||||
return strings.Trim(string(output), "\n "), err
|
||||
}
|
|
@ -17,11 +17,13 @@ limitations under the License.
|
|||
package addons
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"path"
|
||||
|
||||
"k8s.io/minikube/pkg/minikube/config"
|
||||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
"k8s.io/minikube/pkg/minikube/vmpath"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -41,7 +43,7 @@ func kubectlCommand(profile string, files []string, enable bool) (*exec.Cmd, err
|
|||
kubectlAction = "delete"
|
||||
}
|
||||
|
||||
args := []string{"KUBECONFIG=/var/lib/minikube/kubeconfig", kubectlBinary, kubectlAction}
|
||||
args := []string{fmt.Sprintf("KUBECONFIG=%s", path.Join(vmpath.GuestPersistentDir, "kubeconfig")), kubectlBinary, kubectlAction}
|
||||
for _, f := range files {
|
||||
args = append(args, []string{"-f", f}...)
|
||||
}
|
||||
|
@ -63,5 +65,5 @@ func kubernetesVersion(profile string) (string, error) {
|
|||
}
|
||||
|
||||
func kubectlBinaryPath(version string) string {
|
||||
return path.Join("/var/lib/minikube/binaries", version, "kubectl")
|
||||
return path.Join(vmpath.GuestPersistentDir, "binaries", version, "kubectl")
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import (
|
|||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
)
|
||||
|
||||
// Driver represents a kic driver https://minikube.sigs.k8s.io/docs/reference/drivers/kic/
|
||||
// Driver represents a kic driver https://minikube.sigs.k8s.io/docs/reference/drivers/docker
|
||||
type Driver struct {
|
||||
*drivers.BaseDriver
|
||||
*pkgdrivers.CommonDriver
|
||||
|
@ -76,15 +76,15 @@ func (d *Driver) Create() error {
|
|||
|
||||
// control plane specific options
|
||||
params.PortMappings = append(params.PortMappings, oci.PortMapping{
|
||||
ListenAddress: DefaultBindIPV4,
|
||||
ListenAddress: oci.DefaultBindIPV4,
|
||||
ContainerPort: constants.APIServerPort,
|
||||
},
|
||||
oci.PortMapping{
|
||||
ListenAddress: DefaultBindIPV4,
|
||||
ListenAddress: oci.DefaultBindIPV4,
|
||||
ContainerPort: constants.SSHPort,
|
||||
},
|
||||
oci.PortMapping{
|
||||
ListenAddress: DefaultBindIPV4,
|
||||
ListenAddress: oci.DefaultBindIPV4,
|
||||
ContainerPort: constants.DockerDaemonPort,
|
||||
},
|
||||
)
|
||||
|
@ -138,12 +138,12 @@ func (d *Driver) GetIP() (string, error) {
|
|||
|
||||
// GetExternalIP returns an IP which is accissble from outside
|
||||
func (d *Driver) GetExternalIP() (string, error) {
|
||||
return DefaultBindIPV4, nil
|
||||
return oci.DefaultBindIPV4, nil
|
||||
}
|
||||
|
||||
// GetSSHHostname returns hostname for use with ssh
|
||||
func (d *Driver) GetSSHHostname() (string, error) {
|
||||
return DefaultBindIPV4, nil
|
||||
return oci.DefaultBindIPV4, nil
|
||||
}
|
||||
|
||||
// GetSSHPort returns port for use with ssh
|
||||
|
@ -186,7 +186,7 @@ func (d *Driver) GetState() (state.State, error) {
|
|||
|
||||
cmd := exec.Command(d.NodeConfig.OCIBinary, "inspect", "-f", "{{.State.Status}}", d.MachineName)
|
||||
out, err := cmd.CombinedOutput()
|
||||
o := strings.Trim(string(out), "\n")
|
||||
o := strings.TrimSpace(string(out))
|
||||
if err != nil {
|
||||
return state.Error, errors.Wrapf(err, "get container %s status", d.MachineName)
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ func (d *Driver) Remove() error {
|
|||
}
|
||||
cmd := exec.Command(d.NodeConfig.OCIBinary, "rm", "-f", "-v", d.MachineName)
|
||||
o, err := cmd.CombinedOutput()
|
||||
out := strings.Trim(string(o), "\n")
|
||||
out := strings.TrimSpace(string(o))
|
||||
if err != nil {
|
||||
if strings.Contains(out, "is already in progress") {
|
||||
log.Warnf("Docker engine is stuck. please restart docker daemon on your computer.", d.MachineName)
|
||||
|
|
|
@ -18,6 +18,7 @@ package oci
|
|||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"bufio"
|
||||
|
@ -26,6 +27,7 @@ import (
|
|||
"github.com/golang/glog"
|
||||
"github.com/pkg/errors"
|
||||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
"k8s.io/minikube/pkg/minikube/localpath"
|
||||
|
||||
"fmt"
|
||||
"os/exec"
|
||||
|
@ -39,8 +41,6 @@ func CreateContainerNode(p CreateParams) error {
|
|||
}
|
||||
|
||||
runArgs := []string{
|
||||
fmt.Sprintf("--cpus=%s", p.CPUs),
|
||||
fmt.Sprintf("--memory=%s", p.Memory),
|
||||
"-d", // run the container detached
|
||||
"-t", // allocate a tty for entrypoint logs
|
||||
// running containers in a container requires privileged
|
||||
|
@ -53,7 +53,6 @@ func CreateContainerNode(p CreateParams) error {
|
|||
"--tmpfs", "/tmp", // various things depend on working /tmp
|
||||
"--tmpfs", "/run", // systemd wants a writable /run
|
||||
// logs,pods be stroed on filesystem vs inside container,
|
||||
"--volume", "/var",
|
||||
// some k8s things want /lib/modules
|
||||
"-v", "/lib/modules:/lib/modules:ro",
|
||||
"--hostname", p.Name, // make hostname match container name
|
||||
|
@ -64,6 +63,23 @@ func CreateContainerNode(p CreateParams) error {
|
|||
"--label", fmt.Sprintf("%s=%s", nodeRoleKey, p.Role),
|
||||
}
|
||||
|
||||
// volume path in minikube home folder to mount to /var
|
||||
hostVarVolPath := filepath.Join(localpath.MiniPath(), "machines", p.Name, "var")
|
||||
if err := os.MkdirAll(hostVarVolPath, 0711); err != nil {
|
||||
return errors.Wrapf(err, "create var dir %s", hostVarVolPath)
|
||||
}
|
||||
|
||||
if p.OCIBinary == Podman { // enable execing in /var
|
||||
// podman mounts var/lib with no-exec by default https://github.com/containers/libpod/issues/5103
|
||||
runArgs = append(runArgs, "--volume", fmt.Sprintf("%s:/var:exec", hostVarVolPath))
|
||||
}
|
||||
if p.OCIBinary == Docker {
|
||||
runArgs = append(runArgs, "--volume", "/var")
|
||||
// setting resource limit in privileged mode is only supported by docker
|
||||
// podman error: "Error: invalid configuration, cannot set resources with rootless containers not using cgroups v2 unified mode"
|
||||
runArgs = append(runArgs, fmt.Sprintf("--cpus=%s", p.CPUs), fmt.Sprintf("--memory=%s", p.Memory))
|
||||
}
|
||||
|
||||
for key, val := range p.Envs {
|
||||
runArgs = append(runArgs, "-e", fmt.Sprintf("%s=%s", key, val))
|
||||
}
|
||||
|
@ -113,6 +129,10 @@ func createContainer(ociBinary string, image string, opts ...createOpt) ([]strin
|
|||
}
|
||||
// construct the actual docker run argv
|
||||
args := []string{"run"}
|
||||
// to run nested container from privileged container in podman https://bugzilla.redhat.com/show_bug.cgi?id=1687713
|
||||
if ociBinary == Podman {
|
||||
args = append(args, "--cgroup-manager", "cgroupfs")
|
||||
}
|
||||
args = append(args, runArgs...)
|
||||
args = append(args, image)
|
||||
args = append(args, o.ContainerArgs...)
|
||||
|
@ -159,12 +179,24 @@ func HostPortBinding(ociBinary string, ociID string, contPort int) (int, error)
|
|||
if err := PointToHostDockerDaemon(); err != nil {
|
||||
return 0, errors.Wrap(err, "point host docker-daemon")
|
||||
}
|
||||
cmd := exec.Command(ociBinary, "inspect", "-f", fmt.Sprintf("'{{(index (index .NetworkSettings.Ports \"%d/tcp\") 0).HostPort}}'", contPort), ociID)
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return 0, errors.Wrapf(err, "getting host-bind port %d for container ID %q, output %s", contPort, ociID, out)
|
||||
var out []byte
|
||||
var err error
|
||||
if ociBinary == Podman {
|
||||
//podman inspect -f "{{range .NetworkSettings.Ports}}{{if eq .ContainerPort "80"}}{{.HostPort}}{{end}}{{end}}"
|
||||
cmd := exec.Command(ociBinary, "inspect", "-f", fmt.Sprintf("{{range .NetworkSettings.Ports}}{{if eq .ContainerPort %s}}{{.HostPort}}{{end}}{{end}}", fmt.Sprint(contPort)), ociID)
|
||||
out, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return 0, errors.Wrapf(err, "get host-bind port %d for %q, output %s", contPort, ociID, out)
|
||||
}
|
||||
} else {
|
||||
cmd := exec.Command(ociBinary, "inspect", "-f", fmt.Sprintf("'{{(index (index .NetworkSettings.Ports \"%d/tcp\") 0).HostPort}}'", contPort), ociID)
|
||||
out, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return 0, errors.Wrapf(err, "get host-bind port %d for %q, output %s", contPort, ociID, out)
|
||||
}
|
||||
}
|
||||
o := strings.Trim(string(out), "\n")
|
||||
|
||||
o := strings.TrimSpace(string(out))
|
||||
o = strings.Trim(o, "'")
|
||||
p, err := strconv.Atoi(o)
|
||||
if err != nil {
|
||||
|
@ -175,11 +207,35 @@ func HostPortBinding(ociBinary string, ociID string, contPort int) (int, error)
|
|||
|
||||
// ContainerIPs returns ipv4,ipv6, error of a container by their name
|
||||
func ContainerIPs(ociBinary string, name string) (string, string, error) {
|
||||
if ociBinary == Podman {
|
||||
return podmanConttainerIP(name)
|
||||
}
|
||||
return dockerContainerIP(name)
|
||||
}
|
||||
|
||||
// podmanConttainerIP returns ipv4, ipv6 of container or error
|
||||
func podmanConttainerIP(name string) (string, string, error) {
|
||||
cmd := exec.Command(Podman, "inspect",
|
||||
"-f", "{{.NetworkSettings.IPAddress}}",
|
||||
name)
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return "", "", errors.Wrapf(err, "podman inspect ip %s", name)
|
||||
}
|
||||
output := strings.TrimSpace(string(out))
|
||||
if err == nil && output == "" { // podman returns empty for 127.0.0.1
|
||||
return DefaultBindIPV4, "", nil
|
||||
}
|
||||
return output, "", nil
|
||||
}
|
||||
|
||||
// dockerContainerIP returns ipv4, ipv6 of container or error
|
||||
func dockerContainerIP(name string) (string, string, error) {
|
||||
if err := PointToHostDockerDaemon(); err != nil {
|
||||
return "", "", errors.Wrap(err, "point host docker-daemon")
|
||||
}
|
||||
// retrieve the IP address of the node using docker inspect
|
||||
lines, err := inspect(ociBinary, name, "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}")
|
||||
lines, err := inspect(Docker, name, "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}")
|
||||
if err != nil {
|
||||
return "", "", errors.Wrap(err, "inspecting NetworkSettings.Networks")
|
||||
}
|
||||
|
@ -191,7 +247,6 @@ func ContainerIPs(ociBinary string, name string) (string, string, error) {
|
|||
return "", "", errors.Errorf("container addresses should have 2 values, got %d values: %+v", len(ips), ips)
|
||||
}
|
||||
return ips[0], ips[1], nil
|
||||
|
||||
}
|
||||
|
||||
// ContainerID returns id of a container name
|
||||
|
|
|
@ -17,8 +17,10 @@ limitations under the License.
|
|||
package oci
|
||||
|
||||
const (
|
||||
Docker = "docker"
|
||||
Podman = "podman"
|
||||
// DefaultBindIPV4 is The default IP the container will listen on.
|
||||
DefaultBindIPV4 = "127.0.0.1"
|
||||
Docker = "docker"
|
||||
Podman = "podman"
|
||||
// ClusterLabelKey is applied to each node docker container for identification
|
||||
ClusterLabelKey = "io.x-k8s.kic.cluster"
|
||||
// NodeRoleKey is used to identify if it is control plane or worker
|
||||
|
|
|
@ -23,8 +23,7 @@ const (
|
|||
DefaultNetwork = "bridge"
|
||||
// DefaultPodCIDR is The CIDR to be used for pods inside the node.
|
||||
DefaultPodCIDR = "10.244.0.0/16"
|
||||
// DefaultBindIPV4 is The default IP the container will bind to.
|
||||
DefaultBindIPV4 = "127.0.0.1"
|
||||
|
||||
// BaseImage is the base image is used to spin up kic containers. it uses same base-image as kind.
|
||||
BaseImage = "gcr.io/k8s-minikube/kicbase:v0.0.5@sha256:3ddd8461dfb5c3e452ccc44d87750b87a574ec23fc425da67dccc1f0c57d428a"
|
||||
// OverlayImage is the cni plugin used for overlay image, created by kind.
|
||||
|
|
|
@ -34,7 +34,7 @@ networking:
|
|||
serviceSubnet: {{.ServiceCIDR}}
|
||||
etcd:
|
||||
dataDir: {{.EtcdDataDir}}
|
||||
nodeName: {{.NodeName}}
|
||||
nodeName: "{{.NodeName}}"
|
||||
apiServerCertSANs: ["127.0.0.1", "localhost", "{{.AdvertiseAddress}}"]
|
||||
{{if .ImageRepository}}imageRepository: {{.ImageRepository}}
|
||||
{{end}}{{if .CRISocket}}criSocket: {{.CRISocket}}
|
||||
|
|
|
@ -35,7 +35,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: {{if .CRISocket}}{{.CRISocket}}{{else}}/var/run/dockershim.sock{{end}}
|
||||
name: {{.NodeName}}
|
||||
name: "{{.NodeName}}"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -35,7 +35,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: {{if .CRISocket}}{{.CRISocket}}{{else}}/var/run/dockershim.sock{{end}}
|
||||
name: {{.NodeName}}
|
||||
name: "{{.NodeName}}"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -35,7 +35,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: {{if .CRISocket}}{{.CRISocket}}{{else}}/var/run/dockershim.sock{{end}}
|
||||
name: {{.NodeName}}
|
||||
name: "{{.NodeName}}"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -11,7 +11,7 @@ networking:
|
|||
serviceSubnet: 10.96.0.0/12
|
||||
etcd:
|
||||
dataDir: /var/lib/minikube/etcd
|
||||
nodeName: mk
|
||||
nodeName: "mk"
|
||||
apiServerCertSANs: ["127.0.0.1", "localhost", "1.1.1.1"]
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
apiServerExtraArgs:
|
||||
|
|
|
@ -11,7 +11,7 @@ networking:
|
|||
serviceSubnet: 10.96.0.0/12
|
||||
etcd:
|
||||
dataDir: /var/lib/minikube/etcd
|
||||
nodeName: mk
|
||||
nodeName: "mk"
|
||||
apiServerCertSANs: ["127.0.0.1", "localhost", "1.1.1.1"]
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
apiServerExtraArgs:
|
||||
|
|
|
@ -11,7 +11,7 @@ networking:
|
|||
serviceSubnet: 10.96.0.0/12
|
||||
etcd:
|
||||
dataDir: /var/lib/minikube/etcd
|
||||
nodeName: mk
|
||||
nodeName: "mk"
|
||||
apiServerCertSANs: ["127.0.0.1", "localhost", "1.1.1.1"]
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
apiServerExtraArgs:
|
||||
|
|
|
@ -11,7 +11,7 @@ networking:
|
|||
serviceSubnet: 10.96.0.0/12
|
||||
etcd:
|
||||
dataDir: /var/lib/minikube/etcd
|
||||
nodeName: mk
|
||||
nodeName: "mk"
|
||||
apiServerCertSANs: ["127.0.0.1", "localhost", "1.1.1.1"]
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
apiServerExtraArgs:
|
||||
|
|
|
@ -11,7 +11,7 @@ networking:
|
|||
serviceSubnet: 10.96.0.0/12
|
||||
etcd:
|
||||
dataDir: /var/lib/minikube/etcd
|
||||
nodeName: mk
|
||||
nodeName: "mk"
|
||||
apiServerCertSANs: ["127.0.0.1", "localhost", "1.1.1.1"]
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
apiServerExtraArgs:
|
||||
|
|
|
@ -11,7 +11,7 @@ networking:
|
|||
serviceSubnet: 10.96.0.0/12
|
||||
etcd:
|
||||
dataDir: /var/lib/minikube/etcd
|
||||
nodeName: mk
|
||||
nodeName: "mk"
|
||||
apiServerCertSANs: ["127.0.0.1", "localhost", "1.1.1.1"]
|
||||
apiServerExtraArgs:
|
||||
enable-admission-plugins: "Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota"
|
||||
|
|
|
@ -11,7 +11,7 @@ networking:
|
|||
serviceSubnet: 10.96.0.0/12
|
||||
etcd:
|
||||
dataDir: /var/lib/minikube/etcd
|
||||
nodeName: mk
|
||||
nodeName: "mk"
|
||||
apiServerCertSANs: ["127.0.0.1", "localhost", "1.1.1.1"]
|
||||
imageRepository: test/repo
|
||||
apiServerExtraArgs:
|
||||
|
|
|
@ -11,7 +11,7 @@ networking:
|
|||
serviceSubnet: 10.96.0.0/12
|
||||
etcd:
|
||||
dataDir: /var/lib/minikube/etcd
|
||||
nodeName: mk
|
||||
nodeName: "mk"
|
||||
apiServerCertSANs: ["127.0.0.1", "localhost", "1.1.1.1"]
|
||||
apiServerExtraArgs:
|
||||
enable-admission-plugins: "Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota"
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1alpha3
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /var/run/dockershim.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
|
@ -12,7 +12,7 @@ bootstrapTokens:
|
|||
- authentication
|
||||
nodeRegistration:
|
||||
criSocket: /run/containerd/containerd.sock
|
||||
name: mk
|
||||
name: "mk"
|
||||
taints: []
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue