-
Notifications
You must be signed in to change notification settings - Fork 603
fix: let HPA manage envoy-gateway replicas when enabled #7565
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: let HPA manage envoy-gateway replicas when enabled #7565
Conversation
6df1084 to
d3b6ef9
Compare
|
thanks, can you add a test in https://github.com/envoyproxy/gateway/tree/main/test/helm as well as run |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7565 +/- ##
==========================================
+ Coverage 72.28% 72.31% +0.03%
==========================================
Files 232 232
Lines 34114 34114
==========================================
+ Hits 24658 24670 +12
+ Misses 7679 7672 -7
+ Partials 1777 1772 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Wrap the Deployment’s `spec.replicas` in `{{- if not .Values.hpa.enabled
}}` so the field is only rendered when autoscaling is disabled. This
prevents GitOps drift when an HPA is driving scale decisions.
Signed-off-by: Juho Syrjänen <juho.syrjanen@metacoregames.com>
c505242 to
ece2469
Compare
@arkodg Added a new test for when HPA is disabled and removed the replica specification from the original HPA test. 👍 |
|
@envoyproxy/gateway-maintainers @envoyproxy/gateway-reviewers should we disable replica when hpa is enabled or ask the user to comment out |
Signed-off-by: Juho Syrjänen <juho.syrjanen@metacoregames.com>
|
Seems like me local linter prefers " over '... I reran the generation, my bad! |
|
hi @juhosyrjanen :) |
Oh hi there! :) I will update this as per your comment in a bit! |
Signed-off-by: Juho Syrjänen <juho.syrjanen@metacoregames.com>
|
It seems that other OSS projects also omit the istio : https://github.com/istio/istio/blob/master/manifests/charts/gateway/templates/deployment.yaml#L13 |
|
/retest |
Description:
This change wraps the Deployment’s spec.replicas field in:
{{- if not .Values.hpa.enabled }}, so that the replicas value is only rendered when Horizontal Pod Autoscaling is disabled.When an HPA is managing the replica count, this prevents GitOps tools from continually attempting to reconcile the Deployment back to a fixed replica value, eliminating unnecessary drift.
Validation:
With generated temporary Helm values:
When HPA is enabled:
Fixes #7560