2026-10-12 13:24:38 +03:30
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: prometheus
|
|
|
|
|
spec:
|
|
|
|
|
replicas: 1
|
|
|
|
|
strategy:
|
|
|
|
|
type: Recreate
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
app: prometheus
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: prometheus
|
|
|
|
|
spec:
|
|
|
|
|
containers:
|
|
|
|
|
- name: prometheus
|
|
|
|
|
image: prom/prometheus:v3.5.0
|
|
|
|
|
args:
|
|
|
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
|
|
|
- --storage.tsdb.path=/prometheus
|
|
|
|
|
- --storage.tsdb.retention.time=15d
|
|
|
|
|
- --web.enable-lifecycle
|
|
|
|
|
- --web.enable-remote-write-receiver
|
|
|
|
|
# Not in the Ansible template. Without it Prometheus discards the
|
|
|
|
|
# exemplars Tempo's metrics-generator remote-writes
|
|
|
|
|
# (send_exemplars: true), so the datasource's
|
|
|
|
|
# exemplarTraceIdDestinations has nothing to link.
|
|
|
|
|
- --enable-feature=exemplar-storage
|
|
|
|
|
ports:
|
|
|
|
|
- containerPort: 9090
|
|
|
|
|
readinessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /-/ready
|
|
|
|
|
port: 9090
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
cpu: 50m
|
|
|
|
|
memory: 256Mi
|
|
|
|
|
limits:
|
|
|
|
|
memory: 1Gi
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: config
|
|
|
|
|
mountPath: /etc/prometheus/prometheus.yml
|
|
|
|
|
subPath: prometheus.yml
|
|
|
|
|
- name: rules
|
|
|
|
|
mountPath: /etc/prometheus/rules
|
|
|
|
|
- name: data
|
|
|
|
|
mountPath: /prometheus
|
2026-10-19 20:31:10 +03:30
|
|
|
- name: scrape-auth
|
|
|
|
|
mountPath: /etc/prometheus/secrets
|
|
|
|
|
readOnly: true
|
2026-10-12 13:24:38 +03:30
|
|
|
volumes:
|
|
|
|
|
- name: config
|
|
|
|
|
configMap:
|
|
|
|
|
name: prometheus-config
|
|
|
|
|
- name: rules
|
|
|
|
|
configMap:
|
|
|
|
|
name: prometheus-rules
|
|
|
|
|
- name: data
|
|
|
|
|
persistentVolumeClaim:
|
|
|
|
|
claimName: prometheus-data
|
2026-10-19 20:31:10 +03:30
|
|
|
# Basic-auth credentials for the `ledgerline` scrape job, created by
|
|
|
|
|
# create-secrets.sh. Optional so a missing secret costs that job's
|
|
|
|
|
# scrapes (up == 0) rather than the whole Prometheus pod.
|
|
|
|
|
- name: scrape-auth
|
|
|
|
|
secret:
|
|
|
|
|
secretName: prometheus-scrape-auth
|
|
|
|
|
optional: true
|