Skip to main content

Plan: cert-manager as a UIS service

IMPLEMENTATION RULES: Before implementing this plan, read and follow:

Status: Completed — verified live by imac on a real Rancher Desktop cluster, 2026-10-20​

Goal: Give UIS an in-cluster certificate-issuing capability (uis deploy cert-manager) — cert-manager plus one self-signed uis-ca ClusterIssuer — so any service that needs a real TLS certificate (not Traefik's ad-hoc per-connection default) has one to ask for.

Last Updated: 2026-10-20

Priority: High — a hard prerequisite for PLAN-service-epinio-001-install; Epinio's own Helm chart requires cert-manager's CRDs to exist before its own install pass.


Problem​

UIS has no cert-manager and no in-cluster CA today — TLS to the outside world ends at the network edge (Cloudflare/Tailscale), upstream of the cluster, and nothing issues real certificates for in-cluster or service-to-service TLS. Two concrete consumers need one:

  1. Epinio's own chart documents cert-manager as a required prerequisite, installed as a separate release first — Helm cannot apply a release's own Certificate/Issuer CustomResources against CRDs a bundled subchart in the same install pass would otherwise provide.
  2. urb-agents#1917/bug #570: Authentik's shipped authentik-server-tls IngressRoute has tls: {} — no real certificate — which breaks any strict-TLS client (an OIDC connector, concretely). Fixing it needs something to issue a real cert from.

What this PLAN ships​

  • provision-host/uis/services/management/service-cert-manager.sh — uis deploy cert-manager / uis undeploy cert-manager.
  • ansible/playbooks/025-setup-cert-manager.yml — installs the jetstack/cert-manager Helm chart with its CRDs, then the standard cert-manager two-step self-signed-CA bootstrap: a throwaway self-signing Issuer, a CA Certificate signed by it, and the real uis-ca ClusterIssuer that signs everything else off that CA.
  • ansible/playbooks/025-remove-cert-manager.yml — refuses to remove cert-manager if any Certificate outside the cert-manager namespace still references uis-ca (same "ask what's actually there, don't silently break it" shape as uis argocd register), unless -e force=true.
  • Three manifests: manifests/025-cert-manager-bootstrap-issuer.yaml, -ca-certificate.yaml, -clusterissuer.yaml.

Grounded in the proven PoC reference (2026-10-20 correction)​

urb-agents#1917's handoff named terchris/home's service-epinio-poc.yml directly as the playbook that proved gate 1 live on 2026-10-19 — this repo's own version was first written from a guess rather than that file. Read it properly and corrected: the install flag is --set installCRDs=true, not crds.enabled=true (this chart's older, since-deprecated flag name — but it's what gate 1 actually ran and passed, so it's what this repo trusts).

✅ Verified live, imac, 2026-10-20 (urb-agents#1921)​

  • uis deploy cert-manager installed cleanly (chart version 1.16.2 confirmed to exist in the live jetstack Helm index first — the pin above turned out correct, no change needed).
  • kubectl get clusterissuer uis-ca → Ready: True.
  • A test Certificate in the default namespace referencing issuerRef: {name: uis-ca, kind: ClusterIssuer} issued correctly (cross-namespace, proving the whole point of a ClusterIssuer over a plain Issuer).
  • uis undeploy cert-manager refused while that test Certificate still existed, naming it correctly in the refusal, then succeeded once it was deleted.
  • Redeployed afterward as Epinio's prerequisite — see PLAN-service-epinio-001-install, also verified the same day.

Acceptance Criteria​

  • uis deploy cert-manager installs cleanly on a fresh Rancher Desktop cluster
  • kubectl get clusterissuer uis-ca shows Ready: True
  • A test Certificate referencing issuerRef: {name: uis-ca, kind: ClusterIssuer} in some other namespace actually issues
  • uis undeploy cert-manager refuses while that test Certificate still exists, and succeeds once it's removed
  • Docs page (website/docs/services/management/cert-manager.md, auto-generated by uis-docs-markdown.sh from service-cert-manager.sh) renders correctly

Next steps once verified​

  • Use uis-ca to fix bug #570 (Authentik's own authentik-server-tls IngressRoute) — not done in this PLAN, deliberately kept separate so this PLAN stays about cert-manager's own installation, not its first consumer.