# Default values for redis.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

redis:
  image:
    registry: docker-registry.zooxlabs.com
    repository: bitnami-redis
    ## Bitnami Redis image tag
    ## ref: https://github.com/bitnami/bitnami-docker-redis#supported-tags-and-respective-dockerfile-links
    ##
    tag: 5.0.5-debian-9-r169
    pullPolicy: IfNotPresent

  fullnameOverride: redis

  ## Cluster settings
  cluster:
    enabled: true
    slaveCount: 1

  ## Redis pod Security Context
  securityContext:
    enabled: true
    fsGroup: 1001
    runAsUser: 1001

  ## Use password authentication
  usePassword: false

  ##
  ## Redis Master parameters
  ##
  master:
    # Same as current AWS ElastiCache configuration:
    # cache.m4.large 2vCPU 6.42GiB Moderate
    resources:
      requests:
        memory: 6Gi
        cpu: 2000m

    ## Redis Master Node selectors
    nodeSelector:
      beta.kubernetes.io/arch: amd64
      zooxlabs.com/pool: general # Prevent GPU nodes

    ## Enable persistence using Persistent Volume Claims
    persistence:
      enabled: true
      ## redis data Persistent Volume Storage Class
      storageClass: "nfs-client"
      size: 8Gi


  ##
  ## Redis Slave properties
  ## Note: service.type is a mandatory parameter
  ## The rest of the parameters are either optional or, if undefined, will inherit those declared in Redis Master
  ##
  slave:
    ## Slave Service properties
    service:
      ## Redis Slave Service type
      type: ClusterIP

    ## Redis slave Resource
    resources:
      requests:
        memory: 6Gi
        cpu: 1000m

    ## Redis slave selectors for pod assignment
    nodeSelector:
      beta.kubernetes.io/arch: amd64
      zooxlabs.com/pool: general # Prevent GPU nodes

    ## Enable persistence using Persistent Volume Claims
    persistence:
      enabled: true
      ## redis data Persistent Volume Storage Class
      storageClass: "nfs-client"
      size: 8Gi

  ## Prometheus Exporter / Metrics
  ##
  metrics:
    enabled: true

    # Enable this if you're using https://github.com/coreos/prometheus-operator
    serviceMonitor:
      enabled: true
