Make service-range flag in controller-manager optional

This commit is contained in:
gmarek
2016-05-23 09:37:22 +02:00
parent a8ba289003
commit 08385b2c5f
2 changed files with 13 additions and 4 deletions

View File

@@ -265,7 +265,11 @@ func NewNodeController(
// Run starts an asynchronous loop that monitors the status of cluster nodes.
func (nc *NodeController) Run(period time.Duration) {
if nc.allocateNodeCIDRs {
nc.filterOutServiceRange()
if nc.serviceCIDR != nil {
nc.filterOutServiceRange()
} else {
glog.Info("No Service CIDR provided. Skipping filtering out service addresses.")
}
}
go nc.nodeController.Run(wait.NeverStop)