-
Notifications
You must be signed in to change notification settings - Fork 365
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
fix: allow envoyHpa maxReplicas to be equal to minReplicas #2329
Conversation
Signed-off-by: Shahar Harari <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2329 +/- ##
==========================================
- Coverage 64.54% 64.50% -0.04%
==========================================
Files 112 112
Lines 15949 15949
==========================================
- Hits 10294 10288 -6
- Misses 5007 5013 +6
Partials 648 648 ☔ View full report in Codecov by Sentry. |
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'm curious why K8s allows maxReplicas
to be equal to minReplicas
.
imo, EG should leave the current validation as it is: maxReplicas
must bigger than minReplicas
, unless we have a strong reason to change it.
I would accept this PR to handle one use case - debugging something in EG while having hpa enabled but temporarily keeping the replicas constant, this can be achieved using replicas, but requires the user to delete and readd more config rather than simply editing fields |
Ha, this is a legitimate use case. I guess that's also why k8s allows that. |
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.
LGTM. Thanks!
What this PR does / why we need it:
According to hpa spec
maxReplicas
cannot be less thatminReplicas
. The current cel validation also forbids it to be equal tominReplicas
.This PR fixes the validation to be aligned with the spec and also adds a test.
Which issue(s) this PR fixes: N/A