当 githubConfigSecret 不存在时,永久删除 AutoscalingRunnerSet 条目

作者: KR-Ravindra创建于 2026年9月14日更新于 2026年9月14日

Checks

Controller Version

0.14.2 (gha-runner-scale-set-controller); same code on master at 03328aa14f6435462f6a2add1f5ba79247da6e09

Deployment Method

Helm

Checks

  • This isn't a question or user support case (For Q&A and community support, go to Discussions).
  • I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes

To Reproduce

  1. Install a gha-runner-scale-set release with minRunners: 0 and wait until the AutoscalingRunnerSet (ARS) carries the runner-scale-set-id annotation, i.e. the scale set is registered with the Actions service.
  2. Remove the configured secret: kubectl delete secret <githubConfigSecret> -n <ns> (drop its autoscalingrunnerset.actions.GitHub.com/cleanup-protection finalizer first if the chart created it).
  3. kubectl delete autoscalingrunnerset <name> -n <ns> (or helm uninstall, or delete the namespace).
  4. The ARS stays in Terminating indefinitely. The controller logs, on every requeue:
ERROR AutoscalingRunnerSet Failed to initialize Actions service client for updating a existing runner scale set {"error": "failed to resolve app config: failed to get Kubernetes secret: \"<ns>/<githubConfigSecret>\""}
ERROR AutoscalingRunnerSet Failed to delete runner scale set
ERROR AutoscalingRunnerSet Failed to clean up resources during deletion

The finalizer autoscalingrunnerset.actions.GitHub.com/finalizer is never removed, so kubectl delete / helm uninstall hang and a namespace containing the ARS can never finish terminating. Only manual intervention (kubectl patch ... --type=merge -p '{"metadata":{"finalizers":null}}') or recreating a secret with the old name unblocks it. The same happens whenever the secret is gone for good rather than temporarily: the namespace is being torn down and the secret went first, the secret was rotated to a new name and the old one deleted before the ARS, or Helm removed the secret before the ARS during uninstall.

Describe the bug

During deletion, Reconcile calls cleanUpResources, which ends with deleteRunnerScaleSet:

内容来源: actions/actions-runner-controller