...
 
Commits (8)
......@@ -17,6 +17,10 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: '1.13.9'
stable: true
- name: Download Dependencies
run: go mod download
- name: Build Binaries
......@@ -40,6 +44,10 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: '1.13.9'
stable: true
- name: Install libvirt
run: |
sudo apt-get update
......@@ -55,6 +63,10 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: '1.13.9'
stable: true
- name: Install libvirt
run: |
sudo apt-get update
......
......@@ -15,6 +15,10 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: '1.13.9'
stable: true
- name: Download Dependencies
run: go mod download
- name: Build Binaries
......@@ -38,6 +42,10 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: '1.13.9'
stable: true
- name: Install libvirt
run: |
sudo apt-get update
......@@ -53,6 +61,10 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: '1.13.9'
stable: true
- name: Install libvirt
run: |
sudo apt-get update
......
......@@ -3,7 +3,7 @@
os: linux
language: go
go:
- 1.13.8
- 1.13.9
env:
global:
- GOPROXY=https://proxy.golang.org
......@@ -11,7 +11,7 @@ matrix:
include:
- language: go
name: Code Lint
go: 1.13.8
go: 1.13.9
env:
- TESTSUITE=lintall
before_install:
......@@ -20,7 +20,7 @@ matrix:
- language: go
name: Unit Test
go: 1.13.8
go: 1.13.9
env:
- TESTSUITE=unittest
before_install:
......@@ -29,7 +29,7 @@ matrix:
- language: go
name: Build
go: 1.13.8
go: 1.13.9
script: make
after_success:
- bash <(curl -s https://codecov.io/bash)
......
......@@ -29,7 +29,7 @@ DEB_VERSION ?= $(subst -,~,$(RAW_VERSION))
RPM_VERSION ?= $(DEB_VERSION)
# used by hack/jenkins/release_build_and_upload.sh and KVM_BUILD_IMAGE, see also BUILD_IMAGE below
GO_VERSION ?= 1.13.8
GO_VERSION ?= 1.13.9
INSTALL_SIZE ?= $(shell du out/minikube-windows-amd64.exe | cut -f1)
BUILDROOT_BRANCH ?= 2020.02.2
......@@ -40,8 +40,9 @@ COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true)
COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}")
HYPERKIT_BUILD_IMAGE ?= karalabe/xgo-1.12.x
# NOTE: "latest" as of 2020-02-26. kube-cross images aren't updated as often as Kubernetes
BUILD_IMAGE ?= us.gcr.io/k8s-artifacts-prod/build-image/kube-cross:v$(GO_VERSION)-1
# NOTE: "latest" as of 2020-05-13. kube-cross images aren't updated as often as Kubernetes
# https://github.com/kubernetes/kubernetes/blob/release-1.18/build/build-image/cross/VERSION
BUILD_IMAGE ?= us.gcr.io/k8s-artifacts-prod/build-image/kube-cross:v$(GO_VERSION)-5
ISO_BUILD_IMAGE ?= $(REGISTRY)/buildroot-image
KVM_BUILD_IMAGE ?= $(REGISTRY)/kvm-build-image:$(GO_VERSION)
......
......@@ -46,6 +46,7 @@ import (
"k8s.io/minikube/pkg/minikube/bootstrapper/images"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/cruntime"
"k8s.io/minikube/pkg/minikube/download"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/exit"
......@@ -854,6 +855,30 @@ func validateFlags(cmd *cobra.Command, drvName string) {
}
}
if cmd.Flags().Changed(containerRuntime) {
runtime := strings.ToLower(viper.GetString(containerRuntime))
validOptions := cruntime.ValidRuntimes()
// `crio` is accepted as an alternative spelling to `cri-o`
validOptions = append(validOptions, constants.CRIO)
var validRuntime bool
for _, option := range validOptions {
if runtime == option {
validRuntime = true
}
// Convert `cri-o` to `crio` as the K8s config uses the `crio` spelling
if runtime == "cri-o" {
viper.Set(containerRuntime, constants.CRIO)
}
}
if !validRuntime {
exit.UsageT(`Invalid Container Runtime: "{{.runtime}}". Valid runtimes are: {{.validOptions}}`, out.V{"runtime": runtime, "validOptions": strings.Join(cruntime.ValidRuntimes(), ", ")})
}
}
if driver.BareMetal(drvName) {
if ClusterFlagValue() != constants.DefaultClusterName {
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})
......
......@@ -127,7 +127,7 @@ func initMinikubeFlags() {
startCmd.Flags().String(kicBaseImage, kic.BaseImage, "The base image to use for docker/podman drivers. Intended for local development.")
startCmd.Flags().Bool(keepContext, false, "This will keep the existing kubectl context and will create a minikube context.")
startCmd.Flags().Bool(embedCerts, false, "if true, will embed the certs in kubeconfig.")
startCmd.Flags().String(containerRuntime, "docker", "The container runtime to be used (docker, crio, containerd).")
startCmd.Flags().String(containerRuntime, "docker", fmt.Sprintf("The container runtime to be used (%s).", strings.Join(cruntime.ValidRuntimes(), ", ")))
startCmd.Flags().Bool(createMount, false, "This will start the mount daemon and automatically mount files into minikube.")
startCmd.Flags().String(mountString, constants.DefaultMountDir+":/minikube-host", "The argument to pass the minikube mount command on start.")
startCmd.Flags().StringArrayVar(&config.AddonList, "addons", nil, "Enable addons. see `minikube addons list` for a list of valid addon names.")
......
......@@ -31,7 +31,7 @@ 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.8" "/usr/local" || true
sudo ./installers/check_install_golang.sh "1.13.9" "/usr/local" || true
docker rm -f -v $(docker ps -aq) >/dev/null 2>&1 || true
docker volume prune -f || true
......
......@@ -284,7 +284,7 @@ func (k *Bootstrapper) applyCNI(cfg config.ClusterConfig) error {
return errors.Wrap(err, "cni apply")
}
if cfg.KubernetesConfig.ContainerRuntime == "crio" {
if cfg.KubernetesConfig.ContainerRuntime == constants.CRIO {
if err := cruntime.UpdateCRIONet(k.c, cnm.CIDR()); err != nil {
return errors.Wrap(err, "update crio")
}
......
......@@ -42,6 +42,8 @@ const (
SSHPort = 22
// RegistryAddonPort os the default registry addon port
RegistryAddonPort = 5000
// CRIO is the default name and spelling for the cri-o container runtime
CRIO = "crio"
// APIServerName is the default API server name
APIServerName = "minikubeCA"
......
......@@ -47,6 +47,11 @@ func (cs ContainerState) String() string {
return [...]string{"all", "running", "paused"}[cs]
}
// ValidRuntimes lists the supported container runtimes
func ValidRuntimes() []string {
return []string{"docker", "cri-o", "containerd"}
}
// CommandRunner is the subset of command.Runner this package consumes
type CommandRunner interface {
RunCmd(cmd *exec.Cmd) (*command.RunResult, error)
......
......@@ -30,7 +30,7 @@ minikube start [flags]
--base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:[email protected]:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438")
--cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true)
--cni string CNI plug-in to use. Valid options: auto, bridge, flannel, kindnet, or path to a CNI manifest (default: auto)
--container-runtime string The container runtime to be used (docker, crio, containerd). (default "docker")
--container-runtime string The container runtime to be used (docker, cri-o, containerd). (default "docker")
--cpus int Number of CPUs allocated to Kubernetes. (default 2)
--cri-socket string The cri socket path to be used.
--delete-on-failure If set, delete the current cluster if start fails and try again. Defaults to false.
......