Files
pezkuwi-telemetry/helm/templates/core-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
953 B
YAML

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