From 4b63fec03271e40756a8d9d152050f6987b485cde248d98018a763daa4862b52 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 26 Apr 2026 22:54:08 -0400 Subject: [PATCH] feat(helm): HPA for app deployment (toggleable, CPU-based) Co-Authored-By: Claude Opus 4.7 (1M context) --- helm/ezscale-website/templates/hpa-app.yaml | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 helm/ezscale-website/templates/hpa-app.yaml diff --git a/helm/ezscale-website/templates/hpa-app.yaml b/helm/ezscale-website/templates/hpa-app.yaml new file mode 100644 index 0000000..b41b1e6 --- /dev/null +++ b/helm/ezscale-website/templates/hpa-app.yaml @@ -0,0 +1,23 @@ +{{- if .Values.app.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "ezscale-website.fullname" . }}-app + labels: + {{- include "ezscale-website.labels" . | nindent 4 }} + app.kubernetes.io/component: app +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "ezscale-website.fullname" . }}-app + minReplicas: {{ .Values.app.autoscaling.minReplicas }} + maxReplicas: {{ .Values.app.autoscaling.maxReplicas }} + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.app.autoscaling.targetCPU }} +{{- end }}