Skip to content

Commit

Permalink
Merge pull request #79346 from ncdc/fix-max-port
Browse files Browse the repository at this point in the history
Fix insecure max bind port value to 65535 for scheduler & apiserver
  • Loading branch information
k8s-ci-robot committed Jun 25, 2019
2 parents 896c901 + 9bba2c9 commit 5267a3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/kube-scheduler/app/options/insecure_serving.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ func (o *CombinedInsecureServingOptions) Validate() []error {

errors := []error{}

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 o.BindPort < 0 || o.BindPort > 65535 {
errors = append(errors, fmt.Errorf("--port %v must be between 0 and 65535, inclusive. 0 for turning off insecure (HTTP) port", o.BindPort))
}

if len(o.BindAddress) > 0 && net.ParseIP(o.BindAddress) == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func (s *DeprecatedInsecureServingOptions) Validate() []error {

errors := []error{}

if s.BindPort < 0 || s.BindPort > 65335 {
errors = append(errors, fmt.Errorf("insecure port %v must be between 0 and 65335, inclusive. 0 for turning off insecure (HTTP) port", s.BindPort))
if s.BindPort < 0 || s.BindPort > 65535 {
errors = append(errors, fmt.Errorf("insecure port %v must be between 0 and 65535, inclusive. 0 for turning off insecure (HTTP) port", s.BindPort))
}

return errors
Expand Down

0 comments on commit 5267a3d

Please sign in to comment.