ensure that 'crio' is used for k8s config
parent
9bcc587def
commit
28238150f5
|
|
@ -859,13 +859,18 @@ func validateFlags(cmd *cobra.Command, drvName string) {
|
|||
|
||||
validOptions := cruntime.ValidRuntimes()
|
||||
// `crio` is accepted as an alternative spelling to `cri-o`
|
||||
validOptions = append(validOptions, "crio")
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -281,7 +281,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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue