0

I'm creating redis-stack helm chart for the pet project. I would like to know on how to pass custom redis configurations to kubenetes statefulset of redis-stack.

There are no mention of such configurations at the https://github.com/redis-stack/helm-redis-stack/tree/main/charts/redis-stack

With custom configurations on redis-stack, I would like to change default password, set policies etc.

Above link incudes below:

  • statefulset yaml
  • helm chart values.yaml files
  • Image used: redis/redis-stack
Jay Modi
  • 3,161
  • 4
  • 35
  • 52

1 Answers1

0

You can create a secret in your K8 namespace and use it as an env variable for the redis-stack or redis-stack-server template (whichever one you are using). The redis stack will pick up a REDIS_ARGS environment variable on start-up and apply it as command line args. The secret should contain a key/value pair, with the key being something like redis-args and the value being the command line args you want to use for your instance.
For example, if you want to set a custom password, you would set the redis-args value as:

--requirepass <your password>

Then, update the template with the following under the containers section of the spec

    spec:
      ...
      containers:
      - name: ...
        ...
        env:
        - name: REDIS_ARGS
          valueFrom:
            secretKeyRef:
              name: redis-stack-server
              key: redis-args

Hope this helps.