Merge branch 'master' of https://github.com/kubernetes/minikube into schedule-stop-unix

pull/9503/head
Priya Wadhwa 2020-10-23 18:15:07 -07:00
commit 865d3a4a34
37 changed files with 595 additions and 172 deletions

View File

@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Download Dependencies
run: go mod download
@ -71,7 +71,7 @@ jobs:
make checksum
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install kubectl
shell: bash

View File

@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Download Dependencies
run: go mod download

View File

@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Download Dependencies
run: go mod download
@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install libvirt
run: |
@ -67,7 +67,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install libvirt
run: |
@ -114,7 +114,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -197,7 +197,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -340,7 +340,7 @@ jobs:
echo "------------------------"
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install tools
continue-on-error: true
@ -476,7 +476,7 @@ jobs:
Get-WmiObject -class Win32_ComputerSystem
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install tools
continue-on-error: true
@ -582,7 +582,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -677,7 +677,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -757,7 +757,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -867,7 +867,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -949,7 +949,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -1053,7 +1053,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -1133,7 +1133,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh

View File

@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Download Dependencies
run: go mod download
@ -46,7 +46,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install libvirt
run: |
@ -65,7 +65,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install libvirt
run: |
@ -112,7 +112,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -195,7 +195,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -338,7 +338,7 @@ jobs:
echo "------------------------"
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install tools
continue-on-error: true
@ -474,7 +474,7 @@ jobs:
Get-WmiObject -class Win32_ComputerSystem
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install tools
continue-on-error: true
@ -580,7 +580,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -675,7 +675,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -755,7 +755,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -865,7 +865,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -947,7 +947,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -1051,7 +1051,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh
@ -1131,7 +1131,7 @@ jobs:
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
- uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.15.2'
stable: true
- name: Install gopogh

View File

