redis / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.

Home Page:http://redis.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enable redis stream in redis helm chart bitnami with terraform

Marwen-TAALLAH opened this issue · comments

I am trying to deploy a standalone redis with bitnami helm chart and activate the redis stream and set the stream-db-max-len to 100

I have this tf file:

resource "helm_release" "redis" {
  timeout    = 120
  name       = "redis-stream"
  namespace  = var.namespace
  chart      = "oci://registry-1.docker.io/bitnamicharts/redis"
  version    = "18.19.2"
  values = [templatefile("manifests/redis-values.yaml", {
    redis_deployment_name = var.redis_deployment_name
    redis_affinity      = var.redis_affinity
    redis_nodeSelector  = var.redis_nodeSelector
    redis_tolerations   = var.redis_default_tolerations
  })]
}

and my redis-values.yaml file with this content:

architecture: standalone

fullnameOverride: ${redis_deployment_name}
auth:
  password: "redis"

master:
  ${ indent(2, redis_affinity) }
  ${ indent(2, redis_nodeSelector) }
  ${ indent(2, redis_tolerations) }
  persistence:
    enabled: false
  resources:
    limits:
      cpu: 350m
      memory: 700Mi
    requests:
      cpu: 100m
      memory: 256Mi
  extraFlags:
    - stream-db-max-len 100

pdb:
  enabled: true

# Eexplicit Activation of Redis Stream
redisStreamEnabled: true

The problem is that this piece of code:

extraFlags:
    - stream-db-max-len 100

is causing the pod to CrashLoopBackOff and the logs of the pod are this:

*** FATAL CONFIG FILE ERROR (Redis 7.2.4) ***
Reading the configuration file, at line 6
>>> 'include "/opt/bitnami/redis/etc/master.conf" "stream-db-max-len 100"'

Bad directive or wrong number of arguments

because when i remove this:

extraFlags:
    - stream-db-max-len 100

I get the pod to run but the stream-db-max-len will be set to (empty array).
image

@Marwen-TAALLAH stream-db-max-len is not a valiable config for Redis, do you mean stream-node-max-entries?