Skip to content

feat(use-cases): add a cert-manager example for Kubernetes - #41

Merged
pigri merged 2 commits into
mainfrom
feat/kubernetes-cert-manager-example
Nov 2, 2026
Merged

pigri merged 2 commits into
mainfrom
feat/kubernetes-cert-manager-example

Conversation

@pigri

@pigri pigri commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

A runnable example of cert-manager on Kubernetes with the Synapse operator's SynapseProxy (operator 0.2.0, on the release/v0.2.0 branch, not released yet). cert-manager issues the certificate for an Ingress; the operator copies the TLS Secret into the proxy; Synapse loads a renewed certificate with no restart. The repo had no Kubernetes example.

use-cases/kubernetes-cert-manager/: numbered manifests (namespace with Pod Security privileged, a self-signed -> CA issuer chain, SynapseProxy and IngressClass, whoami, an Ingress with the cert-manager annotations, a client pod) and an issuer-acme-http01.yaml marked not run. There is no config.yaml, because the operator renders Synapse's config, so scripts/check.sh does not count the directory as a set. Index rows in both READMEs.

Run

k3s v1.31.4 (single node, in Docker), cert-manager v1.21.3, the operator built from release/v0.2.0 at 93f76b1, Synapse ghcr.io/gen0sec/synapse:0.8.8:

  • The proxy and its IngressClass run in synapse-demo (Pod Security privileged); whoami, the Ingress and the client run in a second, unlabelled namespace. The operator served the Ingress across namespaces with no extra RBAC or hostOwnership setting.
  • Operator, issuers and SynapseProxy Ready.
  • Bad case: before the Ingress exists, app.example.com gets the operator's _default certificate and a 404.
  • After the Ingress: Certificate Ready, Secret created, and about 100 seconds later the proxy serves the demo-ca certificate; curl with the CA verifies it and gets the backend's answer.
  • Rotation: the 1 h certificate renewed on its own after 5 minutes, and a forced renewal (deleting the Secret) changed the served serial about two minutes later. The proxy pod name, start time and restart count were the same before and after both.
  • kubectl apply --dry-run=server accepted every manifest. make lint and make test pass.

Not run

  • Any real ACME flow, including the HTTP-01 solver through the proxy (issuer-acme-http01.yaml).
  • More than one node, a LoadBalancer Service, the Gateway API, a published operator image.
  • That one hour is the shortest duration cert-manager accepts comes from its documentation, not from a run.
  • The Ingress ADDRESS stayed empty in the run although the proxy served the host; the README says so and does not explain it.

Code-reviewed: 7d005ac — 6 findings

  • the cleanup left the demo CA's private key Secret in the cluster: fixed, delete secret demo-ca added and run
  • the apps ran in the privileged namespace the README says to keep for the proxy: fixed, moved to a second namespace and the whole proof re-run
  • the ACME file points at Let's Encrypt production before staging: not fixed, nit, the file is marked not run
  • <(...) in an sh code block: not fixed, nit
  • the client image is Alpine 3.20, out of support: not fixed, nit
  • the README does not say why the proxy pod is privileged: not fixed, nit

Not re-reviewed: 6519ecf — should-fix batch, manifests and docs only

@pigri
pigri marked this pull request as ready for review November 2, 2026 13:15
@pigri
pigri merged commit b5f529a into main Nov 2, 2026
3 checks passed
@pigri
pigri deleted the feat/kubernetes-cert-manager-example branch November 2, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant