Repository navigation
fix: install KEDA HTTP add-on at 1 replica in CI - #4173
Conversation
|
Hi @Elvand-Lie. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain 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. |
lkingland
left a comment
There was a problem hiding this comment.
Thanks @Elvand-Lie, good catch that the HPA undoes the scale.
Instead of post-hoc patches, we should be installing the keda add-on with the right settings from the start.
For example, using the same way networking() in hack/cluster.sh installs a configured Contour: fetch the release manifest, set the interceptor's minReplicaCount and both Deployments' replicas to 1, then apply it. With this patch, the interceptor only drops about six minutes in, after the E2Es are already executing.
Assuming that works, we should open a follow-up issue to do the same for local dev clusters when func cluster create --keda!
/ok-to-test
In CI, applying the upstream KEDA HTTP add-on manifest starts both the interceptor and scaler Deployments at 3 replicas and creates the interceptor ScaledObject with minReplicaCount 3. Scaling post-hoc is undone by the HPA, and patching minReplicaCount post-hoc still waits for the HPA stabilization window after E2Es have started. Transform the release manifest before server-side apply when GITHUB_ACTIONS=true, setting both Deployments' replicas and the interceptor ScaledObject's minReplicaCount to 1 in both hack/cluster.sh and pkg/cluster/keda.go. Add unit tests covering installKedaHTTPAddon and reduceKedaHTTPAddonReplicas. Signed-off-by: Elvand Lie Nababan <elvandlie@gmail.com>
57c6765 to
36fa71f
Compare
|
Thanks @lkingland, updated to configure the KEDA HTTP add-on manifest before Once CI confirms this works cleanly, I'll open the follow-up issue for local dev clusters with |
|
Thanks @Elvand-Lie, this is what I had in mind, and CI ran through the new install path cleanly. /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Elvand-Lie, lkingland The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
With
GITHUB_ACTIONS=true,hack/cluster.shandfunc cluster createpreviously applied the upstream KEDA HTTP add-on manifest (v0.12.0) and scaled the Deployments down afterward. Because the add-on'sScaledObjectsetsminReplicaCount: 3, the HPA undoeskubectl scale --replicas=1, and patchingminReplicaCountafter install still starts 3 replicas and waits through the HPA's 5-minute stabilization window while tests are already running.Configure the manifest before
kubectl apply --server-sidewhenGITHUB_ACTIONS=true, matching hownetworking()installs Contour: set bothkeda-add-ons-http-interceptorandkeda-add-ons-http-scalerDeployments toreplicas: 1and the interceptorScaledObjecttominReplicaCount: 1. Non-CI installs keep the upstream defaults unchanged.Changes
replicasandScaledObjectminReplicaCountto1viayqbeforekubectl apply --server-side -f -inhack/cluster.shwhenGITHUB_ACTIONS=truepkg/cluster/keda.go(reduceKedaHTTPAddonReplicas) and remove the post-hoc scaling blockpkg/cluster/keda_test.gocoveringinstallKedaHTTPAddon(CI and non-CI paths) andreduceKedaHTTPAddonReplicas/kind bug
Testing
go test -v -race -count=1 ./pkg/cluster/...andgo vet ./pkg/cluster/...passyqv4.50.1 pipeline (hack/cluster.sh) andreduceKedaHTTPAddonReplicas(pkg/cluster/keda.go) against the realv0.12.0release manifest: all 23 documents match semantically and only the 3 target fields change from3to1bash -n hack/cluster.shpassesRelease Note
Docs