Skip to content

Commit

Permalink
Added deprecation warning for --network-plugin=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 1, 2020
1 parent 2823462 commit 4ac80bd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,15 @@ 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" {
glog.Errorf("Found deprecated --network-plugin=cni flag (new flag: --cni), setting --cni=auto if not already set")
if chosenCNI == "" {
chosenCNI = "auto"
}
chosenNetworkPlugin = ""
}

cc = config.ClusterConfig{
Name: ClusterFlagValue(),
Expand Down Expand Up @@ -321,7 +330,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 4ac80bd

Please sign in to comment.