fix(hpa): create pulp-web HPA when ingress_type=ingress#1648
Conversation
The web HPA gate in hpaController used '!isRoute && !isIngress', which skipped HPA creation whenever ingress_type=ingress even though pulp-web is still deployed in that mode unless the ingress controller is nginx-supported. Align the gate with needsPulpWeb() so the HPA follows the deployment. Add hpa_test.go covering the four ingress_type / IsNginxIngress combinations to guard the gate against regressions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mouchar The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @mouchar. Thanks for your PR. I'm waiting for a pulp member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
hpaControllerused!isRoute && !isIngress, which skipped HPA creation wheneveringress_type=ingress— even thoughpulp-webis still deployed in that mode unless the ingress controller is nginx-supported.needsPulpWeb()(controllers/repo_manager/utils.go:354) so the HPA follows the deployment. Without this, users enablingspec.web.hpawithingress_type=ingressget no HorizontalPodAutoscaler forpulp-web, while api/content/worker HPAs work fine.controllers/repo_manager/hpa_test.gowith a table-driven test covering all fouringress_type×IsNginxIngresscombinations to guard the gate against regressions.Test plan
go build ./...passesgo test ./controllers/repo_manager/ -run TestHpaControllerWebGating -vpassesingress_type=ingress+ non-nginx subtest fails — exactly the bug case) and passes after the fixspec.ingress_type=ingressandspec.web.hpa.enabled=true; confirm thepulp-webHPA is created