Commit e2ab612
authored
fix: don't set Deployment replicas when an HPA is configured (#9594)
* fix: don't set Deployment replicas when an HPA is configured
Envoy Gateway applies the proxy and rate limit Deployments with a
server-side apply patch using ForceOwnership, so rendering spec.replicas
made envoy-gateway the owner of that field. Every subsequent
reconciliation then forced the replica count back to the statically
configured value, overriding whatever the HPA had computed.
Omit the replicas field from the rendered Deployment when an HPA is
configured, so Envoy Gateway never claims ownership of spec.replicas and
the HPA is free to scale the Deployment. This is the behavior already
documented for both envoyHpa and rateLimitHpa, but it was never
implemented. Use minReplicas to set a lower bound on the replica count
instead.
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
* docs: add release note
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
* test: regenerate helm CRD golden files
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
---------
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>1 parent f63003f commit e2ab612
15 files changed
Lines changed: 655 additions & 14 deletions
File tree
- api/v1alpha1
- charts
- gateway-crds-helm/templates/generated
- gateway-helm/charts/crds/crds/generated
- internal/infrastructure/kubernetes
- proxy
- testdata/deployments
- ratelimit
- testdata/deployments
- release-notes/current/bug_fixes
- site/content/en/latest
- api
- tasks/operations
- test/helm/gateway-crds-helm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
531 | 534 | | |
532 | 535 | | |
533 | 536 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10388 | 10388 | | |
10389 | 10389 | | |
10390 | 10390 | | |
10391 | | - | |
10392 | | - | |
| 10391 | + | |
| 10392 | + | |
| 10393 | + | |
| 10394 | + | |
| 10395 | + | |
10393 | 10396 | | |
10394 | 10397 | | |
10395 | 10398 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10387 | 10387 | | |
10388 | 10388 | | |
10389 | 10389 | | |
10390 | | - | |
10391 | | - | |
| 10390 | + | |
| 10391 | + | |
| 10392 | + | |
| 10393 | + | |
| 10394 | + | |
10392 | 10395 | | |
10393 | 10396 | | |
10394 | 10397 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
396 | 405 | | |
397 | 406 | | |
398 | 407 | | |
| |||
405 | 414 | | |
406 | 415 | | |
407 | 416 | | |
408 | | - | |
| 417 | + | |
409 | 418 | | |
410 | 419 | | |
411 | 420 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
674 | 675 | | |
675 | 676 | | |
676 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
677 | 693 | | |
678 | 694 | | |
679 | 695 | | |
| |||
693 | 709 | | |
694 | 710 | | |
695 | 711 | | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
696 | 715 | | |
697 | 716 | | |
698 | 717 | | |
| |||
0 commit comments