fix little bug in kube-scheduler options

pull/8/head
xuzhonghu 2018-05-17 16:59:39 +08:00
parent da8e25c63d
commit be2a234af5
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ func (o *DeprecatedOptions) AddFlags(fs *pflag.FlagSet, cfg *componentconfig.Kub
// Validate validates the deprecated scheduler options. // Validate validates the deprecated scheduler options.
func (o *DeprecatedOptions) Validate() []error { func (o *DeprecatedOptions) Validate() []error {
if o != nil { if o == nil {
return nil return nil
} }
return nil return nil

View File

@ -153,7 +153,7 @@ func (o *CombinedInsecureServingOptions) Validate() []error {
errors := []error{} errors := []error{}
if o.BindPort <= 0 || o.BindPort > 32767 { if o.BindPort <= 0 || o.BindPort > 32767 {
errors = append(errors, fmt.Errorf("--insecure-port %v must be between 0 and 32767, inclusive. 0 for turning off insecure (HTTP) port", o.BindPort)) errors = append(errors, fmt.Errorf("--port %v must be between 0 and 32767, 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 {