Skip to content

feat: Ship DNSRecordSet MWC with the image bundle - #70

Merged
mattdjenkinson merged 1 commit into
mainfrom
feat/admission-webhooks-bundle
Jul 28, 2026
Merged

feat: Ship DNSRecordSet MWC with the image bundle#70
mattdjenkinson merged 1 commit into
mainfrom
feat/admission-webhooks-bundle

Conversation

@mattdjenkinson

Copy link
Copy Markdown
Contributor

Summary

Infra previously registered the DNSRecordSet mutating webhook on the control-plane apiserver while production could still run an older dns-operator image with no webhook server. With failurePolicy: Fail, that skew blocked every DNSRecordSet write for about an hour (infra#3688).

This puts the MutatingWebhookConfiguration in dns-operator-kustomize at components/admission-webhooks, so a tag without a webhook server cannot carry a registration Flux can apply (for example v0.6.4 has no config/webhook at all). The MWC points at dns-operator-webhook-service / datum-dns-system with no kustomize namespace transformer, so Flux targetNamespace cannot rewrite the Service namespace. Same-cluster kind/replicator packaging under config/webhook/ keeps working, and both paths use failurePolicy: Ignore so a missing server degrades activity FQDNs instead of taking down writes.

Infra should re-enable admission with a thin Flux Kustomization pointing at this OCI path (same OCIRepository semver as manager), not a hand-authored MWC. Service and TLS mounts stay as cluster glue.

Test plan

  • kustomize build config/components/admission-webhooks shows MWC with Ignore and datum-dns-system Service ref
  • kustomize build config/overlays/replicator includes webhook Service/MWC with Ignore
  • go test ./internal/webhook/...
  • After merge + release: infra Flux KS consumes path: components/admission-webhooks from the same OCI tag as manager
  • Staging create still succeeds if the webhook is unreachable (Ignore)

Closes #69

Related to #62

Hand-authored MutatingWebhookConfiguration in infra can register
admission against a dns-operator build that has no webhook server
(failurePolicy Fail then blocks all DNS writes). Add an OCI path
components/admission-webhooks versioned with the manager image, use
Ignore so missing webhooks only degrade activity FQDNs, and document
the Flux consume pattern for infra.

Closes #69
@mattdjenkinson
mattdjenkinson merged commit e34701f into main Jul 28, 2026
10 of 11 checks passed
@scotwells

Copy link
Copy Markdown
Contributor

@mattdjenkinson dont think we should have the webhook use ignore mode. There's no self recovery of the behavior if things do fail.

@mattdjenkinson

Copy link
Copy Markdown
Contributor Author

@scotwells will fix in a follow up!

mattdjenkinson added a commit that referenced this pull request Jul 29, 2026
failurePolicy Ignore lets writes succeed without activity annotations
and those audits never self-heal. Fail is safe now that the MWC ships
with the same OCI tag as the manager (follow-up to #70).
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.

Ship the DNSRecordSet MutatingWebhookConfiguration with the image, not from infra

3 participants