apiVersion: v1 kind: Service metadata: name: prop-metrics namespace: prop labels: app: prop purpose: metrics spec: type: NodePort # Don't pin scrapes to a single pod — we want Prometheus to sample # across all replicas so BEAM-level metrics (memory, scheduler util) # stay representative. DB-backed gauges (oban queue depth) are # identical across pods so per-scrape rotation is fine there too. sessionAffinity: None selector: app: prop # Restrict to hot pods. prop-backfill carries the same `app: prop` # label but runs PHX_SERVER=false (no listener on :5000), so an # unscoped selector lands ~50% of scrapes on a closed port. tier: hot ports: - name: metrics # Fixed high-numbered NodePort so the external Prometheus at # 10.0.15.31 can scrape `nodeIP:30090` without needing k8s SD. nodePort: 30090 port: 5000 targetPort: 5000 protocol: TCP