Unverified Commit e04ccf55 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #63962 from hzxuzhonghu/fix-scheduler-options

Automatic merge from submit-queue. 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>. fix little bug in kube-scheduler options fix some little bugs in kube-scheduler options. **Release note**: ```release-note NONE ```
parents 7909712c be2a234a
...@@ -72,7 +72,7 @@ func (o *DeprecatedOptions) AddFlags(fs *pflag.FlagSet, cfg *componentconfig.Kub ...@@ -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
......
...@@ -153,7 +153,7 @@ func (o *CombinedInsecureServingOptions) Validate() []error { ...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment