Skip to content

Commit e93db6c

Browse files
committed
Evaluate autoscaling by CPU and memory separately
1 parent 3a739a3 commit e93db6c

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,22 @@ spec:
1111
minReplicas: {{ .Values.web.autoscaling.minReplicas }}
1212
maxReplicas: {{ .Values.web.autoscaling.maxReplicas }}
1313
metrics:
14+
{{- if .Values.web.autoscaling.cpuUtilization.enable }}
1415
- type: Resource
1516
resource:
1617
name: cpu
1718
target:
1819
type: Utilization
19-
averageUtilization: {{ .Values.web.autoscaling.cpuUtilization }}
20+
averageUtilization: {{ .Values.web.autoscaling.cpuUtilization.value }}
21+
{{- end }}
22+
{{- if .Values.web.autoscaling.memoryUtilization.enable }}
2023
- type: Resource
2124
resource:
2225
name: memory
2326
target:
2427
type: Utilization
25-
averageUtilization: {{ .Values.web.autoscaling.memoryUtilization }}
28+
averageUtilization: {{ .Values.web.autoscaling.memoryUtilization.value }}
29+
{{- end }}
2630
behavior:
2731
scaleUp:
2832
stabilizationWindowSeconds: {{ .Values.web.autoscaling.behavior.scaleUp.stabilizationWindowSeconds | default 60 }}

osm-seed/values.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,12 @@ web:
178178
enabled: true
179179
minReplicas: 1
180180
maxReplicas: 6
181-
cpuUtilization: 85
182-
memoryUtilization: 85
181+
cpuUtilization:
182+
enable: false
183+
value: 85
184+
memoryUtilization:
185+
enable: false
186+
value: 85
183187
behavior:
184188
scaleUp:
185189
stabilizationWindowSeconds: 60

0 commit comments

Comments
 (0)