-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Validate default max scale is set if max scale limit is enabled #10921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If a non zero scale limit is set and no default is provided the "out of the box" situation for ksvcs is invalid. The operator should provide a reasonable non-infinite default for users if a limit is set.
pkg/autoscaler/config/config.go
Outdated
} | ||
|
||
if lc.MaxScale < minMaxScale || (lc.MaxScaleLimit > 0 && lc.MaxScale > lc.MaxScaleLimit) { | ||
return nil, fmt.Errorf("max-scale = %d, must be in [%d, max-scale-limit] range", minMaxScale, lc.MaxScale) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the args are in reverse order here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, oops! good catch
Codecov Report
@@ Coverage Diff @@
## main #10921 +/- ##
==========================================
- Coverage 88.04% 88.02% -0.02%
==========================================
Files 188 188
Lines 9100 9103 +3
==========================================
+ Hits 8012 8013 +1
- Misses 833 834 +1
- Partials 255 256 +1
Continue to review full report at Codecov.
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vagababov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/retest
/test pull-knative-serving-istio-stable-no-mesh |
If a non zero max scale limit is set and no default max scale is provided the "out of the box" situation for ksvcs is invalid (a default ksvc without annotations will fail validation). The operator should provide a reasonable - non-infinite - default for users if a limit is set.
See #10825, #10847.
/assign @dprotaso @markusthoemmes