Export and scrape metrics from all redis/valkey instances #398

Merged
benvin merged 3 commits from benvin/redis-metrics into main 2026-08-23 19:19:16 +10:00
Member

Why

No redis/valkey instance managed in this repo exports metrics today — the six caches (artifactapi, authentik, litellm, gitea, netbox, jellyfin) are blind spots in VictoriaMetrics.

What

  • Enables the valkey-operator exporter sidecar on the jellyfin ValkeyCluster (exporter.enabled: true); overrides the operator's default bare-dockerhub image (oliver006/redis_exporter:v1.80.0) with the artifactapi-proxied pin. The operator manages a dedicated _exporter ACL user for it.
  • Adds a metrics-exporter sidecar (artifactapi.k8s.syd1.au.unkin.net/dockerhub/oliver006/redis_exporter:v1.89.0, :9121, port name metrics, req 32Mi/25m lim 64Mi/100m) to the five raw Deployments: artifactapi/authentik/litellm redis and gitea/netbox valkey. gitea/netbox sidecars get the same restrictive securityContext as their valkey container.
  • Adds the monitoring.unkin.net/redis-exporter: "true" opt-in pod label to all five pod templates.
  • Adds apps/base/observability/vmpodscrape-redis.yaml with two VMPodScrapes (any namespace, port metrics): redis-exporters selecting the opt-in label, and valkey-operator-clusters selecting app.kubernetes.io/managed-by: valkey-operator + app.kubernetes.io/component: valkey-node — the ValkeyCluster CR has no pod-label passthrough (verified against the v0.5.0 CRD/source), so operator pods cannot carry the opt-in label.

Notes

  • No instance runs with requirepass/auth, so no REDIS_PASSWORD wiring is needed on the raw Deployments; the jellyfin exporter auth is operator-managed.
  • Validated: kustomize build on every touched base + au-syd1 overlay (helm overlays with --enable-helm) and kubeconform -strict -ignore-missing-schemas (68 valid, 0 invalid).
## Why No redis/valkey instance managed in this repo exports metrics today — the six caches (artifactapi, authentik, litellm, gitea, netbox, jellyfin) are blind spots in VictoriaMetrics. ## What - Enables the valkey-operator exporter sidecar on the jellyfin ValkeyCluster (`exporter.enabled: true`); overrides the operator's default bare-dockerhub image (`oliver006/redis_exporter:v1.80.0`) with the artifactapi-proxied pin. The operator manages a dedicated `_exporter` ACL user for it. - Adds a `metrics-exporter` sidecar (`artifactapi.k8s.syd1.au.unkin.net/dockerhub/oliver006/redis_exporter:v1.89.0`, :9121, port name `metrics`, req 32Mi/25m lim 64Mi/100m) to the five raw Deployments: artifactapi/authentik/litellm redis and gitea/netbox valkey. gitea/netbox sidecars get the same restrictive securityContext as their valkey container. - Adds the `monitoring.unkin.net/redis-exporter: "true"` opt-in pod label to all five pod templates. - Adds `apps/base/observability/vmpodscrape-redis.yaml` with two VMPodScrapes (any namespace, port `metrics`): `redis-exporters` selecting the opt-in label, and `valkey-operator-clusters` selecting `app.kubernetes.io/managed-by: valkey-operator` + `app.kubernetes.io/component: valkey-node` — the ValkeyCluster CR has no pod-label passthrough (verified against the v0.5.0 CRD/source), so operator pods cannot carry the opt-in label. ## Notes - No instance runs with `requirepass`/auth, so no REDIS_PASSWORD wiring is needed on the raw Deployments; the jellyfin exporter auth is operator-managed. - Validated: `kustomize build` on every touched base + au-syd1 overlay (helm overlays with `--enable-helm`) and `kubeconform -strict -ignore-missing-schemas` (68 valid, 0 invalid).
unkin-agent added 1 commit 2026-08-23 12:36:39 +10:00
Export and scrape metrics from all redis/valkey instances
ci/woodpecker/pr/vector-test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful
8636d16773
No redis/valkey instance in the estate exports metrics today. Adds a
pinned redis_exporter (v1.89.0 via the artifactapi dockerhub remote)
next to every instance and two cluster-wide VMPodScrapes so the
observability VMAgent picks them all up.

