mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #63185 from hanxiaoshuai/fixbug0426
Automatic merge from submit-queue (batch tested with PRs 63246, 63185). 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>. add checks validation MinRequestTimeout of ServerRunOptions **What this PR does / why we need it**: add checks validation MinRequestTimeout of ServerRunOptions **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: I think we should check MinRequestTimeout > 0 (like RequestTimeout), in Validate() of ServerRunOptions. If it is not necessary, close this PR.Thanks **Release note**: ```release-note NONE ```
This commit is contained in:
commit
afd93b6e46
@ -103,6 +103,10 @@ func (s *ServerRunOptions) Validate() []error {
|
|||||||
errors = append(errors, fmt.Errorf("--request-timeout can not be negative value"))
|
errors = append(errors, fmt.Errorf("--request-timeout can not be negative value"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.MinRequestTimeout < 0 {
|
||||||
|
errors = append(errors, fmt.Errorf("--min-request-timeout can not be negative value"))
|
||||||
|
}
|
||||||
|
|
||||||
return errors
|
return errors
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user