Commit 2785d292 authored by Sharif Elgamal's avatar Sharif Elgamal

Merge branch 'master' of github.com:kubernetes/minikube into node-pkg

parents 8c55c9ca 4c6b435f
......@@ -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/[email protected]
......@@ -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/[email protected]
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/[email protected]
......@@ -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/[email protected]
with:
name: docker_on_ubuntu_18_04_report
path: report
docker_macos:
env:
ELAPSED: time
runs-on: macos-latest
steps:
- uses: actions/[email protected]
......@@ -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/[email protected]
with:
name: docker_on_macos_report
path: ./report
none_ubuntu16_04:
env:
ELAPSED: time
runs-on: ubuntu-16.04
steps:
- uses: actions/[email protected]
......@@ -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/[email protected]
with:
name: none_on_ubuntu_16_04
path: report
none_ubuntu_18_04:
env:
ELAPSED: time
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
......@@ -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/[email protected]
with:
name: none_on_ubuntu_latest_report
path: report
podman_ubuntu_18_04:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- 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/[email protected] || 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/[email protected]
with:
name: podman_on_ubuntu_latest_report
path: report
......@@ -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,9 +508,18 @@ 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
......
......@@ -29,10 +29,8 @@ import (
"github.com/docker/machine/libmachine/drivers"
"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/config"
"k8s.io/minikube/pkg/minikube/constants"
......@@ -182,11 +180,22 @@ var dockerEnvCmd = &cobra.Command{
sh := shell.EnvConfig{
Shell: shell.ForceShell,
}
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,
}
......@@ -217,16 +226,14 @@ type DockerEnvConfig struct {
profile string
driver string
hostIP string
port int
certsDir string
noProxy bool
}
// dockerSetScript writes out a shell-compatible 'docker-env' script
func dockerSetScript(ec DockerEnvConfig, w io.Writer) error {
envVars, err := dockerEnvVars(ec)
if err != nil {
return err
}
envVars := dockerEnvVars(ec)
return shell.SetScript(ec.EnvConfig, w, dockerEnvTmpl, dockerShellCfgSet(ec, envVars))
}
......@@ -255,22 +262,15 @@ 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 DockerEnvConfig) (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() {
......
......@@ -42,7 +42,22 @@ func TestGenerateDockerScripts(t *testing.T) {
}{
{
"bash",
DockerEnvConfig{profile: "bash", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs"},
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"
......@@ -57,7 +72,7 @@ export MINIKUBE_ACTIVE_DOCKERD="bash"
},
{
"bash",
DockerEnvConfig{profile: "ipv6", driver: "kvm2", hostIP: "fe80::215:5dff:fe00:a903", certsDir: "/certs"},
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"
......@@ -72,7 +87,7 @@ export MINIKUBE_ACTIVE_DOCKERD="ipv6"
},
{
"fish",
DockerEnvConfig{profile: "fish", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs"},
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"
......@@ -90,7 +105,7 @@ set -e MINIKUBE_ACTIVE_DOCKERD
},
{
"powershell",
DockerEnvConfig{profile: "powershell", driver: "hyperv", hostIP: "192.168.0.1", certsDir: "/certs"},
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"
......@@ -105,7 +120,7 @@ $Env:MINIKUBE_ACTIVE_DOCKERD = "powershell"
},
{
"cmd",
DockerEnvConfig{profile: "cmd", driver: "hyperv", hostIP: "192.168.0.1", certsDir: "/certs"},
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
......@@ -123,7 +138,7 @@ SET MINIKUBE_ACTIVE_DOCKERD=
},
{
"emacs",
DockerEnvConfig{profile: "emacs", driver: "hyperv", hostIP: "192.168.0.1", certsDir: "/certs"},
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")
......@@ -140,7 +155,7 @@ SET MINIKUBE_ACTIVE_DOCKERD=
},
{
"bash",
DockerEnvConfig{profile: "bash-no-proxy", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs", noProxy: true},
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"
......@@ -157,7 +172,7 @@ export NO_PROXY="127.0.0.1"
},
{
"bash",
DockerEnvConfig{profile: "bash-no-proxy-lower", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs", noProxy: true},
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"
......@@ -174,7 +189,7 @@ export no_proxy="127.0.0.1"
},
{
"powershell",
DockerEnvConfig{profile: "powershell-no-proxy-idempotent", driver: "hyperv", hostIP: "192.168.0.1", certsDir: "/certs", noProxy: true},
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"
......@@ -190,7 +205,7 @@ $Env:no_proxy = "192.168.0.1"
},
{
"bash",
DockerEnvConfig{profile: "sh-no-proxy-add", driver: "kvm2", hostIP: "127.0.0.1", certsDir: "/certs", noProxy: true},
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"
......
......@@ -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)
}
......@@ -597,11 +597,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
}
......@@ -665,16 +665,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)
......
......@@ -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
......
This diff is collapsed.
......@@ -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
......@@ -319,7 +324,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/[email protected] || true
cd -
echo ">> Running gopogh"
......@@ -347,7 +352,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" \
......
#!/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.