Skip to content

Commit 61601f8

Browse files
Add observability stack with jaeger and opentelemetry-collector (#35)
* add observability stack * chore(stack/observability): move jaeger and otel-operator to the observability stack directory * chore(stack/observability): add grafana, loki, and tempo, with pre-configured data sources and TLS * chore(stack/observability): add docs to the opentelemetry-collector config * chore(stack/observability): disable otel-collector logging, fix unused template variable * chore(stacks/observability): change batch processor to every second * chore(stack/observability): add collector deployment for use outside of pods * chore(stack/observability): update opentelemetry-operator * chore(stack/observability): update manifest urls ahead of merge * chore(stack/observability): add url to opentelemetry-operator chart * chore(stack/observability): change grafana service type to NodePort * chore: Switch to opentelemetry.io/v1beta1 * chore(stack/observability): move the stack to be with the related stacks * chore(stack/observability): add comments about lack of NodePort services --------- Co-authored-by: Sebastian Bernauer <[email protected]>
1 parent 815e994 commit 61601f8

9 files changed

+599
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: grafana-admin-credentials
5+
stringData:
6+
admin-user: admin
7+
admin-password: {{ grafanaAdminPassword }}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# https://github.com/grafana/loki/tree/main/production/helm/loki
2+
releaseName: loki
3+
name: loki
4+
repo:
5+
name: loki
6+
url: https://grafana.github.io/helm-charts
7+
version: 5.47.2
8+
options:
9+
loki:
10+
auth_enabled: false
11+
commonConfig:
12+
replication_factor: 1
13+
storage:
14+
type: 'filesystem'
15+
server:
16+
http_tls_config:
17+
cert_file: /etc/loki/certs/tls.crt
18+
key_file: /etc/loki/certs/tls.key
19+
readinessProbe:
20+
httpGet:
21+
scheme: HTTPS
22+
monitoring:
23+
dashboards:
24+
enabled: false
25+
rules:
26+
enabled: false
27+
serviceMonitor:
28+
enabled: false
29+
lokiCanary:
30+
enabled: false
31+
selfMonitoring:
32+
enabled: false
33+
grafanaAgent:
34+
installOperator: false
35+
test:
36+
enabled: false
37+
gateway:
38+
enabled: false
39+
singleBinary:
40+
replicas: 1
41+
extraVolumeMounts:
42+
# Mount the certificate generated by the secret-operator
43+
- name: tls
44+
mountPath: /etc/loki/certs/
45+
extraVolumes:
46+
# Request a TLS certificate from the secret-operator
47+
- name: tls
48+
ephemeral:
49+
volumeClaimTemplate:
50+
metadata:
51+
annotations:
52+
secrets.stackable.tech/class: tls
53+
# Add the service loki to the
54+
# distinguished names because this service is used
55+
# by opentelemetry-collector.
56+
secrets.stackable.tech/scope: |-
57+
service=loki
58+
spec:
59+
storageClassName: secrets.stackable.tech
60+
accessModes:
61+
- ReadWriteOnce
62+
resources:
63+
requests:
64+
storage: 1
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# https://github.com/grafana/helm-charts/tree/main/charts/tempo
2+
releaseName: tempo
3+
name: tempo
4+
repo:
5+
name: tempo
6+
url: https://grafana.github.io/helm-charts
7+
version: 1.7.2
8+
options:
9+
tempo:
10+
server:
11+
http_tls_config:
12+
cert_file: /etc/tempo/certs/tls.crt
13+
key_file: /etc/tempo/certs/tls.key
14+
receivers:
15+
otlp:
16+
protocols:
17+
grpc:
18+
endpoint: "0.0.0.0:4317"
19+
tls:
20+
cert_file: /etc/tempo/certs/tls.crt
21+
key_file: /etc/tempo/certs/tls.key
22+
extraVolumeMounts:
23+
# Mount the certificate generated by the secret-operator
24+
- name: tls
25+
mountPath: /etc/tempo/certs/
26+
tempoQuery:
27+
enabled: true
28+
extraVolumeMounts:
29+
# Mount the certificate generated by the secret-operator
30+
- name: tls
31+
mountPath: /etc/tempo/certs/
32+
extraVolumes:
33+
# Request a TLS certificate from the secret-operator
34+
- name: tls
35+
ephemeral:
36+
volumeClaimTemplate:
37+
metadata:
38+
annotations:
39+
secrets.stackable.tech/class: tls
40+
# Add the service loki to the
41+
# distinguished names because this service is used
42+
# by opentelemetry-collector.
43+
secrets.stackable.tech/scope: |-
44+
service=tempo
45+
spec:
46+
storageClassName: secrets.stackable.tech
47+
accessModes:
48+
- ReadWriteOnce
49+
resources:
50+
requests:
51+
storage: 1

stacks/observability/grafana.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# https://github.com/grafana/helm-charts/tree/main/charts/grafana
2+
releaseName: grafana
3+
name: grafana
4+
repo:
5+
name: grafana
6+
url: https://grafana.github.io/helm-charts
7+
version: 7.3.7
8+
options:
9+
admin:
10+
existingSecret: grafana-admin-credentials
11+
service:
12+
type: NodePort
13+
datasources:
14+
datasources.yaml:
15+
apiVersion: 1
16+
datasources:
17+
- name: Loki
18+
type: loki
19+
url: https://loki.default.svc.cluster.local:3100
20+
access: proxy
21+
isDefault: false
22+
jsonData:
23+
tlsAuthWithCACert: true
24+
secureJsonData:
25+
tlsCACert: $__file{/etc/grafana/certs/ca.crt}
26+
- name: Tempo
27+
type: tempo
28+
url: https://tempo.default.svc.cluster.local:3100
29+
access: proxy
30+
isDefault: false
31+
jsonData:
32+
tlsAuthWithCACert: true
33+
secureJsonData:
34+
tlsCACert: $__file{/etc/grafana/certs/ca.crt}
35+
readinessProbe:
36+
httpGet:
37+
scheme: HTTPS
38+
livenessProbe:
39+
httpGet:
40+
scheme: HTTPS
41+
testFramework:
42+
enabled: false
43+
resources:
44+
limits:
45+
cpu: 100m
46+
memory: 128Mi
47+
requests:
48+
cpu: 100m
49+
memory: 128Mi
50+
persistence:
51+
enabled: true
52+
# storageClassName: default
53+
accessModes:
54+
- ReadWriteOnce
55+
size: 1Gi
56+
# annotations: {}
57+
finalizers: []
58+
env:
59+
# Enable HTTPS, using a Certificate from the Secret Operator
60+
GF_SERVER_PROTOCOL: https
61+
GF_SERVER_CERT_FILE: /etc/grafana/certs/tls.crt
62+
GF_SERVER_CERT_KEY: /etc/grafana/certs/tls.key
63+
extraVolumeMounts:
64+
# Mount the certificate generated by the secret-operator
65+
- name: tls
66+
mountPath: /etc/grafana/certs/
67+
extraVolumes:
68+
# Request a TLS certificate from the secret-operator
69+
- name: tls
70+
csi:
71+
driver: secrets.stackable.tech
72+
volumeAttributes:
73+
secrets.stackable.tech/class: tls
74+
secrets.stackable.tech/scope: node,pod,service=grafana
75+
# ephemeral:
76+
# volumeClaimTemplate:
77+
# metadata:
78+
# annotations:
79+
# secrets.stackable.tech/class: tls
80+
# secrets.stackable.tech/scope: pod #,service=grafana
81+
# spec:
82+
# storageClassName: secrets.stackable.tech
83+
# accessModes:
84+
# - ReadWriteOnce
85+
# resources:
86+
# requests:
87+
# storage: 1

stacks/observability/jaeger.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# https://github.com/jaegertracing/helm-charts/tree/main/charts/jaeger
2+
# The jaeger allInOne mode doesn't support NodePort services.
3+
releaseName: jaeger
4+
name: jaeger
5+
repo:
6+
name: jaeger
7+
url: https://jaegertracing.github.io/helm-charts
8+
version: 2.0.1
9+
options:
10+
# labels:
11+
# stackable.tech/vendor: Stackable
12+
provisionDataStore:
13+
cassandra: false
14+
allInOne:
15+
enabled: true
16+
extraEnv: []
17+
service:
18+
headless: true
19+
collector:
20+
otlp:
21+
grpc:
22+
name: otlp-grpc
23+
# http:
24+
# name: otlp-http
25+
agent:
26+
enabled: false
27+
collector:
28+
enabled: false
29+
query:
30+
enabled: false

0 commit comments

Comments
 (0)