feat(ingress): --certs-out-secret to auto-wire TLS certs from Ingress#44
Merged
Conversation
The ingress controller could already project Ingress/Gateway TLS Secrets, but only into a local dir (--certs-out, sidecar mode). In the central topology (separate operator pod, --upstreams-out-configmap), there was no way to deliver certs to the proxy — so the proxy needed a hand-maintained projected-volume list of cert Secrets in its Helm values. Add --certs-out-secret (namespace/name): the central-mode analogue of --upstreams-out-configmap. The controller projects each referenced TLS Secret into this Secret as <stem>.crt/<stem>.key data keys; the separate synapse-proxy pod mounts it as its certificates dir, so certs are operator-owned and auto-wired from Ingress TLS. Data is replaced each changed render (stale certs pruned); rotation re-projects on the existing TLS Secret watch. Secrets RBAC gains create/update/patch. Closes the manual cert-projection gap (parity with operator-generated upstreams). Claude-Session: https://claude.ai/code/session_01UdGcTcZj5FU9cUXEdhr81T
pigri
added a commit
to gen0sec/helm-charts
that referenced
this pull request
Jun 20, 2026
The ingress controller's new central-mode cert projection (--certs-out-secret) writes the operator-owned cert Secret that the synapse-proxy pod mounts. Grant the operator ClusterRole create/update/patch on secrets (was read-only). Backward-compatible; unused until --certs-out-secret is set. Chart 1.4.0 -> 1.4.1. Pairs with gen0sec/synapse-operator#44. Claude-Session: https://claude.ai/code/session_01UdGcTcZj5FU9cUXEdhr81T
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.
Problem
The ingress controller projects Ingress/Gateway TLS Secrets into synapse's certificates dir — but only via
--certs-out(a local dir, sidecar mode). In the central topology used in prod (separate operator pod +--upstreams-out-configmap), there's no way to deliver certs to the separate proxy pod. So the proxy needs a hand-maintained projected-volume list of cert Secrets in its Helm values (each new host = manual edit), even though routing (upstreams) is already fully operator-generated.Fix
Add
--certs-out-secret namespace/name— the central-mode analogue of--upstreams-out-configmap:<stem>.crt/<stem>.keydata keys.synapse-proxypod mounts this Secret as its certificates dir → certs are operator-owned, auto-wired from Ingressspec.tls.Datais replaced on every changed render (stale certs pruned); rotation re-projects via the existing TLS-Secret watch (now armed for this mode too).create;update;patch(kubebuilder marker +config/rbac.yaml).Precedence:
--certs-out-secrettakes priority over--certs-out.Test
TestProjectCertsToSecret(create/idempotent/rotation/prune/missing-secret/disabled-no-op).go build,vet,gofmt, fullgo test ./...green.Follow-ups (separate)
--certs-out-secreton the ingress operator + point the proxy'stls-certsvolume at the operator-owned Secret (drops the manual projection). Operator ClusterRole secrets verbs updated inhelm-charts.https://claude.ai/code/session_01UdGcTcZj5FU9cUXEdhr81T