pull/8431/head
Priya Wadhwa 2020-06-09 13:49:22 -07:00
commit 07b04841ce
15 changed files with 257 additions and 98 deletions

View File

@ -613,6 +613,11 @@ func validateDriver(ds registry.DriverState, existing *config.ClusterConfig) {
exit.WithCodeT(exit.Unavailable, "The driver '{{.driver}}' is not supported on {{.os}}", out.V{"driver": name, "os": runtime.GOOS})
}
// if we are only downloading artifacts for a driver, we can stop validation here
if viper.GetBool("download-only") {
return
}
st := ds.State
glog.Infof("status for %s: %+v", name, st)

View File

@ -24,15 +24,20 @@ import (
"github.com/golang/glog"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/kubeconfig"
"k8s.io/minikube/pkg/minikube/localpath"
"k8s.io/minikube/pkg/minikube/machine"
"k8s.io/minikube/pkg/minikube/mustload"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/util/retry"
)
var stopAll bool
// stopCmd represents the stop command
var stopCmd = &cobra.Command{
Use: "stop",
@ -42,28 +47,54 @@ itself, leaving all files intact. The cluster can be started again with the "sta
Run: runStop,
}
func init() {
stopCmd.Flags().BoolVar(&stopAll, "all", false, "Set flag to stop all profiles (clusters)")
if err := viper.GetViper().BindPFlags(stopCmd.Flags()); err != nil {
exit.WithError("unable to bind flags", err)
}
RootCmd.AddCommand(stopCmd)
}
// runStop handles the executes the flow of "minikube stop"
func runStop(cmd *cobra.Command, args []string) {
cname := ClusterFlagValue()
api, cc := mustload.Partial(cname)
defer api.Close()
for _, n := range cc.Nodes {
machineName := driver.MachineName(*cc, n)
nonexistent := stop(api, machineName)
if !nonexistent {
out.T(out.Stopped, `Node "{{.node_name}}" stopped.`, out.V{"node_name": machineName})
// new code
var profilesToStop []string
if stopAll {
validProfiles, _, err := config.ListProfiles()
if err != nil {
glog.Warningf("'error loading profiles in minikube home %q: %v", localpath.MiniPath(), err)
}
for _, profile := range validProfiles {
profilesToStop = append(profilesToStop, profile.Name)
}
} else {
cname := ClusterFlagValue()
profilesToStop = append(profilesToStop, cname)
}
for _, profile := range profilesToStop {
// end new code
api, cc := mustload.Partial(profile)
defer api.Close()
if err := killMountProcess(); err != nil {
out.WarningT("Unable to kill mount process: {{.error}}", out.V{"error": err})
}
for _, n := range cc.Nodes {
machineName := driver.MachineName(*cc, n)
nonexistent := stop(api, machineName)
if err := kubeconfig.UnsetCurrentContext(cname, kubeconfig.PathFromEnv()); err != nil {
exit.WithError("update config", err)
if !nonexistent {
out.T(out.Stopped, `Node "{{.node_name}}" stopped.`, out.V{"node_name": machineName})
}
}
if err := killMountProcess(); err != nil {
out.WarningT("Unable to kill mount process: {{.error}}", out.V{"error": err})
}
if err := kubeconfig.UnsetCurrentContext(profile, kubeconfig.PathFromEnv()); err != nil {
exit.WithError("update config", err)
}
}
}

View File

@ -6,3 +6,5 @@ sha256 6c9bf278ae6e125a39f1ae419e5bd314162a743f6587d70b1b6be095ac32b9af eb5fa88c
sha256 50cc36636c32a343f4c9f5ab6b9f7f5edd5d6ef7c9c403793f799f6605597718 v2.0.3.tar.gz
sha256 93f7c127cb536fc60f4c08291fd34e99e492fdc6a36e6b0ddad97d868ecf10f7 29c336700f2999acf9db07662b4a61355076e64a.tar.gz
sha256 d82ad6c1e315f8310ed75fe6905f81dce61b61d55a156e9e04c9855e78e1e165 v2.0.6.tar.gz
sha256 abe4e1cc02505c81857c1eeced008a24b4dd41659d42a1e3395754fb063aef36 v2.0.7.tar.gz
sha256 a116b8422c65778bd677c29f55b3ceaae07d09da336f71bdc68fc7bb83d50e03 v2.0.17.tar.gz

View File

@ -4,8 +4,8 @@
#
################################################################################
CONMON_VERSION = v2.0.6
CONMON_COMMIT = 29c336700f2999acf9db07662b4a61355076e64a
CONMON_VERSION = v2.0.17
CONMON_COMMIT = 41877362fc4685d55e0473d2e4a1cbe5e1debee0
CONMON_SITE = https://github.com/containers/conmon/archive
CONMON_SOURCE = $(CONMON_VERSION).tar.gz
CONMON_LICENSE = Apache-2.0

View File

@ -1,9 +0,0 @@
#if !defined(CONFIG_H)
#define CONFIG_H
#define BUF_SIZE 8192
#define STDIO_BUF_SIZE 8192
#define DEFAULT_SOCKET_PATH "/var/run/crio"
#endif // CONFIG_H

View File

@ -12,3 +12,5 @@ sha256 05f9614c4d5970b4662499b84c270b0ab953596ee863dcd09c9dc7a2d2f09789 v1.16.0.
sha256 57e1ee990ef2d5af8b32c33a21b4998682608e3556dcf1d3349666f55e7d95b9 v1.16.1.tar.gz
sha256 23a797762e4544ee7c171ef138cfc1141a3f0acc2838d9965c2a58e53b16c3ae v1.17.0.tar.gz
sha256 7967e9218fdfb59d6005a9e19c1668469bc5566c2a35927cffe7de8656bb22c7 v1.17.1.tar.gz
sha256 865ded95aceb3a33a391b252522682de6b37b39498704c490b3a321dbefaafcb v1.18.0.tar.gz
sha256 794ddc36c2a20fde91fc6cc2c6f02ebdaea85c69b51b67f3994090dbbdbc2a50 v1.18.1.tar.gz

View File

@ -4,8 +4,8 @@
#
################################################################################
CRIO_BIN_VERSION = v1.17.1
CRIO_BIN_COMMIT = ee2de87bd8e2a7a84799476cb4fc4ce8a78fdf6d
CRIO_BIN_VERSION = v1.18.1
CRIO_BIN_COMMIT = 5cbf694c34f8d1af19eb873e39057663a4830635
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
@ -32,7 +32,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/"

1
go.sum
View File

@ -1050,7 +1050,6 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=

View File

@ -34,8 +34,11 @@ import (
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/daemon"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/google/go-containerregistry/pkg/v1/tarball"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/localpath"
)
var defaultPlatform = v1.Platform{
@ -94,6 +97,32 @@ func ExistsImageInDaemon(img string) bool {
return false
}
// LoadFromTarball checks if the image exists as a tarball and tries to load it to the local daemon
// TODO: Pass in if we are loading to docker or podman so this function can also be used for podman
func LoadFromTarball(binary, img string) error {
p := filepath.Join(constants.ImageCacheDir, img)
p = localpath.SanitizeCacheDir(p)
switch binary {
case driver.Podman:
return fmt.Errorf("not yet implemented, see issue #8426")
default:
tag, err := name.NewTag(Tag(img))
if err != nil {
return errors.Wrap(err, "new tag")
}
i, err := tarball.ImageFromPath(p, &tag)
if err != nil {
return errors.Wrap(err, "tarball")
}
_, err = daemon.Write(tag, i)
return err
}
}
// Tag returns just the image with the tag
// eg image:tag@sha256:digest -> image:tag if there is an associated tag
// if not possible, just return the initial img

View File

@ -31,6 +31,7 @@ import (
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/download"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/image"
"k8s.io/minikube/pkg/minikube/localpath"
@ -102,7 +103,7 @@ func doCacheBinaries(k8sVersion string) error {
}
// beginDownloadKicBaseImage downloads the kic image
func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig) {
func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, downloadOnly bool) {
if cc.Driver != "docker" {
// TODO: driver == "podman"
glog.Info("Driver isn't docker, skipping base image download")
@ -117,17 +118,36 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig) {
out.T(out.Pulling, "Pulling base image ...")
g.Go(func() error {
// TODO #8004 : make base-image respect --image-repository
var finalImg string
// If we end up using a fallback image, notify the user
defer func() {
if finalImg != "" && finalImg != cc.KicBaseImage {
out.WarningT(fmt.Sprintf("minikube was unable to download %s, but successfully downloaded %s as a fallback image", image.Tag(cc.KicBaseImage), image.Tag(finalImg)))
cc.KicBaseImage = finalImg
}
}()
for _, img := range append([]string{cc.KicBaseImage}, kic.FallbackImages...) {
if err := image.LoadFromTarball(driver.Docker, img); err == nil {
glog.Infof("successfully loaded %s from cached tarball", img)
// strip the digest from the img before saving it in the config
// because loading an image from tarball to daemon doesn't load the digest
finalImg = image.Tag(img)
return nil
}
glog.Infof("Downloading %s to local daemon", img)
err := image.WriteImageToDaemon(img)
if err == nil {
if img != cc.KicBaseImage {
out.WarningT(fmt.Sprintf("minikube was unable to download %s, but successfully downloaded %s\n minikube will use %s as a fallback image", image.Tag(cc.KicBaseImage), image.Tag(img), image.Tag(img)))
cc.KicBaseImage = img
}
glog.Infof("successfully downloaded %s", img)
finalImg = img
return nil
}
if downloadOnly {
if err := image.SaveToDir([]string{img}, constants.ImageCacheDir); err == nil {
glog.Infof("successfully saved %s as a tarball", img)
finalImg = img
return nil
}
}
glog.Infof("failed to download %s, will try fallback image if available: %v", img, err)
}
return fmt.Errorf("failed to download kic base image or any fallback image")

View File

@ -195,7 +195,7 @@ func Provision(cc *config.ClusterConfig, n *config.Node, apiServer bool) (comman
}
if driver.IsKIC(cc.Driver) {
beginDownloadKicBaseImage(&kicGroup, cc)
beginDownloadKicBaseImage(&kicGroup, cc, viper.GetBool("download-only"))
}
if !driver.BareMetal(cc.Driver) {

View File

@ -159,6 +159,11 @@ no = 'Sorry to hear that. Please <a href="https://github.com/kubernetes/minikube
url = "https://minikube.sigs.k8s.io/docs/contrib/triage/"
icon = "fas fa-comments"
desc = "All community members are welcome and encouraged to join and help us triage minikube!"
[[params.links.meetings]]
name = "Kanban board"
url = "http://tinyurl.com/minikube-kanban"
icon = "fas fa-comments"
desc = "Kanban visualization of the next milestone"
# Related pages - does not appear to work yet

View File

@ -22,6 +22,7 @@ minikube stop [flags]
### Options
```
--all Set flag to stop all profiles (clusters)
-h, --help help for stop
```