forked from observatorium/api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added jaeger all in one with badger storage
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
- Loading branch information
1 parent
5128891
commit 3a83756
Showing
7 changed files
with
161 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; | ||
local service = k.core.v1.service; | ||
|
||
{ | ||
jaeger+:: { | ||
headlessService: | ||
service.new( | ||
'jaeger-collector-headless', | ||
$.jaeger.deployment.metadata.labels, | ||
[ | ||
service.mixin.spec.portsType.newNamed('grpc', 14250, 14250), | ||
], | ||
) + | ||
service.mixin.metadata.withNamespace('observatorium') + | ||
service.mixin.metadata.withLabels({ 'app.kubernetes.io/name': $.jaeger.deployment.metadata.name }) + | ||
service.mixin.spec.withClusterIp('None'), | ||
|
||
queryService: | ||
service.new( | ||
'jaeger-query', | ||
$.jaeger.deployment.metadata.labels, | ||
[ | ||
service.mixin.spec.portsType.newNamed('query', 16686, 16686), | ||
], | ||
) + | ||
service.mixin.metadata.withNamespace('observatorium') + | ||
service.mixin.metadata.withLabels({ 'app.kubernetes.io/name': $.jaeger.deployment.metadata.name }), | ||
|
||
volumeClaim: | ||
local claim = k.core.v1.persistentVolumeClaim; | ||
claim.new() + | ||
claim.mixin.metadata.withName('jaeger-store-data') + | ||
claim.mixin.metadata.withNamespace('observatorium') + | ||
claim.mixin.metadata.withLabels({ 'app.kubernetes.io/name': $.jaeger.deployment.metadata.name }) + | ||
claim.mixin.spec.withAccessModes('ReadWriteOnce') + | ||
claim.mixin.spec.resources.withRequests({ storage: '50Gi' },) + | ||
claim.mixin.spec.withStorageClassName('standard'), | ||
|
||
deployment: | ||
local deployment = k.apps.v1.deployment; | ||
local container = deployment.mixin.spec.template.spec.containersType; | ||
local containerPort = container.portsType; | ||
local env = container.envType; | ||
local mount = container.volumeMountsType; | ||
local volume = k.apps.v1.statefulSet.mixin.spec.template.spec.volumesType; | ||
|
||
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', | ||
],) + | ||
container.withEnv([ | ||
env.new('SPAN_STORAGE_TYPE', 'badger'), | ||
]) + container.withPorts( | ||
[ | ||
containerPort.newNamed(14250, 'grpc'), | ||
containerPort.newNamed(14269, 'admin-http'), | ||
containerPort.newNamed(16686, 'query'), | ||
], | ||
) + | ||
container.withVolumeMounts([mount.new('jaeger-store-data', '/var/jaeger/store')]); | ||
|
||
deployment.new('jaeger-all-in-one', 1, c, $.jaeger.deployment.metadata.labels) + | ||
deployment.mixin.metadata.withNamespace('observatorium') + | ||
deployment.mixin.metadata.withLabels({ 'app.kubernetes.io/name': $.jaeger.deployment.metadata.name }) + | ||
deployment.mixin.spec.selector.withMatchLabels($.jaeger.deployment.metadata.labels) + | ||
deployment.mixin.spec.template.spec.withVolumes(volume.fromPersistentVolumeClaim($.jaeger.volumeClaim.metadata.name, $.jaeger.volumeClaim.metadata.name)), | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(import '../../components/jaeger-collector.libsonnet') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
local app = | ||
(import 'kube-thanos.libsonnet') + | ||
(import 'telemeter.libsonnet'); | ||
(import 'telemeter.libsonnet') + | ||
(import 'jaeger.libsonnet'); | ||
|
||
{ ['thanos-querier-' + name]: app.thanos.querier[name] for name in std.objectFields(app.thanos.querier) } + | ||
{ ['thanos-receive-' + name]: app.thanos.receive[name] for name in std.objectFields(app.thanos.receive) } + | ||
{ ['thanos-compactor-' + name]: app.thanos.compactor[name] for name in std.objectFields(app.thanos.compactor) } + | ||
{ ['thanos-store-' + name]: app.thanos.store[name] for name in std.objectFields(app.thanos.store) } + | ||
{ ['thanos-receive-controller-' + name]: app.thanos.receiveController[name] for name in std.objectFields(app.thanos.receiveController) } + | ||
{ ['thanos-querier-cache-' + name]: app.thanos.querierCache[name] for name in std.objectFields(app.thanos.querierCache) } + | ||
{ ['telemeter-' + name]: app.telemeterServer[name] for name in std.objectFields(app.telemeterServer) } | ||
{ ['telemeter-' + name]: app.telemeterServer[name] for name in std.objectFields(app.telemeterServer) } + | ||
{ ['jaeger-' + name]: app.jaeger[name] for name in std.objectFields(app.jaeger) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: jaeger-all-in-one | ||
name: jaeger-all-in-one | ||
namespace: observatorium | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: jaeger-all-in-one | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: jaeger-all-in-one | ||
spec: | ||
containers: | ||
- args: | ||
- --badger.directory-key=/var/jaeger/store/keys | ||
- --badger.directory-value=/var/jaeger/store/values | ||
- --badger.ephemeral=false | ||
env: | ||
- name: SPAN_STORAGE_TYPE | ||
value: badger | ||
image: jaegertracing/all-in-one:1.14.0 | ||
name: jaeger-all-in-one | ||
ports: | ||
- containerPort: 14250 | ||
name: grpc | ||
- containerPort: 14269 | ||
name: admin-http | ||
- containerPort: 16686 | ||
name: query | ||
volumeMounts: | ||
- mountPath: /var/jaeger/store | ||
name: jaeger-store-data | ||
readOnly: false | ||
volumes: | ||
- name: jaeger-store-data | ||
persistentVolumeClaim: | ||
claimName: jaeger-store-data |
15 changes: 15 additions & 0 deletions
15
environments/kubernetes/manifests/jaeger-headlessService.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: jaeger-all-in-one | ||
name: jaeger-collector-headless | ||
namespace: observatorium | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- name: grpc | ||
port: 14250 | ||
targetPort: 14250 | ||
selector: | ||
app.kubernetes.io/name: jaeger-all-in-one |
14 changes: 14 additions & 0 deletions
14
environments/kubernetes/manifests/jaeger-queryService.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: jaeger-all-in-one | ||
name: jaeger-query | ||
namespace: observatorium | ||
spec: | ||
ports: | ||
- name: query | ||
port: 16686 | ||
targetPort: 16686 | ||
selector: | ||
app.kubernetes.io/name: jaeger-all-in-one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: jaeger-all-in-one | ||
name: jaeger-store-data | ||
namespace: observatorium | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 50Gi | ||
storageClassName: standard |