Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Commit

Permalink
chore: configure hpa behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisingal committed May 14, 2024
1 parent 77592de commit b43b6e7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
17 changes: 17 additions & 0 deletions helm/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.hpa.behavior.enabled }}
behavior:
scaleUp:
policies:
- type: {{ .Values.hpa.behavior.scaleUp.policy.type }}
value: {{ .Values.hpa.behavior.scaleUp.policy.value }}
periodSeconds: {{ .Values.hpa.behavior.scaleUp.policy.periodSeconds }}
selectPolicy: {{ .Values.hpa.behavior.scaleUp.selectPolicy }}
stabilizationWindowSeconds: {{ .Values.hpa.behavior.scaleUp.stabilizationWindowSeconds }}
scaleDown:
policies:
- type: {{ .Values.hpa.behavior.scaleDown.policy.type }}
value: {{ .Values.hpa.behavior.scaleDown.policy.value }}
periodSeconds: {{ .Values.hpa.behavior.scaleDown.policy.periodSeconds }}
selectPolicy: {{ .Values.hpa.behavior.scaleDown.selectPolicy }}
stabilizationWindowSeconds: {{ .Values.hpa.behavior.scaleDown.selectPolicy }}
{{- end }}
minReplicas: {{ int .Values.hpa.minReplicas }}
maxReplicas: {{ int .Values.hpa.maxReplicas }}
scaleTargetRef:
Expand Down
16 changes: 16 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,19 @@ hpa:
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 80
behavior:
enabled: true
scaleUp:
policy:
type: Pods
value: 2
periodSeconds: 60
selectPolicy: Max
stabilizationWindowSeconds: 0
scaleDown:
policy:
type: Pods
value: 1
periodSeconds: 600
selectPolicy: Min
stabilizationWindowSeconds: 600

0 comments on commit b43b6e7

Please sign in to comment.