datahaven/deploy/charts/node/templates/hpa.yaml
Steve Degosserie c3e6f1258b
feat: Deployment improvements & environmental overrides (#103)
This PR contains improvements to the DataHaven deployment
infrastructure:
1. Directory restructure: Moved from `deployment/` to `deploy/` (more
common for K8s / Helm -based deployment configs).
2. Added **local environment** support: updated CLI to support deploying
to a local K8s cluster.
3. Manual deployment script: `deploy/scripts/deploy.sh` for manual
deployments.
4. Environment-specific configurations: Structured values files for each
environment.
5. Chart organization: Renamed bridges-common-relay to relay for
clarity.

---------

Co-authored-by: Gonza Montiel <gon.montiel@gmail.com>
Co-authored-by: Gonza Montiel <gonzamontiel@users.noreply.github.com>
2025-06-26 13:48:33 +02:00

34 lines
980 B
YAML

{{ $fullname := include "node.fullname" . }}
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ $fullname }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: StatefulSet
name: {{ $fullname }}
minReplicas: {{ .Values.autoscaling.minReplicas | int }}
maxReplicas: {{ .Values.autoscaling.maxReplicas | int }}
metrics:
{{- if .Values.autoscaling.targetMemory }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemory | int }}
{{- end }}
{{- if .Values.autoscaling.targetCPU }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPU | int }}
{{- end }}
{{- with .Values.autoscaling.additionalMetrics }}
{{- toYaml . | nindent 4 }}
{{- end}}
{{- end }}