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:
23
helm/ezscale-website/templates/hpa-app.yaml
Normal file
23
helm/ezscale-website/templates/hpa-app.yaml
Normal 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 }}
|
||||
Reference in New Issue
Block a user