-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
sentinel: Add SentinelManagedSSLConnection #1419
Conversation
Hi, following up on #1306 Example code to make it work: import redis
import redis.sentinel
sentinel = redis.sentinel.Sentinel(
[('x.x.x.x', 29876),],
connection_class=redis.sentinel.SentinelManagedSSLConnection,
ssl_keyfile='/redis/tls-gen/basic/result/client_key.pem',
ssl_certfile='/redis/tls-gen/basic/result/client_certificate.pem',
ssl_ca_certs='/redis/tls-gen/basic/result/ca_certificate.pem',
ssl_cert_reqs='required',
)
master = sentinel.master_for('mymaster')
master.ping()
master.get('a') |
@andymccurdy Any chance of getting this merged/released ? |
@AbdealiJK I'd love to get this into the upcoming release and support celery. Would you mind making the changes necessary to move things into the new mixins? After, that, I'll merge. |
Hello @chayim, what are the missing changes necessary? |
Create a simple class which takes in both: - SentinelManaged - SSLConnection in cases where the sentinel is being used with a TLS enabled redis setup.
a907f6e
to
98e7071
Compare
Thank you @AbdealiJK for your work, I ended up the same solution after one hour of reverse engineering, I should have checked the issues/PR before 😅 |
Looks great everyone! Thank you so much for following up and clearing this off. On the backlog side, I intend to get some test in, but this seems reasonable to me. Merging! |
Thank you both ! |
@chayim do you plan to release it before the 4.0 ? |
Pull Request check-list
Please make sure to review and check all of these items:
$ tox
pass with this change (including linting)?Description of change
Create a simple class which taken in both:
in cases where the sentinel is being used with a TLS enabled redis
setup.