---
# Scrape the operator-injected redis_exporter sidecar (:9121, port name
# `metrics`) on the fafflix-valkey ValkeyNode pods. The valkey-operator gives
# its pods fixed labels only (no pod-label passthrough on the ValkeyCluster CR),
# so select on the operator-managed labels. Picked up by the observability
# VMAgent (selectAllByDefault).
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
  name: valkey-exporter
  namespace: fafflix
spec:
  selector:
    matchLabels:
      app.kubernetes.io/managed-by: valkey-operator
      app.kubernetes.io/component: valkey-node
  podMetricsEndpoints:
    - port: metrics
      path: /metrics
