actions / actions-runner-controller

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

Webhook Based horizontalrunnerautoscaler can't use Additional Autoscaling Prometheus Metrics #2799

Open newdeal123 opened 1 year ago

newdeal123 commented 1 year ago

Checks

Controller Version

0.27.4

Helm Chart Version

0.23.3

CertManager Version

1.7.1

Deployment Method

Helm

cert-manager installation

I installed cert-manager correctly by helm (v1.7.1)

Checks

Resource Definitions

apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
metadata:
  namespace: github-actions
  name: github-actions-hra
spec:
  minReplicas: 1
  maxReplicas: 20
  scaleTargetRef:
    kind: RunnerDeployment
    name: github-actions-runner
  scheduledOverrides:
  - startTime: "2023-07-26T00:00:00Z"
    endTime: "2023-07-26T12:00:00Z"
    recurrenceRule:
      frequency: Daily
    minReplicas: 2
  scaleUpTriggers:
    - githubEvent:
        workflowJob: {}
      duration: "60m"

To Reproduce

1. set `metrics.serviceMonitor.enabled` to `true`, `actionsMetricsServer.enabled` to `true`
2. install helm chart
3. check prometheus dashboard
4. can see only 3 HorizontalRunnerAutoscaler metrics.

Describe the bug

at first, I see this discussions.

I expected various promethus metrics for hra (because this PR is merged) , but I can see only 3 metrics. This means that the newly added 10 metric was not visible.

Looking at the discussion history, it seems that there are many users who experience the same issues as me.

https://github.com/actions/actions-runner-controller/blob/dcb64f0b9e889f4751bf257f2a37632ce10a3e10/controllers/actions.summerwind.net/autoscaling.go#L51-L58

After reviewing the internal code, it is determined that additional metrics are not available for webhook based hra.

Describe the expected behavior

Support Webhook Based horizontalrunnerautoscaler to use Additional Autoscaling Prometheus Metrics

Whole Controller Logs

.

Whole Runner Pod Logs

.

Additional Context

No response

github-actions[bot] commented 1 year ago

Hello! Thank you for filing an issue.

The maintainers will triage your issue shortly.

In the meantime, please take a look at the troubleshooting guide for bug reports.

If this is a feature request, please review our contribution guidelines.

fralvarop commented 11 months ago

Same issue here. Any plans on fixing it?

m-perrott commented 11 months ago

Same issue here.

sawyerward commented 11 months ago

I am experiencing the same issue.