# Redis cache configuration
image:
  repository: redis
  pullPolicy: IfNotPresent
  tag: "7-alpine"

# Redis can run standalone or with replicas
architecture: standalone  # standalone or replication

master:
  replicas: 1

replica:
  replicas: 2

serviceAccount:
  create: true
  name: ""

podSecurityContext:
  runAsNonRoot: true
  runAsUser: 999
  fsGroup: 999

securityContext:
  allowPrivilegeEscalation: false
  capabilities:
    drop:
    - ALL

service:
  type: ClusterIP
  port: 6379

# Persistence
persistence:
  enabled: true
  storageClass: "standard"
  accessMode: ReadWriteOnce
  size: 8Gi

# Redis configuration
redis:
  # Max memory configuration (in MB)
  maxmemory: 256
  # Eviction policy
  maxmemoryPolicy: allkeys-lru
  # Enable AOF persistence
  appendonly: "yes"
  # Password protection
  password: ""

resources:
  limits:
    cpu: 500m
    memory: 512Mi
  requests:
    cpu: 250m
    memory: 256Mi

livenessProbe:
  exec:
    command:
      - redis-cli
      - ping
  initialDelaySeconds: 30
  periodSeconds: 10

readinessProbe:
  exec:
    command:
      - redis-cli
      - ping
  initialDelaySeconds: 5
  periodSeconds: 5

nodeSelector: {}
tolerations: []
affinity: {}
