-
Notifications
You must be signed in to change notification settings - Fork 16.7k
[stable/redis] support redis docker library image #7745
Conversation
Hi @jlegrone. Thanks for your PR. I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @carrodher |
/assign @davidkarlsen |
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is doing two different things, that I think should be split into different PRs, and probably warrant some discussion.
- Changing the default image to Docker Inc.'s Redis
I'm curious what the motivation for this change is -- is there something that Docker Inc.'s Redis image has that the Bitnami Redis image does not? In particular, changing the image of this chart has deeper consequences as it has automation setup to keep the bitnami/redis image up-to-date and secure (e.g. #7065).
- Generalising the chart to support custom Redis images
I'm not fully convinced it makes sense for this chart to try to support every type of Redis image, they're all going to be a little bit different (env vars, volume paths, etc.). This sort of approach will make charts much more complex and harder to maintain and test. Instead, we can create different charts that are tailored to specific usecases (e.g. a redis chart that focuses on making it easy to add extra modules, or includes some more common modules vs a bare bones Redis chart). With the charts project moving to a more distributed chart repositories model, it's going to be more common to see different variants of the same application for different usecases, and they can be hosted and maintained by anyone.
@@ -193,11 +189,12 @@ master: | |||
## Update strategy, can be set to RollingUpdate or onDelete by default. | |||
## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets | |||
statefulset: | |||
updateStrategy: OnDelete | |||
updateStrategy: RollingUpdate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change needed? It is not described in the PR description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied and pasted my updates from values.yaml
, and I think there were a few additional things that had gotten out of sync. This didn't look like a value that should be different in prod environments.
/unassign |
@prydonius thanks for the feedback. Just to be clear, I am a big fan of Bitnami's maintained docker images, and I've had lots of success deploying them in the past. 😄
I actually tried to avoid making the switch as part of this pull request, however I couldn't figure out a way to do it without specifying a default I think it's important to avoid specifying a default command so that users can naively consume the default image entrypoint, which may be doing important things (ie. running
I certainly don't recommend that this chart attempt to support every redis use case or every possible redis image. That said, currently in order to create a custom redis image (to add redis modules, build off a different base image, etc) that is compatible with this chart, reverse engineering what is going on in the There will still be limits on what the chart supports, but this change makes it possible to deploy any image that has
I would very much like to avoid a fork of this chart, as users already have to decide between |
Thanks for the explanations @jlegrone.
I think by overriding the entrypoint there we're bypassing some of the setup the bitnami/redis image does (e.g. validating env vars: https://github.com/bitnami/bitnami-docker-redis/blob/master/4.0/debian-9/rootfs/libredis.sh#L25). Also that image makes more use of the the redis.conf file rather than configuring args for
I see the value in this, but I am still concerned that it might not be that straightforward (though again this may be due to my limitation of Redis knowledge). For example, what if a particular image doesn't support a configuration option that the default one does (replication for example)? I think the potential for confusion when environment variables and other configurations don't transfer over from image to image can lead to a worse experience. I'd love to see if we can resolve this in the bitnami/redis image and try to make the scenarios you're working with easier to achieve. |
Yes, that is exactly what is happening in this changeset: Since Redis 2.6 it is possible to pass any configuration options as flags to https://redis.io/topics/config#passing-arguments-via-the-command-line
Yes, I could use some feedback on exactly what the command array should be for the bitnami image, OR the bitnami image should support accepting args for
Redis images can still bake in custom configuration by specifying an ENTRYPOINT of
There is a difference between
As far as I can tell, the bitnami image does not do anything using bespoke configuration mechanisms that can't also be supported with |
I think that, before chaning the image, we should see if we can implement the missing features in the Bitnami Redis image, so we do not lose all the security and automation features already available. I will forward this information for evaluation. |
6cfd525
to
91068b4
Compare
91068b4
to
198a7f7
Compare
Hi @jlegrone I created this issue on Bitnami Redis Image to discuss how to implement the feature you're requesting: |
Hi @jlegrone We just released a new Bitnami Redis image including the changes that allow you to send the Please feel free to use it (bitnami/redis:4.0.11-r50) and provide us feedback about it. I think this image now supports the missing features so we can continue using bitnami/redis on the chart. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
/remove-lifecycle stale Sorry about the delay -- I made a big move recently and lost track of this PR. Will work on updating based on the recent work to modify the bitnami redis image. |
@juan131 hi, what's the recommended way to load an additional module with the chart? |
cca635f
to
3019cca
Compare
@jlegrone can you resolve the conflict in |
3019cca
to
da4d029
Compare
BREAKING CHANGES: - `master.args` and `slave.args` are removed. Use `master.command` or `slave.command` instead in order to override the image entrypoint, or `master.extraFlags` to pass additional flags to `redis-server`. - `disableCommands` is now interpreted as an array of strings instead of a string of comma separated values. - `master.persistence.path` now defaults to `/data`. Signed-off-by: Jacob LeGrone <git@jacob.work>
Signed-off-by: Jacob LeGrone <git@jacob.work>
da4d029
to
0268d5b
Compare
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlegrone, prydonius The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@jlegrone nice <3 |
* refactor(stable/redis): support redis docker library image BREAKING CHANGES: - `master.args` and `slave.args` are removed. Use `master.command` or `slave.command` instead in order to override the image entrypoint, or `master.extraFlags` to pass additional flags to `redis-server`. - `disableCommands` is now interpreted as an array of strings instead of a string of comma separated values. - `master.persistence.path` now defaults to `/data`. Signed-off-by: Jacob LeGrone <git@jacob.work> * test(stable/redis): add ci values for base images & configurations Signed-off-by: Jacob LeGrone <git@jacob.work> Signed-off-by: Chaoran Yu <yuchaoran2011@gmail.com>
* refactor(stable/redis): support redis docker library image BREAKING CHANGES: - `master.args` and `slave.args` are removed. Use `master.command` or `slave.command` instead in order to override the image entrypoint, or `master.extraFlags` to pass additional flags to `redis-server`. - `disableCommands` is now interpreted as an array of strings instead of a string of comma separated values. - `master.persistence.path` now defaults to `/data`. Signed-off-by: Jacob LeGrone <git@jacob.work> * test(stable/redis): add ci values for base images & configurations Signed-off-by: Jacob LeGrone <git@jacob.work>
seems like |
* refactor(stable/redis): support redis docker library image BREAKING CHANGES: - `master.args` and `slave.args` are removed. Use `master.command` or `slave.command` instead in order to override the image entrypoint, or `master.extraFlags` to pass additional flags to `redis-server`. - `disableCommands` is now interpreted as an array of strings instead of a string of comma separated values. - `master.persistence.path` now defaults to `/data`. Signed-off-by: Jacob LeGrone <git@jacob.work> * test(stable/redis): add ci values for base images & configurations Signed-off-by: Jacob LeGrone <git@jacob.work>
What this PR does / why we need it:
This release switches the default image fromdocker.io/bitnami/redis
todocker.io/redis
. The bitnami image remains compatible with this chart; seevalues-bitnami.yaml
.The default image in this release may be switched out for any image containing the
redis-server
binary. Ifredis-server
is not the default image ENTRYPOINT,master.command
must be specified.This allows
stable/redis
to offer a higher degree of flexibility for those who may need to run images containing redis modules or based on a different linux distribution than what is currently offered by bitnami.Breaking changes:
master.args
andslave.args
are removed. Usemaster.command
orslave.command
instead in order to override the image entrypoint, ormaster.extraFlags
to pass additional flags toredis-server
.disableCommands
is now interpreted as an array of strings instead of a string of comma separated values.master.persistence.path
now defaults to/data
.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged):Related: https://github.com/bitnami/bitnami-docker-redis/issues/92
Special notes for your reviewer:
Several interesting test cases:
helm upgrade --install redis-test ./stable/redis -f ./stable/redis/values-bitnami.yaml
helm upgrade --install redis-test ./stable/redis --set usePassword=false
helm upgrade --install redis-test ./stable/redis --set master.persistence.enabled=false
helm upgrade --install redis-test ./stable/redis --set configmap="maxmemory-policy volatile-lru"
helm upgrade --install redis-test ./stable/redis --set image.repository=redislabs/rejson --set image.tag=latest