mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 12:43:32 +09:00
The tenant needs the release's CA certificate to verify the server, and the platform's contract for handing one over is the key-free <release>.tenant-ca projection: the CA-extraction controller lifts a single named key out of a source Secret, refuses to publish anything that parses as PEM private key material, and stamps internal.cozystack.io/tenant-ca on what it writes. postgres, mongodb, nats and qdrant all reach the tenant this way; redis is the fifth. Source the chart's own cert-manager CA Secret, <release>-ca-tls, rather than the CA-only Secret the operator publishes at spec.tls.caCertSecretName. Both carry the same certificate, but <release>-ca-tls exists as soon as cert-manager issues the CA, so the tenant read path does not also depend on the operator having reconciled the RedisFailover and written its copy. That the source holds the CA private key beside ca.crt is the intended shape rather than a compromise — projecting one key out of a key-bearing Secret is what the controller is for, and it refuses private key material outright. Gated on tls.enabled, because the source Secret only exists when TLS is on. The test pins that the gate is tls.enabled and not external access: an externally exposed plaintext release must render no sentinel, or the controller waits forever on a Secret nothing creates. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>