Skip to content

Instantly share code, notes, and snippets.

@stand-sure
Created February 28, 2024 20:39
Show Gist options
  • Save stand-sure/3c28d46a5581880261b7474a34441528 to your computer and use it in GitHub Desktop.
Save stand-sure/3c28d46a5581880261b7474a34441528 to your computer and use it in GitHub Desktop.
Clickhouse & Jaeger

jaeger-config.yaml

Set values for address, username, and password.

Make the password into a hash for the clickhouse installation.

printf `printf 'my-password' | sha256sum` ; echo

# 6fa2288c361becce3e30ba4c41be7d8ba01e3580566f7acc76a7f99994474c46

Clickhouse

Add the user to your ClickHouseInstallation

apiVersion: clickhouse.altinity.com/v1
kind: ClickHouseInstallation
metadata:
  name: my-name
  namespace: observability
spec:
  configuration:
    users:
      jaeger/password_sha256_hex: 6fa2288c361becce3e30ba4c41be7d8ba01e3580566f7acc76a7f99994474c46
      jaeger/networks/ip:
        - "10.0.0.0/16"
        - "0.0.0.0/0"
        - "::/0"
      jaeger/allow_databases/database:
        - default
# ... elided ...

jaeger.yaml

Set the storage with a config similar to

  storage:
    type: grpc-plugin
    grpcPlugin:
      image: ghcr.io/jaegertracing/jaeger-clickhouse:0.13.0
    options:
      grpc-storage-plugin:
        binary: /plugin/jaeger-clickhouse
        configuration-file: /plugin-config/config.yaml
        log-level: debug

Mount the config.yaml file

  volumeMounts:
    - name: plugin-config
      mountPath: /plugin-config
  volumes:
    - name: plugin-config
      secret:
        secretName: jaeger-clickhouse  
apiVersion: v1
kind: Secret
metadata:
name: jaeger-clickhouse
namespace: observability
stringData:
- config.yaml: |-
address: SVC_NAME:9000
username: USER_NAME
password: PASSWORD
spans_table:
spans_index_table:
operations_table:
apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
name: jaeger
namespace: observability
spec:
strategy: allinone
allInOne:
options:
collector:
otlp:
enabled: true
http:
host-port: 4318
grpc:
host-port: 4317
prometheus:
server-url: "http://kube-prometheus-stack-prometheus.monitoring.svc:9090"
query:
support-spanmetrics-connector: true
# for breaking changes at https://github.com/jaegertracing/jaeger/releases/tag/v1.47.0
normalize-calls: true
normalize-duration: true
log-level: debug
metricsStorage:
type: prometheus
storage:
type: grpc-plugin
grpcPlugin:
image: ghcr.io/jaegertracing/jaeger-clickhouse:0.13.0
options:
grpc-storage-plugin:
binary: /plugin/jaeger-clickhouse
configuration-file: /plugin-config/config.yaml
log-level: debug
memory:
max-traces: 100000
volumeMounts:
- name: plugin-config
mountPath: /plugin-config
volumes:
- name: plugin-config
secret:
secretName: jaeger-clickhouse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment