{{- if .Values.server.autoscaling.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: teamclaw-server labels: {{- include "teamclaw.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: teamclaw-server minReplicas: {{ .Values.server.autoscaling.min }} maxReplicas: {{ .Values.server.autoscaling.max }} metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: {{ .Values.server.autoscaling.targetCPU }} {{- end }}