feat(forgejo-runner): add hpa behavior support

Allows customizing HPA behaviors when autoscaling is enabled.
This commit is contained in:
Calle Englund 2024-10-12 00:52:43 +02:00
parent 7df49a6afa
commit b96fbe561e
No known key found for this signature in database
GPG key ID: 78D9BF4A13F75F59
2 changed files with 17 additions and 0 deletions

View file

@ -12,6 +12,10 @@ spec:
name: {{ include "forgejo-runner.fullname" . }} name: {{ include "forgejo-runner.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }} minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }}
{{- with .Values.autoscaling.behavior }}
behavior:
{{- toYaml . | nindent 4 }}
{{- end }}
metrics: metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }} {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource - type: Resource

View file

@ -191,6 +191,19 @@ autoscaling:
enabled: false enabled: false
minReplicas: 1 minReplicas: 1
maxReplicas: 100 maxReplicas: 100
behavior: {}
# scaleDown:
# stabilizationWindowSeconds: 300
# policies:
# - type: Pods
# value: 1
# periodSeconds: 60
# scaleUp:
# stabilizationWindowSeconds: 0
# policies:
# - type: Pods
# value: 1
# periodSeconds: 60
targetCPUUtilizationPercentage: 80 targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80