Skip to content

Commit

Permalink
Add warning for --network-plugin=cni (CNI has to be provided, see --cni)
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Caderno <kaderno@gmail.com>
  • Loading branch information
kadern0 committed Oct 12, 2020
1 parent 2823462 commit 1d85d6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k
glog.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(),
Expand Down Expand Up @@ -321,7 +326,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,
Expand Down

0 comments on commit 1d85d6e

Please sign in to comment.