{{- if .Values.loopApp.autoscaling.enabled }} apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: labels: app.kubernetes.io/name: {{ include "loop-enterprise-edition.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ include "loop-enterprise-edition.chart" . }} name: {{ include "loop-enterprise-edition.fullname" . }} spec: scaleTargetRef: apiVersion: {{ template "loop-enterprise-edition.deployment.apiVersion" . }} kind: Deployment name: {{ include "loop-enterprise-edition.fullname" . }} minReplicas: {{ .Values.loopApp.autoscaling.minReplicas }} maxReplicas: {{ .Values.loopApp.autoscaling.maxReplicas }} metrics: {{- with .Values.loopApp.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory targetAverageUtilization: {{ . }} {{- end }} {{- with .Values.loopApp.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu targetAverageUtilization: {{ . }} {{- end }} {{- end }}