Fix parsing empty CIDR

Fix #48795
Checking ClusterCIDR and ServiceCIDR before parsing them.
This commit is contained in:
FengyunPan
2017-07-13 21:08:43 +08:00
parent e11020fa39
commit dfc8b667a2
3 changed files with 30 additions and 11 deletions

View File

@@ -64,6 +64,11 @@ func New(routes cloudprovider.Routes, kubeClient clientset.Interface, nodeInform
if kubeClient != nil && kubeClient.Core().RESTClient().GetRateLimiter() != nil {
metrics.RegisterMetricAndTrackRateLimiterUsage("route_controller", kubeClient.Core().RESTClient().GetRateLimiter())
}
if clusterCIDR == nil {
glog.Fatal("RouteController: Must specify clusterCIDR.")
}
rc := &RouteController{
routes: routes,
kubeClient: kubeClient,