From 9bcc587defa6ca01018df8031d2e9a6e3929ecb0 Mon Sep 17 00:00:00 2001 From: Sunny Beatteay Date: Mon, 29 Jun 2020 14:11:20 -0400 Subject: [PATCH] update crio to cri-o in docs and help text --- cmd/minikube/cmd/start.go | 6 +++++- pkg/minikube/cruntime/cruntime.go | 2 +- site/content/en/docs/commands/start.md | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 2ce6033dd1d4..e7962a7eecdb 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -857,8 +857,12 @@ 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, "crio") + var validRuntime bool - for _, option := range cruntime.ValidRuntimes() { + for _, option := range validOptions { if runtime == option { validRuntime = true } diff --git a/pkg/minikube/cruntime/cruntime.go b/pkg/minikube/cruntime/cruntime.go index eaaafb43fc50..c339809eaf86 100644 --- a/pkg/minikube/cruntime/cruntime.go +++ b/pkg/minikube/cruntime/cruntime.go @@ -49,7 +49,7 @@ func (cs ContainerState) String() string { // ValidRuntimes lists the supported container runtimes func ValidRuntimes() []string { - return []string{"docker", "crio", "containerd"} + return []string{"docker", "cri-o", "containerd"} } // CommandRunner is the subset of command.Runner this package consumes diff --git a/site/content/en/docs/commands/start.md b/site/content/en/docs/commands/start.md index 3e38d75656eb..980a82e2612c 100644 --- a/site/content/en/docs/commands/start.md +++ b/site/content/en/docs/commands/start.md @@ -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:v0.0.10@sha256: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.