Skip to content
Snippets Groups Projects

Draft: HPA for celery

Closed Bryan BRANCOTTE requested to merge more-worker-celery into master
Files
4
+ 39
0
 
{{- 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
Loading