Add cni default for alternative container runtimes

If using an alternative container runtime, and not having set
any other parameters already, default to cni plugin and config.
pull/3617/head
Anders F Björklund 2019-02-02 18:34:43 +01:00
parent 1cb2ba06e1
commit 6e7fc9dbf5
1 changed files with 9 additions and 0 deletions

View File

@ -235,6 +235,15 @@ func runStart(cmd *cobra.Command, args []string) {
glog.Errorln("Error writing crictl config: ", err)
}
}
// default network plugin (cni)
if selectedContainerRuntime != "" {
if !viper.IsSet(networkPlugin) {
selectedNetworkPlugin = "cni"
if !viper.IsSet(enableDefaultCNI) {
selectedEnableDefaultCNI = true
}
}
}
selectedKubernetesVersion := viper.GetString(kubernetesVersion)
if strings.Compare(selectedKubernetesVersion, "") == 0 {