Skip to content

Commit b227c9d

Browse files
add hpa field to hpa spec (#75)
add hpa field to hpa spec (#75)
1 parent bec676a commit b227c9d

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

charts/agent/templates/hpa.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@ spec:
2929
type: "Utilization"
3030
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
3131
{{- end }}
32+
{{- if .Values.autoscaling.behavior }}
33+
behavior:
34+
{{- toYaml .Values.autoscaling.behavior | nindent 4 }}
35+
{{- end }}
3236
{{- end }}

charts/server/templates/hpa.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@ spec:
2929
type: "Utilization"
3030
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
3131
{{- end }}
32+
{{- if .Values.autoscaling.behavior }}
33+
behavior:
34+
{{- toYaml .Values.autoscaling.behavior | nindent 4 }}
35+
{{- end }}
3236
{{- end }}

values.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,27 @@ agent:
260260
maxReplicas: 10
261261
targetCPUUtilizationPercentage: 80
262262
targetMemoryUtilizationPercentage: 80
263+
behavior:
264+
scaleDown:
265+
stabilizationWindowSeconds: 300
266+
policies:
267+
- type: Percent
268+
value: 50
269+
periodSeconds: 60
270+
- type: Pods
271+
value: 2
272+
periodSeconds: 60
273+
selectPolicy: Min
274+
scaleUp:
275+
stabilizationWindowSeconds: 0
276+
policies:
277+
- type: Percent
278+
value: 100
279+
periodSeconds: 60
280+
- type: Pods
281+
value: 2
282+
periodSeconds: 60
283+
selectPolicy: Max
263284

264285
podDisruptionBudget:
265286
{}
@@ -391,6 +412,27 @@ server:
391412
maxReplicas: 10
392413
targetCPUUtilizationPercentage: 80
393414
targetMemoryUtilizationPercentage: 80
415+
behavior:
416+
scaleDown:
417+
stabilizationWindowSeconds: 300
418+
policies:
419+
- type: Percent
420+
value: 50
421+
periodSeconds: 60
422+
- type: Pods
423+
value: 2
424+
periodSeconds: 60
425+
selectPolicy: Min
426+
scaleUp:
427+
stabilizationWindowSeconds: 0
428+
policies:
429+
- type: Percent
430+
value: 100
431+
periodSeconds: 60
432+
- type: Pods
433+
value: 2
434+
periodSeconds: 60
435+
selectPolicy: Max
394436

395437
podDisruptionBudget:
396438
{}

0 commit comments

Comments
 (0)