-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathhpa-dataplane.yaml
29 lines (29 loc) · 1014 Bytes
/
hpa-dataplane.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{{- if .Values.controlplane.autoscaling.enabled }}
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "txdc.fullname" . }}-dataplane
labels:
{{- include "txdc.dataplane.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "txdc.fullname" . }}-dataplane
minReplicas: {{ .Values.dataplane.autoscaling.minReplicas }}
maxReplicas: {{ .Values.dataplane.autoscaling.maxReplicas }}
metrics:
{{- if .Values.dataplane.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.dataplane.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.dataplane.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.dataplane.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}