Files
fancy-dns/deploy/k8s/30-ingress.yaml
T
matsandClaude Sonnet 5.5 7fd6a7e7a5 Add a Grafana dashboard for the resolver's metrics
With traffic charts gone from the console, deploy/grafana/fancy-dns.json is
where they live: queries by outcome, transport and client group, latency
quantiles, RCODEs, cache hits/misses/stale, the upstream round trips saved by
coalescing and early refresh, upstream health and latency, blocklist and zone
sizes, and (in a Loki row) the blocked/failed-query access log. A node variable
spreads or narrows every panel, and the per-node panel shows whether load is
even across pods.

A test reads the dashboard and fails if a panel queries a metric the resolver
does not export, so a rename cannot silently empty a panel.

The ingress no longer needs the SSE buffering/timeout annotations, and the
statefulset comments no longer describe a query log on the volume.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 09:57:38 +02:00

63 lines
1.7 KiB
YAML

# The console, the admin API and the DoH endpoint, behind TLS.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: fancy-dns
namespace: dns
labels:
app.kubernetes.io/name: fancy-dns
annotations:
k8s-helper.io/name: "fancy-dns"
k8s-helper.io/description: "Recursive DNS resolver and admin dashboard"
k8s-helper.io/group: "Infrastructure"
k8s-helper.io/icon: "network"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: nginx
rules:
- host: dns.k6n.net
http:
paths:
# DoH must be matched before the catch-all below, and both are
# Prefix paths on distinct roots so the order is not load-bearing.
- path: /dns-query
pathType: Prefix
backend:
service:
name: fancy-dns-web
port:
name: doh
- path: /api
pathType: Prefix
backend:
service:
name: fancy-dns-web
port:
name: admin
# The embedded console.
- path: /
pathType: Prefix
backend:
service:
name: fancy-dns-web
port:
name: admin
tls:
- hosts: [dns.k6n.net]
secretName: fancy-dns-tls
---
# Two replicas means one of them can always be taken away for a node drain.
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: fancy-dns
namespace: dns
labels:
app.kubernetes.io/name: fancy-dns
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/name: fancy-dns