Skip to content

Simpler, more reliable webhook TLS via a cert-manager CSI mount#141

Merged
scotwells merged 1 commit into
mainfrom
split/webhook-cert-csi
Jun 4, 2026
Merged

Simpler, more reliable webhook TLS via a cert-manager CSI mount#141
scotwells merged 1 commit into
mainfrom
split/webhook-cert-csi

Conversation

@scotwells

@scotwells scotwells commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Value

Operators get a simpler, more reliable webhook TLS setup. Webhook serving certificates are now mounted directly from a cert-manager CSI volume, which means:

  • No standalone, cluster-scoped Certificate resource to reconcile, and no cainjection / inject-ca-from wiring on the webhook configurations for production.
  • No dependency on the cert-manager controller having reconciled a Certificate before the manager can serve — Milo trusts the configured issuer directly, so the CA bundle no longer has to be injected into each webhook config.
  • Certificate rotation is handled inline by the CSI driver at mount time — fewer moving parts.

This is a config-only change with no behavioral change to the webhook itself.

What

  • Remove the config/base/certmanager base (Issuer/Certificate, name-reference config, CA-injection replacements).
  • Add a generic config/components/csi-webhook-cert component that mounts the webhook-server-tls CSI volume on the manager Deployment. The issuer is intentionally left unset — each consuming overlay (or the infra repo) patches csi.cert-manager.io/issuer-kind / issuer-name for its environment, so different environments can use different issuers without forking the component.
  • Drop the optional compute-webhook-cert Secret volume/mount from the base manager Deployment.
  • single-cluster overlay: drop the certmanager base, the cainjection patch, and the dnsName/CA replacement blocks; wire in the csi-webhook-cert component.
  • dev overlay: keep an inline self-signed Issuer + Certificate for the local host.docker.internal webhook (the dev kind/docker setup has no CSI driver) and annotate the webhook configs with inject-ca-from directly.

Verification

kustomize build passes for config/overlays/single-cluster, config/overlays/dev, and config/base/manager. Rendered single-cluster output wires webhook TLS via the CSI webhook-server-tls volume with no remaining Certificate / cainjection.

Coordination notes

🤖 Generated with Claude Code

…for TLS

Provision the webhook serving certificate through the cert-manager CSI
driver instead of a cert-manager Certificate + cainjection. The manager
mounts the cert directly from a csi.cert-manager.io volume, so there is no
standalone Certificate resource, no CA-injection wiring on the webhook
configurations, and no cluster-wide cert-manager Certificate dependency in
the production overlay.

- Remove the config/base/certmanager base (Issuer/Certificate + kustomize
  name-reference + CA-injection replacements).
- Add a generic config/components/csi-webhook-cert component that mounts
  the webhook-server-tls CSI volume on the manager Deployment. The issuer
  is intentionally left unset so each consuming overlay (or the infra repo)
  patches csi.cert-manager.io/issuer-kind and issuer-name for its
  environment.
- Drop the optional compute-webhook-cert Secret volume/mount from the base
  manager Deployment; the CSI volume now supplies serving-certs.
- single-cluster overlay: drop the certmanager base, the cainjection patch,
  and the dnsName/CA replacement blocks; wire in the csi-webhook-cert
  component instead.
- dev overlay: keep an inline self-signed Issuer + Certificate for the
  local host.docker.internal webhook (no CSI driver in the dev kind/docker
  setup) and annotate the webhook configs with inject-ca-from directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scotwells scotwells requested review from a team and ecv June 4, 2026 20:55
@scotwells scotwells merged commit 30a4292 into main Jun 4, 2026
9 checks passed
@scotwells scotwells deleted the split/webhook-cert-csi branch June 4, 2026 20:56
@scotwells scotwells changed the title feat: simpler webhook TLS via cert-manager CSI mount (drop standalone Certificate) Simpler, more reliable webhook TLS via a cert-manager CSI mount Jun 4, 2026
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.

2 participants