Files
pezkuwi-telemetry/helm/templates/frontend-hpa.yaml
T
Arsham Teymourı 72311d9b61 adding front to the CI
adding frontend configmaps and envVars

optimizing docker-compose and DockerfIle
2021-08-10 20:07:07 +03:00

30 lines
993 B
YAML

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