Skip to content

Commit

Permalink
feat: hpa for snuba (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mokto authored Apr 6, 2020
1 parent bc6f5ab commit 36a6e10
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sentry/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: sentry
description: A Helm chart for Kubernetes
type: application
version: 0.10.0
version: 0.11.0
appVersion: 10.0.0
dependencies:
- name: redis
Expand Down
14 changes: 14 additions & 0 deletions sentry/templates/hpa-snuba-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.snuba.api.autoscaling.enabled }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "sentry.fullname" . }}-snuba-api
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "sentry.fullname" . }}-snuba-api
minReplicas: {{ .Values.snuba.api.autoscaling.minReplicas }}
maxReplicas: {{ .Values.snuba.api.autoscaling.maxReplicas }}
targetCPUUtilizationPercentage: {{ .Values.snuba.api.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
7 changes: 7 additions & 0 deletions sentry/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ snuba:
nodeSelector: {}
# tolerations: []
# podLabels: []

autoscaling:
enabled: false
minReplicas: 2
maxReplicas: 5
targetCPUUtilizationPercentage: 50

consumer:
replicas: 1
env: {}
Expand Down

0 comments on commit 36a6e10

Please sign in to comment.