[Helm] Make HPA behavior configurable (#7203)
Signed-off-by: amirschw <24677563+amirschw@users.noreply.github.com>
This commit is contained in:
parent
5e5faa24d2
commit
605c243d7a
3 changed files with 35 additions and 4 deletions
|
@ -0,0 +1,14 @@
|
||||||
|
controller:
|
||||||
|
autoscaling:
|
||||||
|
enabled: true
|
||||||
|
behavior:
|
||||||
|
scaleDown:
|
||||||
|
stabilizationWindowSeconds: 300
|
||||||
|
policies:
|
||||||
|
- type: Pods
|
||||||
|
value: 1
|
||||||
|
periodSeconds: 180
|
||||||
|
admissionWebhooks:
|
||||||
|
enabled: false
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
|
@ -22,9 +22,9 @@ spec:
|
||||||
maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }}
|
maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }}
|
||||||
metrics:
|
metrics:
|
||||||
{{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }}
|
{{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
- type: Resource
|
- type: Resource
|
||||||
resource:
|
resource:
|
||||||
name: memory
|
name: memory
|
||||||
target:
|
target:
|
||||||
type: Utilization
|
type: Utilization
|
||||||
averageUtilization: {{ . }}
|
averageUtilization: {{ . }}
|
||||||
|
@ -38,7 +38,11 @@ spec:
|
||||||
averageUtilization: {{ . }}
|
averageUtilization: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.controller.autoscalingTemplate }}
|
{{- with .Values.controller.autoscalingTemplate }}
|
||||||
{{- toYaml . | nindent 2 }}
|
{{- toYaml . | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.autoscaling.behavior }}
|
||||||
|
behavior:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -338,6 +338,19 @@ controller:
|
||||||
maxReplicas: 11
|
maxReplicas: 11
|
||||||
targetCPUUtilizationPercentage: 50
|
targetCPUUtilizationPercentage: 50
|
||||||
targetMemoryUtilizationPercentage: 50
|
targetMemoryUtilizationPercentage: 50
|
||||||
|
behavior: {}
|
||||||
|
# scaleDown:
|
||||||
|
# stabilizationWindowSeconds: 300
|
||||||
|
# policies:
|
||||||
|
# - type: Pods
|
||||||
|
# value: 1
|
||||||
|
# periodSeconds: 180
|
||||||
|
# scaleUp:
|
||||||
|
# stabilizationWindowSeconds: 300
|
||||||
|
# policies:
|
||||||
|
# - type: Pods
|
||||||
|
# value: 2
|
||||||
|
# periodSeconds: 60
|
||||||
|
|
||||||
autoscalingTemplate: []
|
autoscalingTemplate: []
|
||||||
# Custom or additional autoscaling metrics
|
# Custom or additional autoscaling metrics
|
||||||
|
|
Loading…
Reference in a new issue