mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-11-26 19:30:47 +00:00
25 lines
770 B
YAML
25 lines
770 B
YAML
{{- if and .Values.worker.enabled .Values.worker.autoscaling.enabled }}
|
|
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: {{ include "monitoring-platform.fullname" . }}-worker
|
|
labels:
|
|
{{- include "monitoring-platform.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: worker
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: {{ include "monitoring-platform.fullname" . }}-worker
|
|
minReplicas: {{ .Values.worker.autoscaling.minReplicas }}
|
|
maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }}
|
|
metrics:
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage }}
|
|
{{- end }}
|
|
|