feat(helm): HPA for app deployment (toggleable, CPU-based)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-26 22:54:08 -04:00
parent 02c8abb67b
commit 4b63fec032

View File

@@ -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 }}