Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions charts/portkey-gateway/templates/gateway/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,39 @@ spec:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- with .Values.autoscaling.customMetrics }}
{{- toYaml . | nindent 4 }}
{{- end }}
behavior:
scaleUp:
stabilizationWindowSeconds: {{ .Values.autoscaling.behavior.scaleUp.stabilizationWindowSeconds | default 0 }}
{{- if .Values.autoscaling.behavior.scaleUp.selectPolicy }}
selectPolicy: {{ .Values.autoscaling.behavior.scaleUp.selectPolicy }}
{{- end }}
{{- if .Values.autoscaling.behavior.scaleUp.policies }}
policies:
{{- toYaml .Values.autoscaling.behavior.scaleUp.policies | nindent 8 }}
{{- else }}
policies:
- type: Pods
value: {{ .Values.autoscaling.behavior.scaleUp.podScaleUpValue | default 4 }}
periodSeconds: {{ .Values.autoscaling.behavior.scaleUp.periodSeconds | default 15 }}
- type: Percent
value: {{ .Values.autoscaling.behavior.scaleUp.percentScaleUpValue | default 100 }}
periodSeconds: {{ .Values.autoscaling.behavior.scaleUp.periodSeconds | default 15 }}
{{- end }}
scaleDown:
stabilizationWindowSeconds: {{ .Values.autoscaling.behavior.scaleDown.stabilizationWindowSeconds | default 300 }}
{{- if .Values.autoscaling.behavior.scaleDown.selectPolicy }}
selectPolicy: {{ .Values.autoscaling.behavior.scaleDown.selectPolicy }}
{{- end }}
{{- if .Values.autoscaling.behavior.scaleDown.policies }}
policies:
{{- toYaml .Values.autoscaling.behavior.scaleDown.policies | nindent 8 }}
{{- else }}
policies:
- type: Pods
value: {{ .Values.autoscaling.behavior.scaleDown.podScaleDownValue | default 1 }}
periodSeconds: {{ .Values.autoscaling.behavior.scaleDown.periodSeconds | default 60 }}
{{- end }}
{{- end }}
11 changes: 11 additions & 0 deletions charts/portkey-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,27 @@ autoscaling:
maxReplicas: 20
targetCPUUtilizationPercentage: 60
targetMemoryUtilizationPercentage: 60
# customMetrics: []
behavior:
scaleUp:
stabilizationWindowSeconds: 0
# selectPolicy: Max
podScaleUpValue: 2
percentScaleUpValue: 100
periodSeconds: 2
# policies:
# - type: Pods
# value: 2
# periodSeconds: 2
scaleDown:
stabilizationWindowSeconds: 300
# selectPolicy: Min
podScaleDownValue: 1
periodSeconds: 60
# policies:
# - type: Pods
# value: 1
# periodSeconds: 60

# Additional volumes on the output Deployment definition.
volumes: []
Expand Down