Skip to content

Commit 15e362a

Browse files
committed
Evaluate memoryUtilization for web container - autoscaling
1 parent 31aa902 commit 15e362a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

osm-seed/templates/web/web-hpa.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
{{- if .Values.web.enabled -}}
2-
{{- if .Values.web.autoscaling.enabled -}}
1+
{{- if and .Values.web.enabled .Values.web.autoscaling.enabled -}}
32
apiVersion: autoscaling/v2
43
kind: HorizontalPodAutoscaler
54
metadata:
@@ -18,5 +17,10 @@ spec:
1817
target:
1918
type: Utilization
2019
averageUtilization: {{ .Values.web.autoscaling.cpuUtilization }}
21-
{{- end }}
20+
- type: Resource
21+
resource:
22+
name: memory
23+
target:
24+
type: Utilization
25+
averageUtilization: {{ .Values.web.autoscaling.memoryUtilization }}
2226
{{- end }}

osm-seed/values.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ web:
178178
enabled: false
179179
minReplicas: 1
180180
maxReplicas: 3
181-
cpuUtilization: 80
181+
cpuUtilization: 60
182+
memoryUtilization: 60
182183
sharedMemorySize: 256Mi
183184
livenessProbeExec: true
184185
# ====================================================================================================

0 commit comments

Comments
 (0)