actions-runner-controller/controllers
Yusuke Kuoka f6ab66c55b
Do not delay min/maxReplicas propagation from HRA to RD due to caching (#406)
As part of #282, I have introduced some caching mechanism to avoid excessive GitHub API calls due to the autoscaling calculation involving GitHub API calls is executed on each Webhook event.

Apparently, it was saving the wrong value in the cache- The value was one after applying `HRA.Spec.{Max,Min}Replicas` so manual changes to {Max,Min}Replicas doesn't affect RunnerDeployment.Spec.Replicas until the cache expires. This isn't what I had wanted.

This patch fixes that, by changing the value being cached to one before applying {Min,Max}Replicas.

Additionally, I've also updated logging so that you observe which number was fetched from cache, and what number was suggested by either TotalNumberOfQueuedAndInProgressWorkflowRuns or PercentageRunnersBusy, and what was the final number used as the desired-replicas(after applying {Min,Max}Replicas).

Follow-up for #282
2021-03-19 12:58:02 +09:00
..
testdata Fix panic on webhook for user-owned repository (#344) 2021-02-23 08:05:25 +09:00
autoscaling.go Do not delay min/maxReplicas propagation from HRA to RD due to caching (#406) 2021-03-19 12:58:02 +09:00
autoscaling_test.go Do not delay min/maxReplicas propagation from HRA to RD due to caching (#406) 2021-03-19 12:58:02 +09:00
horizontal_runner_autoscaler_webhook.go Make webhook-based autoscaler github event logs more operator-friendly (#384) 2021-03-10 09:40:44 +09:00
horizontal_runner_autoscaler_webhook_on_check_run.go Add CheckRun.Names scale-up trigger configuration (#390) 2021-03-14 10:21:42 +09:00
horizontal_runner_autoscaler_webhook_on_pull_request.go feat: HorizontalRunnerAutoscaler Webhook server (#282) 2021-02-07 17:37:27 +09:00
horizontal_runner_autoscaler_webhook_on_push.go feat: HorizontalRunnerAutoscaler Webhook server (#282) 2021-02-07 17:37:27 +09:00
horizontal_runner_autoscaler_webhook_test.go handle GET requests in webhook hra (#378) 2021-03-09 08:46:27 +09:00
horizontalrunnerautoscaler_controller.go Do not delay min/maxReplicas propagation from HRA to RD due to caching (#406) 2021-03-19 12:58:02 +09:00
horizontalrunnerautoscaler_controller_test.go Fix HRA expired cache entries not cleaned up (#357) 2021-02-26 09:54:24 +09:00
integration_test.go Disable metrics-based autoscaling by default when scaleUpTriggers are enabled (#391) 2021-03-14 11:03:00 +09:00
runner_controller.go Do recheck runner registration timely (#405) 2021-03-19 11:02:47 +09:00
runnerdeployment_controller.go Reduce "No runner matching the specified labels was found" errors while runner replacement (#392) 2021-03-16 10:52:30 +09:00
runnerdeployment_controller_test.go Manage runner with label (#355) 2021-03-05 10:15:39 +09:00
runnerreplicaset_controller.go Manage runner with label (#355) 2021-03-05 10:15:39 +09:00
runnerreplicaset_controller_test.go Manage runner with label (#355) 2021-03-05 10:15:39 +09:00
suite_test.go feat: HorizontalRunnerAutoscaler Webhook server (#282) 2021-02-07 17:37:27 +09:00
utils.go feat: EKS IAM Roles for Service Accounts for Runner Pods (#226) 2020-12-08 17:56:06 +09:00
utils_test.go feat: EKS IAM Roles for Service Accounts for Runner Pods (#226) 2020-12-08 17:56:06 +09:00