Merge pull request #65833 from sttts/sttts-apiserver-highports

Automatic merge from submit-queue (batch tested with PRs 65805, 65811, 65833, 65488, 65857). 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>.

kube-scheduler: allow high ports in secure serving validation

Certain operating systems will select high port (>32768) when asked for a free port. This PR changes the validation to allow that.

```release-note
Allow kube-scheduler to listen on ports up to 65535.
```
This commit is contained in:
Kubernetes Submit Queue 2018-07-05 08:51:16 -07:00 committed by GitHub
commit 2fa1a2e77f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,8 +152,8 @@ func (o *CombinedInsecureServingOptions) Validate() []error {
errors := []error{}
if o.BindPort < 0 || o.BindPort > 32767 {
errors = append(errors, fmt.Errorf("--port %v must be between 0 and 32767, inclusive. 0 for turning off insecure (HTTP) port", o.BindPort))
if o.BindPort < 0 || o.BindPort > 65335 {
errors = append(errors, fmt.Errorf("--port %v must be between 0 and 65335, inclusive. 0 for turning off insecure (HTTP) port", o.BindPort))
}
if len(o.BindAddress) > 0 && net.ParseIP(o.BindAddress) == nil {