---
apiVersion: codemowers.cloud/v1beta1
kind: SecretClaim
metadata:
  name: dragonfly-auth
  namespace: passmower
spec:
  size: 32
  mapping:
    - key: password
      value: "%(plaintext)s"
    - key: REDIS_URI
      value: "redis://:%(plaintext)s@redis"
---
apiVersion: dragonflydb.io/v1alpha1
kind: Dragonfly
metadata:
  name: redis
  namespace: passmower
spec:
  image: "docker.dragonflydb.io/dragonflydb/dragonfly:v1.21.2@sha256:4a253dffa1f0416c454a758dcbaa86c29c4065aba44b5240fa25e55c5d89baf3"
  authentication:
    passwordFromSecret:
      key: password
      name: dragonfly-auth
  replicas: 3
  topologySpreadConstraints:
    - maxSkew: 1
      topologyKey: topology.kubernetes.io/zone
      whenUnsatisfiable: DoNotSchedule
      labelSelector:
        matchLabels:
          app: redis
          app.kubernetes.io/part-of: dragonfly
  resources:
    limits:
      cpu: 600m
      memory: 750Mi
    requests:
      cpu: 500m
      memory: 500Mi