Drone-runner-docker: Cannot enable autoscaling in 1.25

Hey!
I guess in Kubernetes 1.25 they removed “autoscaling/v2beta1”. If I try to upgrade my drone-runner-docker I get the following error:

Error: UPGRADE FAILED: resource mapping not found for name: "drone-runner-docker" namespace: "" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
ensure CRDs are installed first

Available CRD’s are:

autoscaling/v1
autoscaling/v2
autoscaling/v2beta2

BR,
Panda

Hello @panda

Thanks for reporting this.

I think if we update hpa.yaml in the repo with this logic, it should work

{{- if .Values.autoscaling.enabled }}
{{- if .Capabilities.APIVersions.Has "autoscaling/v2" }}
apiVersion: autoscaling/v2
{{- else }}
apiVersion: autoscaling/v2beta2
{{- end }}

Are you comfortable submitting a pull request with that change? Thanks

Done: Fix autoscaling by pandalec · Pull Request #107 · drone/charts · GitHub

Thanks!

I would be interested to hear how well autoscaling is working for you. I definitely need to add some documentation on using HPA with the docker runner chart.

drone-runner-docker.1729fa8de33a58df
FailedGetResourceMetric
failed to get memory utilization: missing request for memory
horizontal-pod-autoscaler 

Damn. Gonna disable memory for now

So, now it’s working. Problem is, Helm Chart isn’t providing resources for all its containers: dind and gc have no resources defined. I added a new PR with my local changes. HPA is now working and happily scaling around