Merge pull request #51249 from tengqm/service-ip-cidr

Automatic merge from submit-queue (batch tested with PRs 59882, 59434, 57722, 60320, 51249). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Expose default service IP CIDR in apiserver

**What this PR does / why we need it**:
The `--service-cluster-ip-range` parameter of API server is very important for deploying Kubernetes on some clouds. The default CIDR "10.0.0.0/24" should be exposed at least from the API server's help message so that users have a better idea whether they need to change it.
This patch exposes this default value in API server's help message.

**Which issue this PR fixes** : fixes #51248

**Release note**:
```
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2018-02-24 18:43:39 -08:00
committed by GitHub
4 changed files with 11 additions and 8 deletions

View File

@@ -17,8 +17,13 @@ limitations under the License.
package options
import (
"net"
utilnet "k8s.io/apimachinery/pkg/util/net"
)
// DefaultServiceNodePortRange is the default port range for NodePort services.
var DefaultServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768}
// DefaultServiceIPCIDR is a CIDR notation of IP range from which to allocate service cluster IPs
var DefaultServiceIPCIDR net.IPNet = net.IPNet{IP: net.ParseIP("10.0.0.0"), Mask: net.CIDRMask(24, 32)}