exponential-smoothing-predi.../charts/nebulous-exponential-smoothing-predictor/templates/hpa.yaml
jmarchel c7ea7b0db9 Init repo from the component-template
Change-Id: I0b3a2536c030232add9ff114d3d81f7f08bb69da
2024-01-04 20:11:39 +01:00

29 lines
1015 B
YAML

{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "nebulous-exponential-smoothing-predictor.fullname" . }}
labels:
{{- include "nebulous-exponential-smoothing-predictor.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "nebulous-exponential-smoothing-predictor.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 }}