- enables the valkey-operator exporter sidecar on the jellyfin
  ValkeyCluster, overriding the operator's bare-dockerhub default image
  with the artifactapi-proxied pin
- adds a metrics-exporter sidecar (:9121, port name metrics) to the
  artifactapi/authentik/litellm redis and gitea/netbox valkey
  Deployments, with the monitoring.unkin.net/redis-exporter opt-in pod
  label
- adds VMPodScrape redis-exporters selecting that label in any
  namespace, and VMPodScrape valkey-operator-clusters for
  operator-managed pods whose labels are fixed (the ValkeyCluster CR has
  no pod-label passthrough)
unkinben added 1 commit 2026-08-23 16:35:07 +10:00
Merge remote-tracking branch 'origin/main' into benvin/redis-metrics
ci/woodpecker/pr/vector-test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful
a2cf77cace
# Conflicts:
#	apps/base/observability/kustomization.yaml
unkinben added 1 commit 2026-08-23 17:27:11 +10:00
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
9b154d38f4
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)
Author
Member

Reworked per review in 9b154d3: dropped the shared label-selector approach in favour of explicit per-app scrape objects.

  • Removed the monitoring.unkin.net/redis-exporter opt-in pod label from all 5 raw deployments (artifactapi/authentik/litellm redis, gitea/netbox valkey); exporter sidecars unchanged
  • Deleted apps/base/observability/vmpodscrape-redis.yaml (both cross-namespace scrapes) and its kustomization entry
  • Added a vmpodscrape.yaml in each app's own base dir, mirroring the arrstack exportarr pattern: local-namespace selector on the deployment's existing pod labels (app: redis / app: gitea-valkey / app: netbox-valkey), port metrics, path /metrics
  • jellyfin gets its own VMPodScrape in apps/base/jellyfin selecting the valkey-operator node labels (app.kubernetes.io/managed-by: valkey-operator + app.kubernetes.io/component: valkey-node)
  • Sidecars and the jellyfin ValkeyCluster exporter.enabled + image override are unchanged

Validated: kustomize build (incl. --enable-helm overlays) for all 7 touched apps' base + au-syd1, kubeconform clean with the CI schema locations.

Reworked per review in 9b154d3: dropped the shared label-selector approach in favour of explicit per-app scrape objects. - Removed the `monitoring.unkin.net/redis-exporter` opt-in pod label from all 5 raw deployments (artifactapi/authentik/litellm redis, gitea/netbox valkey); exporter sidecars unchanged - Deleted `apps/base/observability/vmpodscrape-redis.yaml` (both cross-namespace scrapes) and its kustomization entry - Added a `vmpodscrape.yaml` in each app's own base dir, mirroring the arrstack exportarr pattern: local-namespace selector on the deployment's existing pod labels (`app: redis` / `app: gitea-valkey` / `app: netbox-valkey`), port `metrics`, path `/metrics` - jellyfin gets its own VMPodScrape in `apps/base/jellyfin` selecting the valkey-operator node labels (`app.kubernetes.io/managed-by: valkey-operator` + `app.kubernetes.io/component: valkey-node`) - Sidecars and the jellyfin ValkeyCluster `exporter.enabled` + image override are unchanged Validated: `kustomize build` (incl. `--enable-helm` overlays) for all 7 touched apps' base + au-syd1, kubeconform clean with the CI schema locations.
benvin merged commit 13a04a6ebc into main 2026-08-23 19:19:16 +10:00
benvin deleted branch benvin/redis-metrics 2026-08-23 19:19:16 +10:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/argocd-apps#398