Skip to content
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

[bitnami/redis] Expose ports for TLS and non-TLS connections #16235

Open
romankarnaukh opened this issue Apr 26, 2023 · 7 comments
Open

[bitnami/redis] Expose ports for TLS and non-TLS connections #16235

romankarnaukh opened this issue Apr 26, 2023 · 7 comments
Assignees
Labels
feature-request on-hold Issues or Pull Requests with this label will never be considered stale redis

Comments

@romankarnaukh
Copy link

Name and Version

bitnami/redis 17.7.4

What is the problem this feature will solve?

When enabling TLS with a certificate issued by Letsencrypt, the certificate does not include cluster local domain as well as "localhost" and "127.0.0.1" in the SAN which is expected because the domain name should end with a valid public suffix (TLD). So the probes and connections via cluster DNS to redis fail.

What is the feature you are proposing to solve the problem?

According to the documentation https://redis.io/docs/management/security/encryption/ it is possible to access Redis on different ports using TLS and non-TLS connections simultaneously.

In my setup I use replication, so replicas connect to the master via tls even internally within the cluster network but because sometimes it's not possible to provide a proper certificate the internal connections to the master should be done without TLS.

So with this feature, we want to connect to Redis master outside of the kubernetes cluster (AKS) via TLS using an external load balancer and keep non-TLS connections internally. The Kubernetes load balancer exposes IP which is then added to a private subdomain zone.

What alternatives have you considered?

Would be good to receive any suggests if you have

@github-actions github-actions bot added the triage Triage is needed label Apr 26, 2023
@javsalgar javsalgar added the redis label May 2, 2023
@github-actions github-actions bot added in-progress and removed triage Triage is needed labels May 2, 2023
@bitnami-bot bitnami-bot assigned jotamartos and unassigned javsalgar May 2, 2023
@jotamartos
Copy link
Contributor

Thank you for your suggestion but the Redis container supports TLS and non-TLS connections at the same time (REDIS_PORT_NUMBER vs REDIS_TLS_PORT)

https://github.com/bitnami/containers/tree/main/bitnami/redis#securing-redisr-traffic
https://github.com/bitnami/containers/blob/main/bitnami/redis/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh#L418

The chart uses .Values.master.containerPorts.redis to set both env vars depending on if TLS is enabled or not, but you can configure the TLS settings in the chart as usual and set the REDIS_PORT_NUMBER env var in the extraEnvVars parameter to set a non-TLS port.

Will that work for you?

@github-actions
Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label May 21, 2023
@eric-oracle
Copy link

eric-oracle commented May 23, 2023

Will that work for you?

The suggested approach doesn't work because as soon as tls.enabled is set to true, the argument --port 0 is added which makes redis not look at the environment variable REDIS_PORT.

In other words, the author of the bitnami/redis chart have on purpose disabled the non-authenticated port when TLS is enabled, without leaving any option to allow both plain and tls.

@github-actions github-actions bot removed the stale 15 days without activity label May 24, 2023
@jotamartos
Copy link
Contributor

You are right @eric-oracle. I just created an internal task to update the solution to allow tls and non-tls ports work simultaneously. I can't provide you with an ETA on when this will be available but we will update this ticket once we have more information.

Thanks

@github-actions github-actions bot added on-hold Issues or Pull Requests with this label will never be considered stale and removed in-progress labels May 24, 2023
@jelmokri
Copy link

jelmokri commented Sep 4, 2024

any news ? need also the possiblity to have both TLS & non TLS port

@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement!
Due to other priorities in the team, we didn't work on this feature. If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Please feel free to contact us if you have any questions or need assistance.

@gabriel-suela
Copy link

any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request on-hold Issues or Pull Requests with this label will never be considered stale redis
Projects
None yet
Development

No branches or pull requests

7 participants