Skip to content

Instantly share code, notes, and snippets.

@akhenakh
Created January 17, 2023 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhenakh/3b9932b527f3e8ebad47f65b64411178 to your computer and use it in GitHub Desktop.
Save akhenakh/3b9932b527f3e8ebad47f65b64411178 to your computer and use it in GitHub Desktop.
Quick and dirty Grafana Tempo deployment for Kubernetes, 1 hour retention, good for development
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: tempo
namespace: tempo
spec:
selector:
matchLabels:
app: tempo
serviceName: "tempo"
minReadySeconds: 10
template:
metadata:
labels:
app: tempo
spec:
terminationGracePeriodSeconds: 10
containers:
- name: tempo
image: grafana/tempo:1.5.0
args: ["-config.file", "/etc/tempo/tempo.yaml"]
ports:
- containerPort: 3200
name: web
- containerPort: 9095
name: grpc
- containerPort: 4317
name: otlp-grpc
volumeMounts:
- name: tempodata
mountPath: /data
- name: config
mountPath: /etc/tempo
readOnly: true
volumes:
- name: config
configMap:
name: tempo-cm
volumeClaimTemplates:
- metadata:
name: tempodata
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: tempo
spec:
clusterIP: None
selector:
app: tempo
ports:
- port: 3200
name: web
protocol: TCP
targetPort: web
- port: 9095
protocol: TCP
name: grpc
targetPort: grpc
- port: 4317
protocol: TCP
name: otlp-grpc
targetPort: otlp-grpc
type: ClusterIP
---
apiVersion: v1
kind: ConfigMap
metadata:
name: tempo-cm
data:
tempo.yaml: |
server:
http_listen_port: 3200
distributor:
receivers:
otlp:
protocols:
http:
grpc:
opencensus:
ingester:
max_block_bytes: 1_000_000 # cut the head block when it hits this size or ...
max_block_duration: 5m # this much time passes
compactor:
compaction:
compaction_window: 1h # blocks in this time window will be compacted together
max_block_bytes: 100_000_000 # maximum size of compacted blocks
block_retention: 1h
compacted_block_retention: 10m
storage:
trace:
backend: local # backend configuration to use
block:
bloom_filter_false_positive: .05 # bloom filter false positive rate. lower values create larger filters but fewer false positives
index_downsample_bytes: 1000 # number of bytes per index record
encoding: zstd # block encoding/compression. options: none, gzip, lz4-64k, lz4-256k, lz4-1M, lz4, snappy, zstd, s2
wal:
path: /data/wal # where to store the the wal locally
encoding: snappy # wal encoding/compression. options: none, gzip, lz4-64k, lz4-256k, lz4-1M, lz4, snappy, zstd, s2
local:
path: /data/trace
pool:
max_workers: 100 # worker pool determines the number of parallel requests to the object store backend
queue_depth: 10000
metrics_generator_enabled: false
search_enabled: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment