Skip to content

Commit

Permalink
Added limits/requests and liveness/readiness probes
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling committed Sep 12, 2019
1 parent 3a83756 commit c97e428
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
12 changes: 11 additions & 1 deletion components/jaeger-collector.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@ local service = k.core.v1.service;
local mount = container.volumeMountsType;
local volume = k.apps.v1.statefulSet.mixin.spec.template.spec.volumesType;

// the assumption based on past perf tests is that this collector should be able to comfortably
// ingest at least 2k spans/sec with badger and 256Mi of memory on 1 cpu.
// this depends on the span size, but these default values should provide a good base line
local c =
container.new($.jaeger.deployment.metadata.name, 'jaegertracing/all-in-one:1.14.0') +
container.withArgs([
'--badger.directory-key=/var/jaeger/store/keys',
'--badger.directory-value=/var/jaeger/store/values',
'--badger.ephemeral=false',
'--collector.queue-size=4000',
],) +
container.withEnv([
env.new('SPAN_STORAGE_TYPE', 'badger'),
Expand All @@ -60,7 +64,13 @@ local service = k.core.v1.service;
containerPort.newNamed(16686, 'query'),
],
) +
container.withVolumeMounts([mount.new('jaeger-store-data', '/var/jaeger/store')]);
container.withVolumeMounts([mount.new('jaeger-store-data', '/var/jaeger/store')]) +
container.mixin.readinessProbe.withFailureThreshold(3) +
container.mixin.readinessProbe.httpGet.withPath('/').withPort('14269').withScheme('HTTP') +
container.mixin.livenessProbe.withFailureThreshold(3) +
container.mixin.livenessProbe.httpGet.withPath('/').withPort('14269').withScheme('HTTP') +
container.mixin.resources.withRequests({ cpu: '1', memory: '256Mi' }) +
container.mixin.resources.withLimits({ cpu: '4', memory: '2Gi' });

deployment.new('jaeger-all-in-one', 1, c, $.jaeger.deployment.metadata.labels) +
deployment.mixin.metadata.withNamespace('observatorium') +
Expand Down
20 changes: 20 additions & 0 deletions environments/kubernetes/manifests/jaeger-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,17 @@ spec:
- --badger.directory-key=/var/jaeger/store/keys
- --badger.directory-value=/var/jaeger/store/values
- --badger.ephemeral=false
- --collector.queue-size=4000
env:
- name: SPAN_STORAGE_TYPE
value: badger
image: jaegertracing/all-in-one:1.14.0
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: "14269"
scheme: HTTP
name: jaeger-all-in-one
ports:
- containerPort: 14250
Expand All @@ -32,6 +39,19 @@ spec:
name: admin-http
- containerPort: 16686
name: query
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: "14269"
scheme: HTTP
resources:
limits:
cpu: "4"
memory: 2Gi
requests:
cpu: "1"
memory: 256Mi
volumeMounts:
- mountPath: /var/jaeger/store
name: jaeger-store-data
Expand Down

0 comments on commit c97e428

Please sign in to comment.