actions / actions-runner-controller

Kubernetes controller for GitHub Actions self-hosted runners
Apache License 2.0
4.76k stars 1.12k forks source link

Idle count metric reports always 0 #3787

Open velkovb opened 3 weeks ago

velkovb commented 3 weeks ago

Checks

Controller Version

0.9.3

Deployment Method

Helm

Checks

To Reproduce

1. Set minRunners for a specific scale set to 4.
2. Go to the metrics endpoint of a listener pod.
3. Check `gha_idle_runners` metrics and it is 0.
4. Go to your runners settings in Github. Find the specific runner.
5. Search for the runner name and you will see 4 idle runners.

Describe the bug

gha_idle_runners is always returned as 0 despite there being idle runners.

Describe the expected behavior

gha_idle_runners is properly returned as the number of idle runners.

Additional Context

affinity:
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
      - matchExpressions:
        - key: role
          operator: In
          values:
          - spot
fullnameOverride: gha-runner-scale-set-controller
metrics:
  controllerManagerAddr: :8080
  listenerAddr: :8081
  listenerEndpoint: /metrics
priorityClassName: system-cluster-critical
replicaCount: 1
resources:
  limits:
    memory: 512Mi
  requests:
    cpu: 200m
    memory: 512Mi
tolerations:
- effect: NoSchedule
  key: pot
  operator: Equal
  value: "true"

Controller Logs

https://gist.github.com/velkovb/61706771a1b7a9d6f27af4d50c63ca35

Runner Pod Logs

There are no runner pods here.