apiVersion: apps/v1
kind: Deployment
metadata:
name: thanos-querier
namespace: monitoring
labels:
spec:
replicas: 1
selector:
matchLabels:
template:
metadata:
labels:
spec:
# affinity:
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - podAffinityTerm:
# labelSelector:
# matchExpression:
# operator: In
# values:
# - thanos-querier
# weight: 100
containers:
- args:
- query
- --log.level=debug
- --query.auto-downsampling
- --query.partial-response
- --query.replica-label=prometheus_replica
# Thanos Querier automatically discover by dns SRV by the headless service
- --store=dnssrv+_grpc._tcp.thanos-store-sidecar.default.svc.cluster.local:10901
- --store=dnssrv+_grpc._tcp.prometheus-headless.thanos.svc.cluster.local
- --store=dnssrv+_grpc._tcp.thanos-store.thanos.svc.cluster.local
image: thanosio/thanos:v0.12.2
livenessProbe:
failureThreshold: 4
httpGet:
path: /-/healthy
port: 9090
scheme: HTTP
periodSeconds: 30
name: thanos-querier
ports:
- containerPort: 10901
name: grpc
- containerPort: 9090
name: http
readinessProbe:
failureThreshold: 20
httpGet:
path: /-/ready
port: 9090
scheme: HTTP
periodSeconds: 5
terminationMessagePolicy: FallbackToLogsOnError
terminationGracePeriodSeconds: 120