Repository navigation
feat(helm): support TLS for external Redis on all components - #337
Open
chidambaram27 wants to merge 1 commit into
Open
chidambaram27 wants to merge 1 commit into
chidambaram27 wants to merge 1 commit into
Conversation
Add redis.external.tls and redis.external.useAlternativeDnsLookup (both default false) and render REDIS_TLS / REDIS_USE_ALTERNATIVE_DNS_LOOKUP on the api, service-worker, file-server, tool-call-server and egress-gateway containers through a single codeapi.redis.tlsEnv helper. The settings only apply to external Redis; sandbox-runner never receives Redis config. The default render is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The service already honours
REDIS_TLSandREDIS_USE_ALTERNATIVE_DNS_LOOKUPin every Redis client (queue, file-server, tool-call-server, egress-ledger), but the chart can only set them on api and service-worker viaextraEnv. file-server, tool-call-server and egress-gateway have no way to receive them, so an external Redis that requires TLS (e.g. AWS ElastiCache with in-transit encryption, which is also a prerequisite for AUTH there) can't be used.This adds
redis.external.tlsandredis.external.useAlternativeDnsLookup(both defaultfalse) and renders the matching env vars on all five control-plane containers through one helper. The sandbox-runner is untouched and still refusesREDIS_*. The default render is unchanged.Changes
values.yaml: realredis.externalblock (host,port,password,tls,useAlternativeDnsLookup). The host/port/password semantics are unchanged._helpers.tpl: newcodeapi.redis.tlsEnvhelper. It emits nothing whenredis.enabled=trueand is nil-safe whenredis.externalis missing from older values files.REDIS_PASSWORDin the api, service-worker, file-server, tool-call-server and egress-gateway containers. It useswith … | trim | nindent 12, so an empty result adds no whitespace line and the default render stays byte-identical.wait-for-redisinit containers are unchanged (nc -zis a plain TCP check and works with TLS).Chart.yaml: 0.3.2 → 0.4.0. This is a minor bump because of the new values, matching the earlierfeatbump 0.2.0 → 0.3.0.appVersionis unchanged.README.md: documents theredis.external.*values and gives an ElastiCache example. It replaces the old "setREDIS_TLSviaextraEnvon each component" note, which wasn't possible for three of the five components.tests/redis_tls_env.sh(wired into the CI "Deployment Config Tests" job): checks the TLS path, placement per container, sandbox-runner exclusion, bundled Redis, defaults, and a missingredis.external. It fails against the templates onmain.Verification
(
executionManifest.privateKey/publicKey=testare passed throughout; the chart refuses to render without them.)helm lint helm/codeapihelm templatewith default values, diffed againstmain. The only differences are thehelm.sh/chart: codeapi-0.3.2→codeapi-0.4.0label lines from the version bump. With that label normalised:helm template --set redis.enabled=false --set redis.external.host=x --set redis.external.tls=true --set redis.external.useAlternativeDnsLookup=true, env vars per container:helm template --set redis.enabled=true --set redis.external.tls=true:(The only TLS-related var in that render is the Bitnami subchart's own
REDIS_TLS_ENABLED: "no".)Chart tests:
Follow-up (not in this PR)
The clients use
rejectUnauthorized: false, so the Redis server certificate is never verified. Verification would need a service-side option, e.g.REDIS_TLS_REJECT_UNAUTHORIZED(defaulttruefor new installs) and an optional CA bundle. That is a service code change, not a chart change.