|
|
|
@ -1,32 +0,0 @@ |
|
|
|
{{- if .Values.api.autoscaling.enabled }} |
|
|
|
apiVersion: autoscaling/v2 |
|
|
|
kind: HorizontalPodAutoscaler |
|
|
|
metadata: |
|
|
|
name: {{ include "textbee.fullname" . }}-api-hpa |
|
|
|
labels: |
|
|
|
{{- include "textbee.labels" . | nindent 4 }} |
|
|
|
spec: |
|
|
|
scaleTargetRef: |
|
|
|
apiVersion: apps/v1 |
|
|
|
kind: Deployment |
|
|
|
name: {{ include "textbee.fullname" . }}-api |
|
|
|
minReplicas: {{ .Values.api.autoscaling.minReplicas }} |
|
|
|
maxReplicas: {{ .Values.api.autoscaling.maxReplicas }} |
|
|
|
metrics: |
|
|
|
{{- if .Values.api.autoscaling.targetCPUUtilizationPercentage }} |
|
|
|
- type: Resource |
|
|
|
resource: |
|
|
|
name: cpu |
|
|
|
target: |
|
|
|
type: Utilization |
|
|
|
averageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage }} |
|
|
|
{{- end }} |
|
|
|
{{- if .Values.api.autoscaling.targetMemoryUtilizationPercentage }} |
|
|
|
- type: Resource |
|
|
|
resource: |
|
|
|
name: memory |
|
|
|
target: |
|
|
|
type: Utilization |
|
|
|
averageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage }} |
|
|
|
{{- end }} |
|
|
|
{{- end }} |