DandyDeveloper / charts

Various helm charts migrated from [helm/stable] due to deprecation
https://dandydeveloper.github.io/charts
Apache License 2.0
157 stars 145 forks source link

[charts/redis-ha] Fix redis-cli --tls argument usage #237

Closed terricain closed 1 year ago

terricain commented 2 years ago

What this PR does / why we need it:

When you run Redis with TLS with authClients set to "no", the fix-split-brain sidecar does not talk to Redis or Sentinel over TLS. authClients only configures whether or not mutual TLS is required therefore moving the --tls --cacert arguments out of the conditional checking authClients fixes this issue.

Also updated the TLS_CLIENT_OPTION so that --cert and --key are only used if client authentication is required.

Example Helm values snippet ```yaml redis: port: 0 tlsPort: 6385 tlsReplication: true authClients: "no" sentinel: # Disable non-TLS port port: 0 tlsPort: 26385 tlsReplication: true authClients: "no" tls: secretName: cert-redis certFile: tls.crt keyFile: tls.key caCertFile: ca.crt ```

Which issue this PR fixes

Didn't raise an issue, though I can if it helps.

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

DandyDeveloper commented 1 year ago

@terrycain Thank you, LGTM, will be getting a lot of stuff merged today. Sorry for taking so long, lots going on IORL