Skip to content

Commit 16db660

Browse files
authored
Add horizontal pod autoscaler to helm chart (hypertrace#46)
1 parent 9fc3de1 commit 16db660

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

helm/templates/hpa.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{- if .Values.hpa.enabled }}
2+
apiVersion: autoscaling/v1
3+
kind: HorizontalPodAutoscaler
4+
metadata:
5+
name: {{ .Chart.Name }}
6+
labels:
7+
release: {{ .Release.Name }}
8+
{{- with .Values.podLabels }}
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
11+
spec:
12+
minReplicas: {{ int .Values.hpa.minReplicas }}
13+
maxReplicas: {{ int .Values.hpa.maxReplicas }}
14+
scaleTargetRef:
15+
apiVersion: apps/v1
16+
kind: Deployment
17+
name: {{ .Chart.Name }}
18+
targetCPUUtilizationPercentage: {{ int .Values.hpa.targetCPUUtilizationPercentage }}
19+
{{- end }}

helm/values.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,19 @@ configMap:
134134
receivers:
135135
otlp:
136136
protocols:
137-
grpc:
137+
grpc:
138138
endpoint: "0.0.0.0:4317"
139-
http:
139+
http:
140140
endpoint: "0.0.0.0:55681"
141-
opencensus:
141+
opencensus:
142142
endpoint: "0.0.0.0:55678"
143-
zipkin:
143+
zipkin:
144144
endpoint: "0.0.0.0:9411"
145145
jaeger:
146146
protocols:
147-
grpc:
147+
grpc:
148148
endpoint: "0.0.0.0:14250"
149-
thrift_http:
149+
thrift_http:
150150
endpoint: "0.0.0.0:14268"
151151
# Collect own metrics
152152
prometheus:
@@ -175,6 +175,12 @@ configMap:
175175
processors: [batch]
176176
exporters: [kafka]
177177

178+
hpa:
179+
enabled: false
180+
minReplicas: 2
181+
maxReplicas: 5
182+
targetCPUUtilizationPercentage: 80
183+
178184
kafka-topic-creator:
179185
jobName: jaeger-spans-kafka-topic-creator
180186
helmHook: pre-install,pre-upgrade

0 commit comments

Comments
 (0)