Skip to content

Commit 78ae85d

Browse files
authored
chore(stack/observability): Update and remove TLS from internal components for now
* chore(stack/observability): Update and remove TLS from internal components for now Also move from the loki exporter to the generic otlp exporter for shipping logs to Loki * fix(stack/observability): Fix name of exporter * chore(stack/observability): Move Loki OTLP exporter from gRPC to HTTP Loki doesn't support gRPC ingestion. * chore(stack/observability): Disable Loki Canery It only generates noise which is not needed for the demo. * chore(stack/obsevability): Remove commented out config for TLS * chore(stack/obsevability): Add link for Loki schemaConfig
1 parent 0dd7c45 commit 78ae85d

File tree

7 files changed

+107
-164
lines changed

7 files changed

+107
-164
lines changed

stacks/observability/grafana-loki.yaml

Lines changed: 53 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,64 @@ name: loki
55
repo:
66
name: loki
77
url: https://grafana.github.io/helm-charts
8-
version: 6.44.0 # 3.5.7
8+
# To find the latest version:
9+
# helm repo add grafana https://grafana.github.io/helm-charts --force-update
10+
# helm search repo grafana/loki
11+
version: 6.45.2 # 3.5.7
912
options:
13+
deploymentMode: SingleBinary
14+
singleBinary:
15+
replicas: 1
16+
17+
# Zero out replica counts of other deployment modes
18+
backend:
19+
replicas: 0
20+
read:
21+
replicas: 0
22+
write:
23+
replicas: 0
24+
25+
ingester:
26+
replicas: 0
27+
querier:
28+
replicas: 0
29+
queryFrontend:
30+
replicas: 0
31+
queryScheduler:
32+
replicas: 0
33+
distributor:
34+
replicas: 0
35+
compactor:
36+
replicas: 0
37+
indexGateway:
38+
replicas: 0
39+
bloomCompactor:
40+
replicas: 0
41+
bloomGateway:
42+
replicas: 0
43+
1044
loki:
1145
auth_enabled: false
1246
commonConfig:
1347
replication_factor: 1
1448
storage:
1549
type: 'filesystem'
16-
server:
17-
http_tls_config:
18-
cert_file: /etc/loki/certs/tls.crt
19-
key_file: /etc/loki/certs/tls.key
20-
readinessProbe:
21-
httpGet:
22-
scheme: HTTPS
50+
bucketNames:
51+
# Buckets names from: https://github.com/grafana/loki/blob/015be223bcd2c29952db3f5cf0748414acf57fd3/production/helm/loki/values.yaml#L3677-L3686
52+
chunks: chunks
53+
ruler: ruler
54+
admin: admin
55+
schemaConfig:
56+
# See: https://grafana.com/docs/loki/latest/operations/storage/schema/
57+
configs:
58+
- from: "2024-04-01"
59+
store: tsdb
60+
object_store: filesystem
61+
schema: v13
62+
index:
63+
prefix: loki_index_
64+
period: 24h
65+
2366
monitoring:
2467
dashboards:
2568
enabled: false
@@ -35,31 +78,7 @@ options:
3578
installOperator: false
3679
test:
3780
enabled: false
81+
lokiCanary:
82+
enabled: false
3883
gateway:
3984
enabled: false
40-
singleBinary:
41-
replicas: 1
42-
extraVolumeMounts:
43-
# Mount the certificate generated by the secret-operator
44-
- name: tls
45-
mountPath: /etc/loki/certs/
46-
extraVolumes:
47-
# Request a TLS certificate from the secret-operator
48-
- name: tls
49-
ephemeral:
50-
volumeClaimTemplate:
51-
metadata:
52-
annotations:
53-
secrets.stackable.tech/class: tls
54-
# Add the service loki to the
55-
# distinguished names because this service is used
56-
# by opentelemetry-collector.
57-
secrets.stackable.tech/scope: |-
58-
service=loki
59-
spec:
60-
storageClassName: secrets.stackable.tech
61-
accessModes:
62-
- ReadWriteOnce
63-
resources:
64-
requests:
65-
storage: 1

