Skip to content

Redis: round 1, single container, functional service

Marin Jankovski requested to merge 66-create-redis-chart into master

Redis: use init container to create redis.conf

In the previous POC (#66 (closed)), the configuration of the Redis instance while using the upstream container was complete, with the limitation of setting the password for the Redis instance via requirepass as a command line argument failed. This builds upon that work, but adds an initContainer that appends the requirepass ${redis-password} to the end of the redis.conf that is provided via ConfigMap and places it into an emptyDir tmpfs mount that is shared between containers in the pod. The Redis container then uses that generated redis.conf.

The initContainer used here is busybox to maintain a minimal impact. The container calls /config/configure, which is mapped from the ConfigMap. This allows us programmatic, template controllable additions for other items of Secrets that might be needed in the future.

This model may serve us well for any other upstream containers we seek to use, but configure in ways that their original authors did not forsee (e.g. complex Helm templating)

Relates to #47 (closed)

cc @marin This MR updated and containing work from @WarheadsSE

Edited by Jason Plum

Merge request reports