aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/portal-ng/components/portal-ng-bff/templates/hpa.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/portal-ng/components/portal-ng-bff/templates/hpa.yaml')
-rw-r--r--kubernetes/portal-ng/components/portal-ng-bff/templates/hpa.yaml32
1 files changed, 32 insertions, 0 deletions
diff --git a/kubernetes/portal-ng/components/portal-ng-bff/templates/hpa.yaml b/kubernetes/portal-ng/components/portal-ng-bff/templates/hpa.yaml
new file mode 100644
index 0000000000..b686ac998b
--- /dev/null
+++ b/kubernetes/portal-ng/components/portal-ng-bff/templates/hpa.yaml
@@ -0,0 +1,32 @@
+{{- if .Values.autoscaling.enabled }}
+apiVersion: autoscaling/v2beta1
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ include "common.release" . }}
+ heritage: {{ .Release.Service }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "common.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}