-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add redis cluster config #5799
base: develop
Are you sure you want to change the base?
Add redis cluster config #5799
Conversation
@paulbauriegel , would it be easy to include this too? #5800 |
It's a bit of a different feature request right? value: redis://{{ .Release.Name }}-redis-master:6379/0 configurable via the values.yaml generally I can have a look but I think it's unrelated. |
It should work with two changes
I'm just not sure if this should be part of this MR or you better set-up a new one? - Up to you @davidberenstein1957 :-) |
Hi @paulbauriegel, adding it to this MR is fine by me :) Thanks for all the help! |
Co-authored-by: David Berenstein <[email protected]>
@@ -114,6 +114,7 @@ class Settings(BaseSettings): | |||
cors_origins: List[str] = ["*"] | |||
|
|||
redis_url: str = "redis://localhost:6379/0" | |||
redis_use_cluster: bool = False |
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.
the idea was to have the same prefix redis_
for all settings same is for elasticsearch_
or other settings. I do not want to break with this pattern
@davidberenstein1957 I added an |
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.
LFTM! small remark w.r.t. changelof formatting.
@@ -114,6 +114,7 @@ class Settings(BaseSettings): | |||
cors_origins: List[str] = ["*"] | |||
|
|||
redis_url: str = "redis://localhost:6379/0" | |||
redis_use_cluster: bool = False |
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.
Yes, that looks clean :)
Co-authored-by: David Berenstein <[email protected]>
Support Redis Cluster
We are using a redis cluster setup, but the current code uses redis.from_url which only works for Redis Standalone. See: https://github.com/redis/redis-py/blob/ceb12fe8b52f488bd1e0a42b9dc53161e77514d0/redis/utils.py#L33
So I added a config-option to support Redis Cluster which should not break the current default behavior only extend it.
Type of change
How Has This Been Tested
AWS Redis cluster deployment
Checklist