Compare commits

...

3 Commits

Author SHA1 Message Date
1d48676d2c Add basicauth to otel 2025-11-14 19:18:56 +01:00
8488467ca7 Configure otel tables for grafana 2025-11-14 17:59:05 +01:00
1235a58128 Add http and grpc ingress for otel 2025-11-14 17:33:54 +01:00
4 changed files with 50 additions and 11 deletions

View File

@@ -12,6 +12,7 @@ spec:
datasource:
name: clickhouse
access: proxy
isDefault: true
type: grafana-clickhouse-datasource
jsonData:
host: clickhouse-otel-cluster.otel.svc.cluster.local
@@ -19,6 +20,16 @@ spec:
username: grafana
defaultDatabase: otel
protocol: native
logs:
defaultDatabase: otel
defaultTable: otel_logs
otelEnabled: true
otelVersion: latest
traces:
defaultDatabase: otel
defaultTable: otel_traces
otelEnabled: true
otelVersion: latest
secureJsonData:
password: ${grafana}
instanceSelector:

View File

@@ -0,0 +1,12 @@
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: otel-basicauth
spec:
refreshInterval: 24h
secretStoreRef:
kind: ClusterSecretStore
name: bitwarden
dataFrom:
- extract:
key: otel-basicauth

View File

@@ -17,7 +17,7 @@ spec:
service:
name: otel-collector
port:
name: otlp-grpc
name: otlp-http
tls:
- hosts:
- otel.sdg.moe

View File

@@ -5,11 +5,24 @@ metadata:
spec:
mode: daemonset
env:
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: clickhouse-passwords
key: collector
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: clickhouse-passwords
key: collector
volumes:
- name: htpasswd
secret:
secretName: otel-basicauth
items:
- key: .htpasswd
path: .htpasswd
volumeMounts:
- name: htpasswd
mountPath: .htpasswd
subPath: .htpasswd
config:
receivers:
# hostmetrics:
@@ -25,10 +38,10 @@ spec:
# paging:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
auth:
authenticator: basicauth/server
processors:
memory_limiter:
@@ -66,9 +79,12 @@ spec:
endpoint: 0.0.0.0:1777
zpages:
endpoint: 0.0.0.0:55679
basicauth/server:
htpasswd:
file: .htpasswd
service:
extensions: [health_check, pprof, zpages]
extensions: [basicauth/server, health_check, pprof, zpages]
pipelines:
traces:
receivers: [otlp]
@@ -77,8 +93,8 @@ spec:
metrics:
receivers: [otlp] #[otlp, hostmetrics]
processors: [memory_limiter, batch]
exporters: [debug, clickhouse]
exporters: [clickhouse]
logs:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug, clickhouse]
exporters: [clickhouse]