Skip to content
Snippets Groups Projects
Commit e276f1b8 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Provide HorizontalPodAutoscaler

parent 9ae2140a
No related branches found
No related tags found
1 merge request!67Draft: HPA for celery
{{- if .Values.celery.autoScaling}}
#apiVersion: autoscaling/v1
#kind: HorizontalPodAutoscaler
#metadata:
# name: {{ printf "%s-%s" .Release.Name "hpa" }}
#spec:
# scaleTargetRef:
# apiVersion: apps/v1
# kind: StatefulSet
# name: {{ printf "%s-%s" .Release.Name "celery" }}
# minReplicas: 1
# maxReplicas: 3
# targetCPUUtilizationPercentage: 50
---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ printf "%s-%s" .Release.Name "hpa" }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: StatefulSet
name: {{ printf "%s-%s" .Release.Name "celery" }}
minReplicas: 1
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
behavior:
scaleDown:
stabilizationWindowSeconds: 120
scaleUp:
stabilizationWindowSeconds: 10
---
{{- end }}
\ No newline at end of file
......@@ -50,7 +50,9 @@ ingress:
name: chart-example.local
celery:
# should not be enabled as long as project are not stored in a db
autoScaling: false # optional, default: false
# should stay to 1 replicat as long as project are not stored in a db
replicas: 1 # optional, default: 1
resources:
requests:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment