Merge pull request #48797 from FengyunPan/fix-empty-cidr

Automatic merge from submit-queue (batch tested with PRs 48231, 47377, 48797, 49020, 49033)

Fix parsing empty CIDR

Fix #48795
Checking ClusterCIDR and ServiceCIDR before parsing them.

**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2017-07-17 19:37:45 -07:00
committed by GitHub
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,