Radosław Piliszek b2532043f5 Init repo from the component-template
Commit 201f46f44076c44f225e3a5f8cfceeb2f717c7ae

Change-Id: Ie7a7bb9a5b74305320700c27c0ff528ea7dabe0d
2023-07-12 22:07:21 +02:00

29 lines
982 B
YAML

{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "nebulous-iot-dpp-orchestrator.fullname" . }}
labels:
{{- include "nebulous-iot-dpp-orchestrator.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "nebulous-iot-dpp-orchestrator.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}