Skip to content

fix(local-ca): forward unlisted base-domain names in the CoreDNS custom zone - #144

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/894-coredns-forward
Nov 12, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/894-coredns-forward

Conversation

@znerol2

@znerol2 znerol2 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

What this changes

In the local-CA lane, playbook 321 adds a CoreDNS server block for the base domain. Its hosts block answers the listed app hosts and ends in fallthrough, but nothing followed it, so CoreDNS answered SERVFAIL for every other name in the zone. A new ingress host couldn't resolve inside the cluster, and cert-manager's HTTP-01 self-check for it stayed pending until someone added the host by hand.

This adds forward . /etc/resolv.conf after the hosts block, the same upstream the k3s main server block uses. Listed hosts keep their in-cluster addresses. cache is left out, so a newly added host isn't held back by a cached negative answer.

Tests

  • New tests/test_coredns_custom_zone.py, run by a new CI step. It confines its checks to the base-domain server block and requires a forward there, after the hosts block and outside it, with /etc/resolv.conf as the upstream. It fails on main.
  • The test fails for each of these mutations: forward outside the server block, inside hosts, only in a separate server block, with a different upstream, with an extra upstream, commented out, or removed.
  • An adversarial review ran two rounds. Round 1 found the first test too loose (a forward in another block, or a loopback upstream, still passed) and two comments overstated the behavior. Both were fixed, and round 2 passed with no findings.

Live check (sandbox env)

  • Before: from a pod, an unlisted name under the base domain returned SERVFAIL. A listed name resolved, and the node resolved the unlisted name.
  • Ran playbook 321 from this branch: failed=0, CoreDNS restarted and ready.
  • After: the unlisted name resolves from the pod, and the listed names still resolve. Pods reach the console and Authentik through the mapped address.

One side note from the live run: the workstation inventory maps the app hosts to the node's public address, while the env was first built with its private address. Pods reach the apps either way. The playbook follows whichever inventory runs it.

Closes dmfdeploy/dmfdeploy#894

…om zone

The coredns-custom server block for the base domain answered the listed app
hosts from the hosts plugin and fell through to nothing, so CoreDNS returned
SERVFAIL for every other name in the zone. A new ingress host could not
resolve inside the cluster, and an ACME HTTP-01 self-check for it stayed
pending until someone added the host to the list by hand.

Forward unanswered names to the node's resolvers, the same upstream as the
k3s main server block. Add a static test that confines its checks to the
base-domain block and requires the forward there, after the hosts block, with
/etc/resolv.conf as its upstream, and run it in CI.

Closes dmfdeploy/dmfdeploy#894

Signed-off-by: znerol2 <6800371+znerol2@users.noreply.github.com>
@znerol2
znerol2 requested a review from a team as a code owner November 12, 2026 13:59
@znerol2
znerol2 requested a review from lkirc November 12, 2026 13:59
@github-actions
github-actions Bot enabled auto-merge (rebase) November 12, 2026 13:59

@lkirc lkirc left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static review complete. The base-domain forward correctly follows the hosts fallthrough, and the scoped regression test and CI step cover it without changing workflow permissions or triggers. Current head, required checks, and the exact ntfy OK token were verified.

@github-actions
github-actions Bot merged commit 4809e66 into main Nov 12, 2026
13 checks passed
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.

In-cluster DNS fails for any environment host that isn't in the CoreDNS custom zone list

2 participants