# OPTIONAL — requires the Prometheus Operator (monitoring.coreos.com CRDs). # It is intentionally NOT in kustomization.yaml so `kubectl apply -k k8s/` works # on a vanilla cluster. Apply it separately only if you run the Operator: # kubectl apply -f k8s/servicemonitor.yaml # Without the Operator, use the pod's prometheus.io/* scrape annotations instead. # Alert rules + dashboard: docs/ops/prometheus-alerts.yaml, docs/ops/grafana-dashboard.json. apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: tidaldb namespace: tidaldb labels: app.kubernetes.io/name: tidaldb spec: selector: matchLabels: app.kubernetes.io/name: tidaldb endpoints: - port: metrics path: /metrics interval: 30s