apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-exporter
  namespace: redis
spec:
  replicas: 1
  selector:
    matchLabels:
      app: redis-exporter
  template:
    metadata:
      labels:
        app: redis-exporter
      annotations:
        k8s.grafana.com/scrape: "true"
        k8s.grafana.com/metrics.portNumber: "9121"
    spec:
      containers:
        - name: redis-exporter
          image: oliver006/redis_exporter:v1.66.0
          env:
            - name: REDIS_ADDR
              value: redis://redis-master.redis.svc.cluster.local:6379
            - name: REDIS_EXPORTER_CHECK_STREAMS
              value: "*:game-writeback,*:game-writeback-dlq"
          ports:
            - name: metrics
              containerPort: 9121
          resources:
            requests:
              cpu: 10m
              memory: 32Mi
            limits:
              cpu: 50m
              memory: 64Mi
