Skip to content
Merged
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
4 changes: 2 additions & 2 deletions charts/base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.24
version: 0.3.25

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.3.24"
appVersion: "0.3.25"

dependencies:
- name: gateway-api
Expand Down
4 changes: 4 additions & 0 deletions charts/base/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ spec:
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
{{- if and (semverCompare ">=1.23-0" $kubeVersion) .Values.autoscaling.behavior }}
behavior:
{{ toYaml .Values.autoscaling.behavior | nindent 4 }}
{{- end }}
{{- end }}
19 changes: 19 additions & 0 deletions charts/base/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,25 @@ autoscaling:
maxReplicas: 100
targetCPUUtilizationPercentage: 80

# Optional HPA scale up/down behavior (Kubernetes autoscaling/v2+).
# If set, it will be rendered under `spec.behavior` in the generated HPA.
#
# behavior:
# scaleUp:
# stabilizationWindowSeconds: 0
# selectPolicy: Max
# policies:
# - type: Percent
# value: 100
# periodSeconds: 60
# scaleDown:
# stabilizationWindowSeconds: 300
# selectPolicy: Max
# policies:
# - type: Percent
# value: 50
# periodSeconds: 60

# If you want scale deployment depends on AWS SQS queue size
# autoscaling:
# enabled: true
Expand Down
64 changes: 64 additions & 0 deletions examples/base/basic-with-autoscaling-behavior.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# helm diff upgrade --install -n localhost basic ./charts/base/ -f ./examples/base/basic.yaml

image:
repository: mendhak/http-https-echo
tag: 34

containerPort: 8080

configs:
ROLLOUT_TRIGGER_VERSION: "8"

service:
enabled: true
type: ClusterIP

autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 99
behavior:
scaleUp:
stabilizationWindowSeconds: 0
selectPolicy: Max
policies:
- type: Percent
value: 100
periodSeconds: 60
scaleDown:
stabilizationWindowSeconds: 300
selectPolicy: Max
policies:
- type: Percent
value: 50
periodSeconds: 60

pdb:
enabled: true
minAvailable: 1

readinessProbe:
initialDelaySeconds: 5
failureThreshold: 1
httpGet:
path: /health
port: http
livenessProbe:
initialDelaySeconds: 5
failureThreshold: 3
httpGet:
path: /health
port: http
resources:
requests:
cpu: 100m

setIngressClassByField: true
ingress:
enabled: true
class: nginx
hosts:
- host: http-echo-basic.localhost
paths:
- path: "/ping"
Loading