stacks/observability/grafana-tempo.yaml

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,17 @@ repo:
66
name: tempo
77
url: https://grafana.github.io/helm-charts
88
# Watch out for https://github.com/grafana/helm-charts/issues/3417
9-
# and https://github.com/grafana/helm-charts/pull/3503!
9+
# Workaround at: https://github.com/grafana/helm-charts/issues/3660#issuecomment-3007113458
10+
# To find the latest version:
11+
# helm repo add grafana https://grafana.github.io/helm-charts --force-update
12+
# helm search repo grafana/tempo
1013
version: 1.24.0 # 2.9.0
1114
options:
1215
tempo:
13-
server:
14-
http_tls_config:
15-
cert_file: /etc/tempo/certs/tls.crt
16-
key_file: /etc/tempo/certs/tls.key
1716
receivers:
1817
otlp:
1918
protocols:
2019
grpc:
2120
endpoint: "0.0.0.0:4317"
22-
tls:
23-
cert_file: /etc/tempo/certs/tls.crt
24-
key_file: /etc/tempo/certs/tls.key
25-
extraVolumeMounts:
26-
# Mount the certificate generated by the secret-operator
27-
- name: tls
28-
mountPath: /etc/tempo/certs/
2921
tempoQuery:
3022
enabled: true
31-
extraVolumeMounts:
32-
# Mount the certificate generated by the secret-operator
33-
- name: tls
34-
mountPath: /etc/tempo/certs/
35-
extraVolumes:
36-
# Request a TLS certificate from the secret-operator
37-
- name: tls
38-
ephemeral:
39-
volumeClaimTemplate:
40-
metadata:
41-
annotations:
42-
secrets.stackable.tech/class: tls
43-
# Add the service loki to the
44-
# distinguished names because this service is used
45-
# by opentelemetry-collector.
46-
secrets.stackable.tech/scope: |-
47-
service=tempo
48-
spec:
49-
storageClassName: secrets.stackable.tech
50-
accessModes:
51-
- ReadWriteOnce
52-
resources:
53-
requests:
54-
storage: 1

stacks/observability/grafana.yaml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,34 @@ name: grafana
66
repo:
77
name: grafana
88
url: https://grafana.github.io/helm-charts
9-
version: 10.1.2 # 12.2.0
9+
# To find the latest version:
10+
# helm repo add grafana https://grafana.github.io/helm-charts --force-update
11+
# helm search repo grafana/grafana
12+
version: 10.1.4 # 12.2.1
1013
options:
1114
admin:
1215
existingSecret: grafana-admin-credentials
1316
service:
1417
type: NodePort
18+
port: 443
1519
datasources:
1620
datasources.yaml:
1721
apiVersion: 1
1822
datasources:
1923
- name: Loki
2024
type: loki
21-
url: https://loki.default.svc.cluster.local:3100
25+
url: http://loki:3100
2226
access: proxy
2327
isDefault: false
2428
jsonData:
25-
tlsAuthWithCACert: true
26-
secureJsonData:
27-
tlsCACert: $__file{/etc/grafana/certs/ca.crt}
29+
tlsAuthWithCACert: false
2830
- name: Tempo
2931
type: tempo
30-
url: https://tempo.default.svc.cluster.local:3100
32+
url: http://tempo:3100
3133
access: proxy
3234
isDefault: false
3335
jsonData:
34-
tlsAuthWithCACert: true
35-
secureJsonData:
36-
tlsCACert: $__file{/etc/grafana/certs/ca.crt}
36+
tlsAuthWithCACert: false
3737
readinessProbe:
3838
httpGet:
3939
scheme: HTTPS
@@ -74,16 +74,3 @@ options:
7474
volumeAttributes:
7575
secrets.stackable.tech/class: tls
7676
secrets.stackable.tech/scope: node,pod,service=grafana
77-
# ephemeral:
78-
# volumeClaimTemplate:
79-
# metadata:
80-
# annotations:
81-
# secrets.stackable.tech/class: tls
82-
# secrets.stackable.tech/scope: pod #,service=grafana
83-
# spec:
84-
# storageClassName: secrets.stackable.tech
85-
# accessModes:
86-
# - ReadWriteOnce
87-
# resources:
88-
# requests:
89-
# storage: 1

stacks/observability/jaeger.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ name: jaeger
66
repo:
77
name: jaeger
88
url: https://jaegertracing.github.io/helm-charts
9+
# To find the latest version:
10+
# helm repo add jaegertracing https://jaegertracing.github.io/helm-charts --force-update
11+
# helm search repo jaegertracing/jaeger
912
version: 3.4.1 # 1.53.0
1013
options:
1114
# labels:

