mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #79346 from ncdc/fix-max-port
Fix insecure max bind port value to 65535 for scheduler & apiserver
This commit is contained in:
commit
5267a3dc73
@ -152,8 +152,8 @@ func (o *CombinedInsecureServingOptions) Validate() []error {
|
|||||||
|
|
||||||
errors := []error{}
|
errors := []error{}
|
||||||
|
|
||||||
if o.BindPort < 0 || o.BindPort > 65335 {
|
if o.BindPort < 0 || o.BindPort > 65535 {
|
||||||
errors = append(errors, fmt.Errorf("--port %v must be between 0 and 65335, inclusive. 0 for turning off insecure (HTTP) port", o.BindPort))
|
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 {
|
if len(o.BindAddress) > 0 && net.ParseIP(o.BindAddress) == nil {
|
||||||
|
@ -54,8 +54,8 @@ func (s *DeprecatedInsecureServingOptions) Validate() []error {
|
|||||||
|
|
||||||
errors := []error{}
|
errors := []error{}
|
||||||
|
|
||||||
if s.BindPort < 0 || s.BindPort > 65335 {
|
if s.BindPort < 0 || s.BindPort > 65535 {
|
||||||
errors = append(errors, fmt.Errorf("insecure port %v must be between 0 and 65335, inclusive. 0 for turning off insecure (HTTP) port", s.BindPort))
|
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
|
return errors
|
||||||
|
Loading…
Reference in New Issue
Block a user