Replace shared redis-exporter VMPodScrape with per-app scrapes
ci/woodpecker/pr/vector-test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful

Per review: drop the cross-namespace label-selector approach. Each app now
carries its own VMPodScrape next to its redis/valkey manifests, selecting on
the deployment's existing pod labels (mirroring the arrstack exportarr
pattern), so no opt-in monitoring.unkin.net/redis-exporter label is needed.

- Remove the monitoring.unkin.net/redis-exporter pod label from the
  artifactapi/authentik/litellm redis and gitea/netbox valkey deployments
- Delete apps/base/observability/vmpodscrape-redis.yaml
- Add a local-namespace VMPodScrape (port metrics, path /metrics) to
  artifactapi, authentik, litellm (app=redis), gitea (app=gitea-valkey),
  netbox (app=netbox-valkey), and jellyfin (valkey-operator node labels)
This commit is contained in:
2026-08-23 17:27:09 +10:00
parent a2cf77cace
commit 9b154d38f4
20 changed files with 107 additions and 49 deletions
@@ -9,5 +9,4 @@ resources:
- gateway.yaml
- httproute.yaml
- vmpodscrape-cnpg.yaml
- vmpodscrape-redis.yaml
- vmpodscrape-traefik.yaml
@@ -1,40 +0,0 @@
---
# Scrape metrics (:9121) from every redis/valkey pod carrying a redis_exporter
# sidecar in any namespace. Raw redis/valkey Deployments opt in via the
# monitoring.unkin.net/redis-exporter pod label. Picked up by the observability
# VMAgent (selectAllByDefault).
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
name: redis-exporters
namespace: observability
spec:
namespaceSelector:
any: true
selector:
matchLabels:
monitoring.unkin.net/redis-exporter: "true"
podMetricsEndpoints:
- port: metrics
path: /metrics
---
# valkey-operator-managed ValkeyCluster pods (e.g. jellyfin-valkey) get fixed
# operator labels only -- the ValkeyCluster CR has no pod-label passthrough, so
# they cannot carry monitoring.unkin.net/redis-exporter and need their own
# selector. The operator's exporter sidecar also listens on :9121 with a port
# named `metrics`.
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
name: valkey-operator-clusters
namespace: observability
spec:
namespaceSelector:
any: true
selector:
matchLabels:
app.kubernetes.io/managed-by: valkey-operator
app.kubernetes.io/component: valkey-node
podMetricsEndpoints:
- port: metrics
path: /metrics