stacks/observability/opentelemetry-collector-deployment.yaml

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,46 @@ metadata:
99
spec:
1010
mode: deployment
1111
# See: https://github.com/open-telemetry/opentelemetry-collector-releases/pkgs/container/opentelemetry-collector-releases%2Fopentelemetry-collector-contrib/versions?filters%5Bversion_type%5D=tagged
12+
# See: https://github.com/open-telemetry/opentelemetry-collector-releases/pkgs/container/opentelemetry-collector-releases%2Fopentelemetry-collector-contrib/550448680?tag=latest
1213
# Using the contrib image so we get all of the useful plugins
13-
image: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.97.0
14+
image: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.138.0
1415
config:
15-
# Configure the collector to receove via OTLP, and export to various "sinks".
16+
# Configure the collector to receive via OTLP, and export to various "sinks".
1617
# For configuration structure, see: https://opentelemetry.io/docs/collector/configuration/
1718
#
1819
# A receiver for logs/metrics/traces via OTLP
1920
# See all available receivers:
2021
# - https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver
2122
# - https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver
2223
receivers:
23-
otlp/insecure:
24+
otlp:
2425
protocols:
2526
grpc:
2627
# In sidecar mode, we don't want, nor need the sidecar to be
2728
# accessible from outside the pod. For that reason, we do not enable
2829
# TLS on the receiver(s) because only containers in the same pod can
2930
# connect, and so network traffic will not leave the host.
3031
endpoint: 0.0.0.0:4317
31-
# Exporters to separate logs/metrics/taces
32+
# Exporters to separate logs/metrics/traces
3233
# See all available exporters:
3334
# - https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter
3435
# - https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter
3536
exporters:
3637
# When added to a logs/metrics/traces pipeline, the collector will print to stdout.
37-
debug:
38+
debug: {}
3839
# verbosity: detailed
39-
otlp/jaeger-insecure:
40+
otlp/jaeger:
4041
endpoint: jaeger-collector:4317
4142
tls:
4243
insecure: true
4344
otlp/tempo:
44-
endpoint: tempo.default.svc.cluster.local:4317
45+
endpoint: tempo:4317
4546
tls:
46-
ca_file: /certs/ca.crt
47-
loki:
48-
endpoint: https://loki.default.svc.cluster.local:3100/loki/api/v1/push
47+
insecure: true
48+
otlphttp/loki:
49+
endpoint: http://loki:3100/otlp
4950
tls:
50-
ca_file: /certs/ca.crt
51+
insecure: true
5152
# auth:
5253
# authenticator: basicauth/loki
5354
# Processors to enrich logs/metrics/traces. For example, adding Kubernetes node/pod/deployment information
@@ -98,7 +99,7 @@ spec:
9899
# See all available extensions:
99100
# - https://github.com/open-telemetry/opentelemetry-collector/tree/main/extension
100101
# - https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension
101-
extensions:
102+
extensions: {}
102103
# basicauth/loki:
103104
# client_auth:
104105
# username: loki
@@ -108,28 +109,29 @@ spec:
108109
# extensions: [basicauth/loki]
109110
pipelines:
110111
traces:
111-
receivers: [otlp/insecure]
112+
receivers: [otlp]
112113
processors:
113114
- memory_limiter
114115
- batch/every-second
115116
- resourcedetection/env
116117
exporters:
118+
# - otlp/jaeger
117119
- otlp/tempo
118120
# - debug
119121
logs:
120-
receivers: [otlp/insecure]
122+
receivers: [otlp]
121123
processors:
122124
- memory_limiter
123125
- batch/every-second
124126
- resourcedetection/env
125127
- resource/logs
126128
- attributes/logs
127129
exporters:
128-
- loki
130+
- otlphttp/loki
129131
# - debug
130132
# Set the log level of the opentelemetry-collector application.
131133
# You can also expose the collector metrcics (separate from the metrics receivers/exporters).
132-
telemetry:
134+
telemetry: {}
133135
# logs:
134136
# level: DEBUG
135137
# metrics:
@@ -142,22 +144,3 @@ spec:
142144
requests:
143145
cpu: 250m
144146
memory: 64Mi
145-
volumeMounts:
146-
# We mount a certificate from the secret-operator so that we have the CA
147-
# cert for exporters to trust what they connect to.
148-
- name: tls
149-
mountPath: /certs
150-
volumes:
151-
- name: tls
152-
ephemeral:
153-
volumeClaimTemplate:
154-
metadata:
155-
annotations:
156-
secrets.stackable.tech/class: tls
157-
spec:
158-
storageClassName: secrets.stackable.tech
159-
accessModes:
160-
- ReadWriteOnce
161-
resources:
162-
requests:
163-
storage: 1

0 commit comments

Comments
 (0)