@ -3,7 +3,7 @@
os: linux
language: go
go:
- 1.14.6
- 1.15.2
env:
global:
- GOPROXY=https://proxy.golang.org
@ -11,7 +11,7 @@ matrix:
include:
- language: go
name: Code Lint
go: 1.14.6
go: 1.15.2
env:
- TESTSUITE=lintall
before_install:
@ -20,7 +20,7 @@ matrix:
- language: go
name: Unit Test
go: 1.14.6
go: 1.15.2
env:
- TESTSUITE=unittest
before_install:
@ -29,7 +29,7 @@ matrix:
- language: go
name: Build
go: 1.14.6
go: 1.15.2
script: make
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@ -1,5 +1,49 @@
# Release Notes
## Version 1.14.1 - 2020-10-23
Features:
* new --wait flag component "kubelet" [#9459](https://github.com/kubernetes/minikube/pull/9459)
Bug Fixes:
* docker: When creating networks, use MTU of built-in bridge network [#9530](https://github.com/kubernetes/minikube/pull/9530)
* multinode: ensure worker node join control plane on restart [#9476](https://github.com/kubernetes/minikube/pull/9476)
* Fix "--native-ssh" flag for "minikube ssh" [#9417](https://github.com/kubernetes/minikube/pull/9417)
* Fix parallels driver initialization [#9494](https://github.com/kubernetes/minikube/pull/9494)
Minor Improvements:
* Omit error message if 100-crio-bridge.conf has already been disabled [#9505](https://github.com/kubernetes/minikube/pull/9505)
* avoid re-downloading hyperkit driver [#9365](https://github.com/kubernetes/minikube/pull/9365)
* improve gcp-auth addon failure policy [#9408](https://github.com/kubernetes/minikube/pull/9408)
* Added deprecation warning for --network-plugin=cni [#9368](https://github.com/kubernetes/minikube/pull/9368)
* Update warning message for local proxy. [#9490](https://github.com/kubernetes/minikube/pull/9490)
* bump helm-tiller addon to v2.16.12 [#9444](https://github.com/kubernetes/minikube/pull/9444)
* bump version for ingress dns addon [#9435](https://github.com/kubernetes/minikube/pull/9435)
Thank you to our contributors for this release!
- Anders F Björklund
- Dale Hamel
- GRXself
- Ilya Zuyev
- Josh Woodcock
- Joshua Mühlfort
- Kenta Iso
- Medya Ghazizadeh
- Mikhail Zholobov
- Nick Kubala
- Pablo Caderno
- Predrag Rogic
- Priya Modali
- Priya Wadhwa
- Sharif Elgamal
- Thomas Strömberg
- heyf
## Version 1.14.0 - 2020-10-08
## Features

View File

@ -15,7 +15,7 @@
# Bump these on release - and please check ISO_VERSION for correctness.
VERSION_MAJOR ?= 1
VERSION_MINOR ?= 14
VERSION_BUILD ?= 0
VERSION_BUILD ?= 1
RAW_VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_BUILD)
VERSION ?= v$(RAW_VERSION)
@ -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.14.6
GO_VERSION ?= 1.15.2
INSTALL_SIZE ?= $(shell du out/minikube-windows-amd64.exe | cut -f1)
BUILDROOT_BRANCH ?= 2020.02.6
@ -114,8 +114,7 @@ MARKDOWNLINT ?= markdownlint
MINIKUBE_MARKDOWN_FILES := README.md CONTRIBUTING.md CHANGELOG.md
MINIKUBE_BUILD_TAGS := container_image_ostree_stub containers_image_openpgp
MINIKUBE_BUILD_TAGS += go_getter_nos3 go_getter_nogcs
MINIKUBE_BUILD_TAGS := go_getter_nos3 go_getter_nogcs
MINIKUBE_INTEGRATION_BUILD_TAGS := integration $(MINIKUBE_BUILD_TAGS)
CMD_SOURCE_DIRS = cmd pkg

View File

@ -280,6 +280,11 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k
klog.Errorf("Found deprecated --enable-default-cni flag, setting --cni=bridge")
chosenCNI = "bridge"
}
// networkPlugin cni deprecation warning
chosenNetworkPlugin := viper.GetString(networkPlugin)
if chosenNetworkPlugin == "cni" {
out.WarningT("With --network-plugin=cni, you will need to provide your own CNI. See --cni flag as a user-friendly alternative")
}
cc = config.ClusterConfig{
Name: ClusterFlagValue(),
@ -326,7 +331,7 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k
FeatureGates: viper.GetString(featureGates),
ContainerRuntime: viper.GetString(containerRuntime),
CRISocket: viper.GetString(criSocket),
NetworkPlugin: viper.GetString(networkPlugin),
NetworkPlugin: chosenNetworkPlugin,
ServiceCIDR: viper.GetString(serviceCIDR),
ImageRepository: repository,
ExtraOptions: config.ExtraOptions,

View File

@ -80,7 +80,7 @@ spec:
hostNetwork: true
containers:
- name: minikube-ingress-dns
image: "cryptexlabs/minikube-ingress-dns:0.2.1"
image: "cryptexlabs/minikube-ingress-dns:0.3.0"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 53

View File

@ -11,7 +11,6 @@ CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_IKHEADERS=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_CGROUPS=y
CONFIG_MEMCG=y
@ -57,7 +56,6 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_PCI=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI=y
CONFIG_PCCARD=y
@ -86,6 +84,8 @@ CONFIG_SGI_PARTITION=y
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
CONFIG_BINFMT_MISC=y
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
@ -390,9 +390,9 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_VIRTIO=y
# CONFIG_HW_RANDOM_INTEL is not set
# CONFIG_HW_RANDOM_AMD is not set
CONFIG_HW_RANDOM_VIRTIO=y
CONFIG_NVRAM=y
CONFIG_HPET=y
# CONFIG_HPET_MMAP is not set
@ -447,7 +447,6 @@ CONFIG_RTC_CLASS=y
CONFIG_DMADEVICES=y
CONFIG_VIRT_DRIVERS=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_FS=y
CONFIG_HYPERV=m
CONFIG_HYPERV_UTILS=m
CONFIG_HYPERV_BALLOON=m
@ -475,7 +474,6 @@ CONFIG_ZISOFS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_PROC_KCORE=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_HUGETLBFS=y
CONFIG_NFS_FS=y
@ -513,10 +511,10 @@ CONFIG_DEBUG_STACK_USAGE=y
CONFIG_DEBUG_STACKOVERFLOW=y
# CONFIG_SCHED_DEBUG is not set
CONFIG_SCHEDSTATS=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FTRACE_SYSCALLS=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
CONFIG_EARLY_PRINTK_DBGP=y
CONFIG_DEBUG_BOOT_PARAMS=y
CONFIG_OPTIMIZE_INLINING=y
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y

View File

@ -5,3 +5,4 @@ sha256 6165ae2ad669d9ec6d317492d30a1511365bd31ad29efae757f19c1828bf75b3 v1.2.8.t
sha256 a0965e1492fca558629826f1aa89a9675de3d451cec67540400b30c0bf6ac387 v1.2.10.tar.gz
sha256 318886ea1efdec36f088fd6a0a0fe2b2f0ebdfd0066bdb4bd284bad12abc0a41 v1.2.12.tar.gz
sha256 0811057ab67b78ce911416e793edaeb14b3f1e105d67b8e67b6302e0eab572e4 v1.2.13.tar.gz
sha256 d30d59e143697aa4f0960205b3f5ac59c573b332f20507740ef2dc0fb5ae8ded v1.3.7.tar.gz

View File

@ -3,8 +3,8 @@
# containerd
#
################################################################################
CONTAINERD_BIN_VERSION = v1.2.13
CONTAINERD_BIN_COMMIT = 7ad184331fa3e55e52b890ea95e65ba581ae3429
CONTAINERD_BIN_VERSION = v1.3.7
CONTAINERD_BIN_COMMIT = 8fba4e9a7d01810a393d5d25a3621dc101981175
CONTAINERD_BIN_SITE = https://github.com/containerd/containerd/archive
CONTAINERD_BIN_SOURCE = $(CONTAINERD_BIN_VERSION).tar.gz
CONTAINERD_BIN_DEPENDENCIES = host-go libgpgme

View File

@ -13,3 +13,7 @@ sha256 57e1ee990ef2d5af8b32c33a21b4998682608e3556dcf1d3349666f55e7d95b9 v1.16.1.
sha256 23a797762e4544ee7c171ef138cfc1141a3f0acc2838d9965c2a58e53b16c3ae v1.17.0.tar.gz
sha256 7967e9218fdfb59d6005a9e19c1668469bc5566c2a35927cffe7de8656bb22c7 v1.17.1.tar.gz
sha256 336f5c275e260eaae8187e7250fb960441e8dc90615729354d3c04e699870982 v1.17.3.tar.gz
sha256 865ded95aceb3a33a391b252522682de6b37b39498704c490b3a321dbefaafcb v1.18.0.tar.gz
sha256 794ddc36c2a20fde91fc6cc2c6f02ebdaea85c69b51b67f3994090dbbdbc2a50 v1.18.1.tar.gz
sha256 25dc558fbabc987bd58c7eab5230121b258a7b0eb34a49dc6595f1c6f3969116 v1.18.2.tar.gz
sha256 d5c6442e3990938badc966cdd1eb9ebe2fc11345452c233aa0d87ca38fbeed81 v1.18.3.tar.gz

View File

@ -4,8 +4,8 @@
#
################################################################################
CRIO_BIN_VERSION = v1.17.3
CRIO_BIN_COMMIT = 1b192d16cb1cd04ee8fbf60ae2c06bccc5eac5c8
CRIO_BIN_VERSION = v1.18.3
CRIO_BIN_COMMIT = 61de18161fb4ccda720768c001713592b5a04e46
CRIO_BIN_SITE = https://github.com/cri-o/cri-o/archive
CRIO_BIN_SOURCE = $(CRIO_BIN_VERSION).tar.gz
CRIO_BIN_DEPENDENCIES = host-go libgpgme
@ -33,7 +33,7 @@ endef
define CRIO_BIN_BUILD_CMDS
mkdir -p $(@D)/bin
$(CRIO_BIN_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) GIT_COMMIT=$(CRIO_BIN_COMMIT) PREFIX=/usr binaries
$(CRIO_BIN_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) COMMIT_NO=$(CRIO_BIN_COMMIT) PREFIX=/usr binaries
endef
define CRIO_BIN_INSTALL_TARGET_CMDS

View File

@ -35,8 +35,15 @@ storage_driver = "overlay"
# the kubelet. The log directory specified must be an absolute directory.
log_dir = "/var/log/crio/pods"
# Location for CRI-O to lay down the version file
version_file = "/var/lib/crio/version"
# Location for CRI-O to lay down the temporary version file.
# It is used to check if crio wipe should wipe containers, which should
# always happen on a node reboot
version_file = "/var/run/crio/version"
# Location for CRI-O to lay down the persistent version file.
# It is used to check if crio wipe should wipe images, which should
# only happen when CRI-O has been upgraded
version_file_persist = "/var/lib/crio/version"
# The crio.api table contains settings for the kubelet/gRPC interface.
[crio.api]
@ -44,13 +51,11 @@ version_file = "/var/lib/crio/version"
# Path to AF_LOCAL socket on which CRI-O will listen.
listen = "/var/run/crio/crio.sock"
# Host IP considered as the primary IP to use by CRI-O for things such as host network IP.
host_ip = ""
# IP address on which the stream server will listen.
stream_address = "127.0.0.1"
# The port on which the stream server will listen.
# The port on which the stream server will listen. If the port is set to "0", then
# CRI-O will allocate a random free port number.
stream_port = "0"
# Enable encrypted TLS transport of the stream server.
@ -94,6 +99,10 @@ default_runtime = "runc"
# If true, the runtime will not use pivot_root, but instead use MS_MOVE.
no_pivot = false
# decryption_keys_path is the path where the keys required for
# image decryption are stored. This option supports live configuration reload.
decryption_keys_path = "/etc/crio/keys/"
# Path to the conmon binary, used for monitoring the OCI runtime.
# Will be searched for using $PATH if empty.
conmon = "/usr/libexec/crio/conmon"
@ -107,17 +116,26 @@ conmon_env = [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
]
# Additional environment variables to set for all the
# containers. These are overridden if set in the
# container image spec or in the container runtime configuration.
default_env = [
]
# If true, SELinux will be used for pod separation on the host.
selinux = false
# Path to the seccomp.json profile which is used as the default seccomp profile
# for the runtime. If not specified, then the internal default seccomp profile
# will be used.
# will be used. This option supports live configuration reload.
seccomp_profile = ""
# Used to change the name of the default AppArmor profile of CRI-O. The default
# profile name is "crio-default-" followed by the version string of CRI-O.
apparmor_profile = "crio-default-1.16.1"
# profile name is "crio-default". This profile only takes effect if the user
# does not specify a profile via the Kubernetes Pod's metadata annotation. If
# the profile is set to "unconfined", then this equals to disabling AppArmor.
# This option supports live configuration reload.
apparmor_profile = "crio-default"
# Cgroup management implementation used for the runtime.
cgroup_manager = "systemd"
@ -126,17 +144,15 @@ cgroup_manager = "systemd"
# only the capabilities defined in the containers json file by the user/kube
# will be added.
default_capabilities = [
"CHOWN",
"DAC_OVERRIDE",
"FSETID",
"FOWNER",
"NET_RAW",
"SETGID",
"SETUID",
"SETPCAP",
"NET_BIND_SERVICE",
"SYS_CHROOT",
"KILL",
"CHOWN",
"DAC_OVERRIDE",
"FSETID",
"FOWNER",
"SETGID",
"SETUID",
"SETPCAP",
"NET_BIND_SERVICE",
"KILL",
]
# List of default sysctls. If it is empty or commented out, only the sysctls
@ -151,8 +167,10 @@ default_sysctls = [
additional_devices = [
]
# Path to OCI hooks directories for automatically executed hooks.
# Path to OCI hooks directories for automatically executed hooks. If one of the
# directories does not exist, then CRI-O will automatically skip them.
hooks_dir = [
"/usr/share/containers/oci/hooks.d",
]
# List of default mounts for each container. **Deprecated:** this option will
@ -200,9 +218,13 @@ bind_mount_prefix = ""
read_only = false
# Changes the verbosity of the logs based on the level it is set to. Options
# are fatal, panic, error, warn, info, and debug. This option supports live
# configuration reload.
log_level = "error"
# are fatal, panic, error, warn, info, debug and trace. This option supports
# live configuration reload.
log_level = "info"
# Filter the log messages by the provided regular expression.
# This option supports live configuration reload.
log_filter = ""
# The UID mappings for the user namespace of each container. A range is
# specified in the form containerUID:HostUID:Size. Multiple ranges must be
@ -215,12 +237,23 @@ uid_mappings = ""
gid_mappings = ""
# The minimal amount of time in seconds to wait before issuing a timeout
# regarding the proper termination of the container.
ctr_stop_timeout = 0
# regarding the proper termination of the container. The lowest possible
# value is 30s, whereas lower values are not considered by CRI-O.
ctr_stop_timeout = 30
# ManageNetworkNSLifecycle determines whether we pin and remove network namespace
# and manage its lifecycle.
manage_network_ns_lifecycle = false
# **DEPRECATED** this option is being replaced by manage_ns_lifecycle, which is described below.
# manage_network_ns_lifecycle = false
# manage_ns_lifecycle determines whether we pin and remove namespaces
# and manage their lifecycle
manage_ns_lifecycle = false
# The directory where the state of the managed namespaces gets tracked.
# Only used when manage_ns_lifecycle is true.
namespaces_dir = "/var/run"
# pinns_path is the path to find the pinns binary, which is needed to manage namespace lifecycle
pinns_path = "/usr/bin/pinns"
# The "crio.runtime.runtimes" table defines a list of OCI compatible runtimes.
# The runtime to use is picked based on the runtime_handler provided by the CRI.
@ -281,7 +314,7 @@ global_auth_file = ""
# The image used to instantiate infra containers.
# This option supports live configuration reload.
pause_image = "k8s.gcr.io/pause:3.1"
pause_image = "k8s.gcr.io/pause:3.2"
# The path to a file containing credentials specific for pulling the pause_image from
# above. The file is similar to that of /var/lib/kubelet/config.json
@ -324,6 +357,10 @@ registries = [
# CNI plugins.
[crio.network]
# The default CNI network name to be selected. If not set or "", then
# CRI-O will pick-up the first one found in network_dir.
# cni_default_network = ""
# Path to the directory where CNI configuration files are located.
network_dir = "/etc/cni/net.d/"

View File

@ -35,8 +35,15 @@
# the kubelet. The log directory specified must be an absolute directory.
log_dir = "/var/log/crio/pods"
# Location for CRI-O to lay down the version file
version_file = "/var/lib/crio/version"
# Location for CRI-O to lay down the temporary version file.
# It is used to check if crio wipe should wipe containers, which should
# always happen on a node reboot
version_file = "/var/run/crio/version"
# Location for CRI-O to lay down the persistent version file.
# It is used to check if crio wipe should wipe images, which should
# only happen when CRI-O has been upgraded
version_file_persist = "/var/lib/crio/version"
# The crio.api table contains settings for the kubelet/gRPC interface.
[crio.api]
@ -44,13 +51,11 @@ version_file = "/var/lib/crio/version"
# Path to AF_LOCAL socket on which CRI-O will listen.
listen = "/var/run/crio/crio.sock"
# Host IP considered as the primary IP to use by CRI-O for things such as host network IP.
host_ip = ""
# IP address on which the stream server will listen.
stream_address = "127.0.0.1"
# The port on which the stream server will listen.
# The port on which the stream server will listen. If the port is set to "0", then
# CRI-O will allocate a random free port number.
stream_port = "0"
# Enable encrypted TLS transport of the stream server.
@ -94,6 +99,10 @@ default_runtime = "runc"
# If true, the runtime will not use pivot_root, but instead use MS_MOVE.
no_pivot = false
# decryption_keys_path is the path where the keys required for
# image decryption are stored. This option supports live configuration reload.
decryption_keys_path = "/etc/crio/keys/"
# Path to the conmon binary, used for monitoring the OCI runtime.
# Will be searched for using $PATH if empty.
conmon = ""
@ -107,36 +116,43 @@ conmon_env = [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
]
# Additional environment variables to set for all the
# containers. These are overridden if set in the
# container image spec or in the container runtime configuration.
default_env = [
]
# If true, SELinux will be used for pod separation on the host.
selinux = false
# Path to the seccomp.json profile which is used as the default seccomp profile
# for the runtime. If not specified, then the internal default seccomp profile
# will be used.
# will be used. This option supports live configuration reload.
seccomp_profile = ""
# Used to change the name of the default AppArmor profile of CRI-O. The default
# profile name is "crio-default-" followed by the version string of CRI-O.
apparmor_profile = "crio-default-1.16.1"
# profile name is "crio-default". This profile only takes effect if the user
# does not specify a profile via the Kubernetes Pod's metadata annotation. If
# the profile is set to "unconfined", then this equals to disabling AppArmor.
# This option supports live configuration reload.
apparmor_profile = "crio-default"
# Cgroup management implementation used for the runtime.
cgroup_manager = "cgroupfs"
cgroup_manager = "systemd"
# List of default capabilities for containers. If it is empty or commented out,
# only the capabilities defined in the containers json file by the user/kube
# will be added.
default_capabilities = [
"CHOWN",
"DAC_OVERRIDE",
"FSETID",
"FOWNER",
"NET_RAW",
"SETGID",
"SETUID",
"SETPCAP",
"NET_BIND_SERVICE",
"SYS_CHROOT",
"KILL",
"CHOWN",
"DAC_OVERRIDE",
"FSETID",
"FOWNER",
"SETGID",
"SETUID",
"SETPCAP",
"NET_BIND_SERVICE",
"KILL",
]
# List of default sysctls. If it is empty or commented out, only the sysctls
@ -151,8 +167,10 @@ default_sysctls = [
additional_devices = [
]
# Path to OCI hooks directories for automatically executed hooks.
# Path to OCI hooks directories for automatically executed hooks. If one of the
# directories does not exist, then CRI-O will automatically skip them.
hooks_dir = [
"/usr/share/containers/oci/hooks.d",
]
# List of default mounts for each container. **Deprecated:** this option will
@ -200,9 +218,13 @@ bind_mount_prefix = ""
read_only = false
# Changes the verbosity of the logs based on the level it is set to. Options
# are fatal, panic, error, warn, info, and debug. This option supports live
# configuration reload.
log_level = "error"
# are fatal, panic, error, warn, info, debug and trace. This option supports
# live configuration reload.
log_level = "info"
# Filter the log messages by the provided regular expression.
# This option supports live configuration reload.
log_filter = ""
# The UID mappings for the user namespace of each container. A range is
# specified in the form containerUID:HostUID:Size. Multiple ranges must be
@ -215,12 +237,23 @@ uid_mappings = ""
gid_mappings = ""
# The minimal amount of time in seconds to wait before issuing a timeout
# regarding the proper termination of the container.
ctr_stop_timeout = 0
# regarding the proper termination of the container. The lowest possible
# value is 30s, whereas lower values are not considered by CRI-O.
ctr_stop_timeout = 30
# ManageNetworkNSLifecycle determines whether we pin and remove network namespace
# and manage its lifecycle.
manage_network_ns_lifecycle = false
# **DEPRECATED** this option is being replaced by manage_ns_lifecycle, which is described below.
# manage_network_ns_lifecycle = false
# manage_ns_lifecycle determines whether we pin and remove namespaces
# and manage their lifecycle
manage_ns_lifecycle = false
# The directory where the state of the managed namespaces gets tracked.
# Only used when manage_ns_lifecycle is true.
namespaces_dir = "/var/run"
# pinns_path is the path to find the pinns binary, which is needed to manage namespace lifecycle
pinns_path = ""
# The "crio.runtime.runtimes" table defines a list of OCI compatible runtimes.
# The runtime to use is picked based on the runtime_handler provided by the CRI.
@ -281,7 +314,7 @@ global_auth_file = ""
# The image used to instantiate infra containers.
# This option supports live configuration reload.
pause_image = "k8s.gcr.io/pause:3.1"
pause_image = "k8s.gcr.io/pause:3.2"
# The path to a file containing credentials specific for pulling the pause_image from
# above. The file is similar to that of /var/lib/kubelet/config.json
@ -323,6 +356,10 @@ image_volumes = "mkdir"
# CNI plugins.
[crio.network]
# The default CNI network name to be selected. If not set or "", then
# CRI-O will pick-up the first one found in network_dir.
# cni_default_network = ""
# Path to the directory where CNI configuration files are located.
network_dir = "/etc/cni/net.d/"

View File

@ -21,3 +21,4 @@ sha256 1c03c78be198d9085e7dd6806fc5d93264baaf0c7ea17f584d00af48eae508ee docker-
sha256 7c1576a0bc749418d1423d2b78c8920b5d61f849789904612862dd118742e82b docker-19.03.10.tgz
sha256 0f4336378f61ed73ed55a356ac19e46699a995f2aff34323ba5874d131548b9e docker-19.03.11.tgz
sha256 88de1b87b8a2582fe827154899475a72fb707c5793cfb39d2a24813ba1f31197 docker-19.03.12.tgz
sha256 ddb13aff1fcdcceb710bf71a210169b9c1abfd7420eeaf42cf7975f8fae2fcc8 docker-19.03.13.tgz

View File

@ -4,7 +4,7 @@
#
################################################################################
DOCKER_BIN_VERSION = 19.03.12
DOCKER_BIN_VERSION = 19.03.13
DOCKER_BIN_SITE = https://download.docker.com/linux/static/stable/x86_64
DOCKER_BIN_SOURCE = docker-$(DOCKER_BIN_VERSION).tgz

View File

@ -92,14 +92,17 @@ RUN clean-install \
lz4 \
gnupg \
sudo \
docker.io \
containerd \
openssh-server \
dnsutils \
runc \
# libglib2.0-0 is required for conmon, which is required for podman
libglib2.0-0
# install docker
RUN sh -c "echo 'deb https://download.docker.com/linux/ubuntu focal stable' > /etc/apt/sources.list.d/docker.list" && \
curl -L https://download.docker.com/linux/ubuntu/gpg -o docker.key && \
apt-key add - < docker.key && \
clean-install docker-ce docker-ce-cli containerd.io
# Install cri-o/podman dependencies:
RUN sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \
curl -LO https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_20.04/Release.key && \
@ -118,7 +121,7 @@ RUN sh -c "echo 'deb https://dl.bintray.com/afbjorklund/podman focal main' > /et
apt-key add - < afbjorklund-public.key.asc && \
clean-install podman=1.9.3~1
RUN mkdir -p /usr/lib/cri-o-runc/sbin && cp /usr/sbin/runc /usr/lib/cri-o-runc/sbin/runc
RUN mkdir -p /usr/lib/cri-o-runc/sbin && cp /usr/bin/runc /usr/lib/cri-o-runc/sbin/runc
# automount service
COPY automount/minikube-automount /usr/sbin/minikube-automount

View File

@ -1,4 +1,12 @@
[
{
"name": "v1.14.1",
"checksums": {
"darwin": "d07db8343d06caa484a645bdd84d72d9babba81a18a7a50729616571b5e6702a",
"linux": "a7ad2b00389146a5b1833a35a96e50a224e7b382d072ee771b425eb6719bf109",
"windows": "71217e883e2d1c17b64415fbabef6bf199c7b03f88f66478c659d199c315e315"
}
},
{
"name": "v1.14.0",
"checksums": {

7
go.mod
View File

@ -1,9 +1,10 @@
module k8s.io/minikube
go 1.13
go 1.15
require (
cloud.google.com/go/storage v1.8.0
github.com/Azure/azure-sdk-for-go v42.3.0+incompatible
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 // indirect
github.com/Parallels/docker-machine-parallels v1.3.0
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
@ -32,7 +33,7 @@ require (
github.com/google/slowjam v0.0.0-20200530021616-df27e642fe7b
github.com/google/uuid v1.1.1
github.com/googleapis/gnostic v0.3.0 // indirect
github.com/hashicorp/go-getter v1.4.0
github.com/hashicorp/go-getter v1.4.2
github.com/hashicorp/go-retryablehttp v0.6.6
github.com/hooklift/assert v0.0.0-20170704181755-9d1defd6d214 // indirect
github.com/hooklift/iso9660 v0.0.0-20170318115843-1cf07e5970d8
@ -97,7 +98,7 @@ replace (
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.20200810185219-7d42fed1b770
github.com/google/go-containerregistry => github.com/afbjorklund/go-containerregistry v0.0.0-20200902152226-fbad78ec2813
github.com/hashicorp/go-getter => github.com/afbjorklund/go-getter v1.4.1-0.20190910175809-eb9f6c26742c
github.com/hashicorp/go-getter => github.com/afbjorklund/go-getter v1.4.1-0.20201020145846-c0da14b4bffe
github.com/samalba/dockerclient => github.com/sayboras/dockerclient v1.0.0
github.com/VividCortex/godaemon => github.com/priyawadhwa/godaemon v0.0.0-20201023222158-5d5ea5b0cb72
k8s.io/api => k8s.io/api v0.17.3

6
go.sum
View File

@ -51,6 +51,7 @@ github.com/Azure/azure-sdk-for-go v29.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9mo
github.com/Azure/azure-sdk-for-go v30.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
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/azure-sdk-for-go v42.3.0+incompatible h1:PAHkmPqd/vQV4LJcqzEUM1elCyTMWjbrO8oFMl0dvBE=
github.com/Azure/azure-sdk-for-go v42.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbIe3AcV9WZbAdpkoXOa0=
github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0=
@ -121,8 +122,8 @@ github.com/VividCortex/godaemon v0.0.0-20200629145737-581b70a8a603 h1:ZqOqBuBJ9Q
github.com/VividCortex/godaemon v0.0.0-20200629145737-581b70a8a603/go.mod h1:Y8CJ3IwPIAkMhv/rRUWIlczaeqd9ty9yrl+nc2AbaL4=
github.com/afbjorklund/go-containerregistry v0.0.0-20200902152226-fbad78ec2813 h1:0tskN1ipU/BBrpoEIy0rdZS9jf5+wdP6IMRak8Iu/YE=
github.com/afbjorklund/go-containerregistry v0.0.0-20200902152226-fbad78ec2813/go.mod h1:npTSyywOeILcgWqd+rvtzGWflIPPcBQhYoOONaY4ltM=
github.com/afbjorklund/go-getter v1.4.1-0.20190910175809-eb9f6c26742c h1:18gEt7qzn7CW7qMkfPTFyyotlPbvPQo9o4IDV8jZqP4=
github.com/afbjorklund/go-getter v1.4.1-0.20190910175809-eb9f6c26742c/go.mod h1:7qxyCd8rBfcShwsvxgIguu4KbS3l8bUCwg2Umn7RjeY=
github.com/afbjorklund/go-getter v1.4.1-0.20201020145846-c0da14b4bffe h1:TdcuDqk4ArmYI8cbeeL/RM5BPciDOaWpGZoPoT3OziQ=
github.com/afbjorklund/go-getter v1.4.1-0.20201020145846-c0da14b4bffe/go.mod h1:3Ao9Hol5VJsmwJV5BF1GUrONbaOUmA+m1Nj2+0LuMAY=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE=
@ -598,6 +599,7 @@ github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6K
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-getter v1.4.2/go.mod h1:3Ao9Hol5VJsmwJV5BF1GUrONbaOUmA+m1Nj2+0LuMAY=
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=

View File

@ -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.14.6" "/usr/local" || true
sudo ./installers/check_install_golang.sh "1.15.2" "/usr/local" || true
docker rm -f -v $(docker ps -aq) >/dev/null 2>&1 || true
docker volume prune -f || true

View File

@ -353,9 +353,10 @@ func verifyAddonStatusInternal(cc *config.ClusterConfig, name string, val string
return errors.Wrapf(err, "get kube-client to validate %s addon: %v", name, err)
}
err = kapi.WaitForPods(client, ns, label, time.Minute*3)
// This timeout includes image pull time, which can take a few minutes. 3 is not enough.
err = kapi.WaitForPods(client, ns, label, time.Minute*6)
if err != nil {
return errors.Wrapf(err, "verifying %s addon pods : %v", name, err)
return errors.Wrapf(err, "waiting for %s pods", label)
}
}

View File

@ -35,16 +35,16 @@ import (
func RoutableHostIPFromInside(ociBin string, clusterName string, containerName string) (net.IP, error) {
if ociBin == Docker {
if runtime.GOOS == "linux" {
_, gateway, err := dockerNetworkInspect(clusterName)
info, err := dockerNetworkInspect(clusterName)
if err != nil {
if errors.Is(err, ErrNetworkNotFound) {
klog.Infof("The container %s is not attached to a network, this could be because the cluster was created by minikube <v1.14, will try to get the IP using container gatway", containerName)
return containerGatewayIP(Docker, containerName)
}
return gateway, errors.Wrap(err, "network inspect")
return info.gateway, errors.Wrap(err, "network inspect")
}
return gateway, nil
return info.gateway, nil
}
// for windows and mac, the gateway ip is not routable so we use dns trick.
return digDNS(ociBin, containerName, "host.docker.internal")

View File

@ -22,6 +22,7 @@ import (
"fmt"
"net"
"os/exec"
"strconv"
"strings"
"github.com/pkg/errors"
@ -36,6 +37,9 @@ const firstSubnetAddr = "192.168.49.0"
// big enough for a cluster of 254 nodes
const defaultSubnetMask = 24
// name of the default Docker bridge network, used to lookup the MTU (see #9528)
const dockerDefaultBridge = "bridge"
// CreateNetwork creates a network returns gateway and error, minikube creates one network per cluster
func CreateNetwork(ociBin string, name string) (net.IP, error) {
if ociBin != Docker {
@ -46,20 +50,26 @@ func CreateNetwork(ociBin string, name string) (net.IP, error) {
func createDockerNetwork(clusterName string) (net.IP, error) {
// check if the network already exists
subnet, gateway, err := dockerNetworkInspect(clusterName)
info, err := dockerNetworkInspect(clusterName)
if err == nil {
klog.Infof("Found existing network with subnet %s and gateway %s.", subnet, gateway)
return gateway, nil
klog.Infof("Found existing network %+v", info)
return info.gateway, nil
}
// will try to get MTU from the docker network to avoid issue with systems with exotic MTU settings.
// related issue #9528
info, err = dockerNetworkInspect(dockerDefaultBridge)
if err != nil {
klog.Warningf("failed to get mtu information from the docker's default network %q: %v", dockerDefaultBridge, err)
}
attempts := 0
subnetAddr := firstSubnetAddr
// Rather than iterate through all of the valid subnets, give up at 20 to avoid a lengthy user delay for something that is unlikely to work.
// will be like 192.168.49.0/24 ,...,192.168.239.0/24
for attempts < 20 {
gateway, err = tryCreateDockerNetwork(subnetAddr, defaultSubnetMask, clusterName)
info.gateway, err = tryCreateDockerNetwork(subnetAddr, defaultSubnetMask, info.mtu, clusterName)
if err == nil {
return gateway, nil
return info.gateway, nil
}
// don't retry if error is not adddress is taken
@ -77,15 +87,33 @@ func createDockerNetwork(clusterName string) (net.IP, error) {
newSubnet[2] += byte(9 + attempts)
subnetAddr = newSubnet.String()
}
return gateway, fmt.Errorf("failed to create network after 20 attempts")
return info.gateway, fmt.Errorf("failed to create network after 20 attempts")
}
func tryCreateDockerNetwork(subnetAddr string, subnetMask int, name string) (net.IP, error) {
func tryCreateDockerNetwork(subnetAddr string, subnetMask int, mtu int, name string) (net.IP, error) {
gateway := net.ParseIP(subnetAddr)
gateway.To4()[3]++ // first ip for gateway
klog.Infof("attempt to create network %s/%d with subnet: %s and gateway %s...", subnetAddr, subnetMask, name, gateway)
// options documentation https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options
rr, err := runCmd(exec.Command(Docker, "network", "create", "--driver=bridge", fmt.Sprintf("--subnet=%s", fmt.Sprintf("%s/%d", subnetAddr, subnetMask)), fmt.Sprintf("--gateway=%s", gateway), "-o", "--ip-masq", "-o", "--icc", fmt.Sprintf("--label=%s=%s", CreatedByLabelKey, "true"), name))
klog.Infof("attempt to create network %s/%d with subnet: %s and gateway %s and MTU of %d ...", subnetAddr, subnetMask, name, gateway, mtu)
args := []string{
"network",
"create",
"--driver=bridge",
fmt.Sprintf("--subnet=%s", fmt.Sprintf("%s/%d", subnetAddr, subnetMask)),
fmt.Sprintf("--gateway=%s", gateway),
// options documentation https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options
"-o", "--ip-masq",
"-o", "--icc",
fmt.Sprintf("--label=%s=%s", CreatedByLabelKey, "true"),
name,
}
// adding MTU option because #9528
if mtu > 0 {
args = append(args, "-o")
args = append(args, fmt.Sprintf("com.docker.network.driver.mtu=%d", mtu))
}
rr, err := runCmd(exec.Command(Docker, args...))
if err != nil {
// Pool overlaps with other one on this address space
if strings.Contains(rr.Output(), "Pool overlaps") {
@ -99,32 +127,50 @@ func tryCreateDockerNetwork(subnetAddr string, subnetMask int, name string) (net
return gateway, nil
}
// returns subnet and gate if exists
func dockerNetworkInspect(name string) (*net.IPNet, net.IP, error) {
cmd := exec.Command(Docker, "network", "inspect", name, "--format", "{{(index .IPAM.Config 0).Subnet}},{{(index .IPAM.Config 0).Gateway}}")
// netInfo holds part of a docker or podman network information relevant to kic drivers
type netInfo struct {
name string
subnet *net.IPNet
gateway net.IP
mtu int
}
// if exists returns subnet, gateway and mtu
func dockerNetworkInspect(name string) (netInfo, error) {
var info = netInfo{name: name}
cmd := exec.Command(Docker, "network", "inspect", name, "--format", `{{(index .IPAM.Config 0).Subnet}},{{(index .IPAM.Config 0).Gateway}},{{(index .Options "com.docker.network.driver.mtu")}}`)
rr, err := runCmd(cmd)
if err != nil {
logDockerNetworkInspect(name)
if strings.Contains(rr.Output(), "No such network") {
return nil, nil, ErrNetworkNotFound
return info, ErrNetworkNotFound
}
return nil, nil, err
}
// results looks like 172.17.0.0/16,172.17.0.1
ips := strings.Split(strings.TrimSpace(rr.Stdout.String()), ",")
if len(ips) == 0 {
return nil, nil, fmt.Errorf("empty IP list parsed from: %q", rr.Output())
return info, err
}
_, subnet, err := net.ParseCIDR(ips[0])
// results looks like 172.17.0.0/16,172.17.0.1,1500
vals := strings.Split(strings.TrimSpace(rr.Stdout.String()), ",")
if len(vals) == 0 {
return info, fmt.Errorf("empty list network inspect: %q", rr.Output())
}
if len(vals) > 0 {
info.gateway = net.ParseIP(vals[1])
mtu, err := strconv.Atoi(vals[2])
if err != nil {
klog.Warningf("couldn't parse mtu for docker network %q: %v", name, err)
} else {
info.mtu = mtu
}
}
_, info.subnet, err = net.ParseCIDR(vals[0])
if err != nil {
return nil, nil, errors.Wrapf(err, "parse subnet for %s", name)
return info, errors.Wrapf(err, "parse subnet for %s", name)
}
var gateway net.IP
if len(ips) > 0 {
gateway = net.ParseIP(ips[1])
}
return subnet, gateway, nil
return info, nil
}
func logDockerNetworkInspect(name string) {
@ -157,7 +203,7 @@ func RemoveNetwork(name string) error {
}
func networkExists(name string) bool {
_, _, err := dockerNetworkInspect(name)
_, err := dockerNetworkInspect(name)
if err != nil && !errors.Is(err, ErrNetworkNotFound) { // log unexpected error
klog.Warningf("Error inspecting docker network %s: %v", name, err)
}

View File

@ -651,7 +651,14 @@ func (c Flannel) Apply(r Runner) error {
if driver.IsKIC(c.cc.Driver) {
conflict := "/etc/cni/net.d/100-crio-bridge.conf"
_, err := r.RunCmd(exec.Command("sudo", "mv", conflict, filepath.Join(filepath.Dir(conflict), "DISABLED-"+filepath.Base(conflict))))
_, err := r.RunCmd(exec.Command("stat", conflict))
if err != nil {
klog.Warningf("%s not found, skipping disable step: %v", conflict, err)
return nil
}
_, err = r.RunCmd(exec.Command("sudo", "mv", conflict, filepath.Join(filepath.Dir(conflict), "DISABLED-"+filepath.Base(conflict))))
if err != nil {
klog.Errorf("unable to disable %s: %v", conflict, err)
}

View File

@ -30,6 +30,7 @@ import (
"github.com/pkg/errors"
"k8s.io/klog/v2"
"k8s.io/minikube/pkg/minikube/download"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/style"
@ -55,13 +56,12 @@ func InstallOrUpdate(name string, directory string, v semver.Version, interactiv
defer releaser.Release()
exists := driverExists(executable)
path, err := validateDriver(executable, v)
path, err := validateDriver(executable, minAcceptableDriverVersion(name, v))
if !exists || (err != nil && autoUpdate) {
klog.Warningf("%s: %v", executable, err)
path = filepath.Join(directory, executable)
derr := download.Driver(executable, path, v)
if derr != nil {
return derr
if err := download.Driver(executable, path, v); err != nil {
return err
}
}
return fixDriverPermissions(name, path, interactive)
@ -133,6 +133,8 @@ func validateDriver(executable string, v semver.Version) (string, error) {
if err != nil {
return path, errors.Wrap(err, "can't parse driver version")
}
klog.Infof("%s version is %s", path, driverVersion)
if driverVersion.LT(v) {
return path, fmt.Errorf("%s is version %s, want %s", executable, driverVersion, v)
}

View File

@ -0,0 +1,52 @@
/*
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 driver
import (
"github.com/blang/semver"
"k8s.io/klog/v2"
)
// minHyperkitVersion is the minimum version of the minikube hyperkit driver compatible with the current minikube code
var minHyperkitVersion *semver.Version
const minHyperkitVersionStr = "1.11.0"
func init() {
v, err := semver.New(minHyperkitVersionStr)
if err != nil {
klog.Errorf("Failed to parse the hyperkit driver version: %v", err)
} else {
minHyperkitVersion = v
}
}
// minAcceptableDriverVersion is the minimum version of driver supported by current version of minikube
func minAcceptableDriverVersion(driver string, mkVer semver.Version) semver.Version {
switch driver {
case HyperKit:
if minHyperkitVersion != nil {
return *minHyperkitVersion
}
return mkVer
case KVM2:
return mkVer
default:
klog.Warningf("Unexpected driver: %v", driver)
return mkVer
}
}

View File

@ -0,0 +1,52 @@
/*
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 driver
import (
"testing"
"github.com/blang/semver"
)
func Test_minDriverVersion(t *testing.T) {
tests := []struct {
desc string
driver string
mkV string
want semver.Version
}{
{"Hyperkit", HyperKit, "1.1.1", *minHyperkitVersion},
{"Invalid", "_invalid_", "1.1.1", v("1.1.1")},
{"KVM2", KVM2, "1.1.1", v("1.1.1")},
}
for _, tt := range tests {
t.Run(tt.desc, func(t *testing.T) {
if got := minAcceptableDriverVersion(tt.driver, v(tt.mkV)); !got.EQ(tt.want) {
t.Errorf("Invalid min supported version, got: %v, want: %v", got, tt.want)
}
})
}
}
func v(s string) semver.Version {
r, err := semver.New(s)
if err != nil {
panic(err)
}
return *r
}

View File

@ -38,8 +38,8 @@ func TestTimeCommandLogs(t *testing.T) {
if !ok {
t.Fatalf("expected log %s but didn't find it", log)
}
// Let's give a little wiggle room so we don't fail if time is 3 and actualTime is 2.999
if actualTime < time && time-actualTime > 0.001 {
// Let's give a little wiggle room so we don't fail if time is 3 and actualTime is 2.99...
if actualTime < time && time-actualTime > 0.01 {
t.Fatalf("expected log \"%s\" to take more time than it actually did. got %v, expected > %v", log, actualTime, time)
}
}

View File

@ -176,7 +176,7 @@ func SetDockerEnv() []string {
}
if isLocalProxy(u.Host) {
out.WarningT("Not passing {{.name}}={{.value}} to docker env.", out.V{"name": k, "value": v})
out.WarningT("Local proxy ignored: not passing {{.name}}={{.value}} to docker env.", out.V{"name": k, "value": v})
continue
}
}

View File

@ -23,7 +23,6 @@ import (
"os/exec"
parallels "github.com/Parallels/docker-machine-parallels"
"github.com/docker/machine/libmachine/drivers"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/download"
"k8s.io/minikube/pkg/minikube/driver"
@ -37,7 +36,6 @@ func init() {
Config: configure,
Status: status,
Priority: registry.Default,
Init: func() drivers.Driver { return parallels.NewDriver("", "") },
})
if err != nil {
panic(fmt.Sprintf("unable to register: %v", err))

View File

@ -149,7 +149,7 @@ To access a LoadBalancer deployment, use the "minikube tunnel" command. Here is
```shell
kubectl create deployment balanced --image=k8s.gcr.io/echoserver:1.4
kubectl expose deployment balanced --type=LoadBalancer --port=8000
kubectl expose deployment balanced --type=LoadBalancer --port=8080
```
In another window, start the tunnel to create a routable IP for the 'balanced' deployment:
@ -162,7 +162,7 @@ To find the routable IP, run this command and examine the `EXTERNAL-IP` column:
`kubectl get services balanced`
Your deployment is now available at &lt;EXTERNAL-IP&gt;:8000
Your deployment is now available at &lt;EXTERNAL-IP&gt;:8080
<h2 class="step"><span class="fa-stack fa-1x"><i class="fa fa-circle fa-stack-2x"></i><strong class="fa-stack-1x text-primary">5</strong></span>Manage your cluster</h2>

View File

@ -25,9 +25,12 @@ import (
"runtime"
"testing"
"github.com/Azure/azure-sdk-for-go/tools/apidiff/ioext"
"github.com/blang/semver"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/localpath"
"k8s.io/minikube/pkg/version"
)
func TestKVMDriverInstallOrUpdate(t *testing.T) {
@ -158,8 +161,8 @@ func TestHyperKitDriverInstallOrUpdate(t *testing.T) {
t.Fatalf("Expected new semver. test: %v, got: %v", tc.name, err)
}
if err := exec.Command("sudo", "-n", "ls").Run(); err != nil {
t.Skipf("password required to execute 'ls', skipping remaining test: %v", err)
if sudoNeedsPassword() {
t.Skipf("password required to execute 'sudo', skipping remaining test")
}
err = driver.InstallOrUpdate("hyperkit", dir, newerVersion, false, true)
@ -173,3 +176,123 @@ func TestHyperKitDriverInstallOrUpdate(t *testing.T) {
}
}
}
func TestHyperkitDriverSkipUpgrade(t *testing.T) {
if runtime.GOOS != "darwin" {
t.Skip("Skip if not darwin.")
}
MaybeParallel(t)
tests := []struct {
name string
path string
expectedVersion string
}{
{
name: "upgrade-v1.11.0-to-current",
path: filepath.Join(*testdataDir, "hyperkit-driver-version-1.11.0"),
expectedVersion: "v1.11.0",
},
{
name: "upgrade-v1.2.0-to-current",
path: filepath.Join(*testdataDir, "hyperkit-driver-older-version"),
expectedVersion: version.GetVersion(),
},
}
sudoPath, err := exec.LookPath("sudo")
if err != nil {
t.Fatalf("No sudo in path: %v", err)
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
mkDir, drvPath, err := prepareTempMinikubeDirWithHyperkitDriver(tc.name, tc.path)
if err != nil {
t.Fatalf("Failed to prepare tempdir. test: %s, got: %v", tc.name, err)
}
defer func() {
if err := os.RemoveAll(mkDir); err != nil {
t.Errorf("Failed to remove mkDir %q: %v", mkDir, err)
}
}()
cmd := exec.Command(Target(), "start", "--download-only", "--interactive=false", "--driver=hyperkit")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stdout
cmd.Env = append(os.Environ(),
fmt.Sprintf("PATH=%v%c%v", filepath.Dir(drvPath), filepath.ListSeparator, filepath.Dir(sudoPath)),
"MINIKUBE_HOME="+mkDir)
if err = cmd.Run(); err != nil {
t.Fatalf("failed to run minikube. got: %v", err)
}
upgradedVersion, err := driverVersion(drvPath)
if err != nil {
t.Fatalf("failed to check driver version. got: %v", err)
}
if upgradedVersion != tc.expectedVersion {
t.Fatalf("invalid driver version. expected: %v, got: %v", tc.expectedVersion, upgradedVersion)
}
})
}
}
func sudoNeedsPassword() bool {
err := exec.Command("sudo", "-n", "ls").Run()
return err != nil
}
func driverVersion(path string) (string, error) {
output, err := exec.Command(path, "version").Output()
if err != nil {
return "", err
}
var resultVersion string
_, err = fmt.Sscanf(string(output), "version: %s\n", &resultVersion)
if err != nil {
return "", err
}
return resultVersion, nil
}
// prepareTempMinikubeDirWithHyperkitDriver creates a temp .minikube directory
// with structure essential to testing of hyperkit driver updates
func prepareTempMinikubeDirWithHyperkitDriver(name, driver string) (string, string, error) {
temp, err := ioutil.TempDir("", name)
if err != nil {
return "", "", fmt.Errorf("failed to create tempdir: %v", err)
}
mkDir := filepath.Join(temp, ".minikube")
mkBinDir := filepath.Join(mkDir, "bin")
err = os.MkdirAll(mkBinDir, 0777)
if err != nil {
return "", "", fmt.Errorf("failed to prepare tempdir: %v", err)
}
pwd, err := os.Getwd()
if err != nil {
return "", "", fmt.Errorf("failed to get working directory: %v", err)
}
testDataDriverPath := filepath.Join(pwd, driver, "docker-machine-driver-hyperkit")
if _, err = os.Stat(testDataDriverPath); err != nil {
return "", "", fmt.Errorf("expected driver to exist: %v", err)
}
// copy driver to temp bin
testDriverPath := filepath.Join(mkBinDir, "docker-machine-driver-hyperkit")
if err = ioext.CopyFile(testDataDriverPath, testDriverPath, false); err != nil {
return "", "", fmt.Errorf("failed to setup current hyperkit driver: %v", err)
}
// try to copy cached files to the temp minikube folder to avoid downloading of iso and preloads
_ = ioext.CopyDir(filepath.Join(localpath.MakeMiniPath("cache")), filepath.Join(mkDir, "cache"))
// change permission to allow driver to be executable
if err = os.Chmod(testDriverPath, 0755); err != nil {
return "", "", fmt.Errorf("failed to set driver permission: %v", err)
}
return temp, testDriverPath, nil
}

View File

@ -0,0 +1,2 @@
Starting minikube version 1.14 we do not update the installed hyperkit driver if its version is 1.11.0 or higher.
Have the hyperkit driver v1.11.0 here to test this behaviour.