Skip to content

fix(operator): substitute RATE_LIMIT in cluster-level named.conf.options - #468

Merged
ebourgeois merged 1 commit into
mainfrom
fix-rate-limit
Aug 30, 2026
Merged

fix(operator): substitute RATE_LIMIT in cluster-level named.conf.options#468
ebourgeois merged 1 commit into
mainfrom
fix-rate-limit

Conversation

@ebourgeois

Copy link
Copy Markdown
Contributor

Problem

#466 added the {{RATE_LIMIT}} placeholder to templates/named.conf.options.tmpl and substituted it in the instance-level builder (build_options_conf), but not in the cluster-level builder (build_cluster_options_conf). Every cluster ConfigMap therefore shipped the literal placeholder, and named exited at startup:

/etc/bind/named.conf.options:20: '}' expected near '{'
loading configuration: unexpected token
exiting (due to fatal error)

The bind9 operand container crash-loops, pods never become Ready, and the e2e suite fails (test_instance_pod_label_selector_finds_pods: pods never Ready within 4 minutes) — on main itself and on every PR rebased onto it (currently blocking dependabot PRs #461#465).

Root-cause verification (local, kind)

Fix

  • build_cluster_options_conf now renders rate-limit from spec.global.rateLimit (default 15/s per source /24, responsesPerSecond: 0 disables) and substitutes {{RATE_LIMIT}}, matching the instance-level builder.
  • Regression test asserts the default directive is rendered and that no template placeholder survives substitution — the existing cluster-config tests only checked forwarders/listen-on, which is why 47/47 unit tests passed with this bug.

Note (follow-up, not in this PR)

The cluster-level builder also never received the allow-transfer { none; } deny-by-default from #466 — same class of gap, separate change.

Test plan

  • cargo test --all — 1300+ tests green, incl. new regression test
  • cargo fmt --check, cargo clippy --all -- -D warnings — clean
  • Local kind e2e on main reproduced the failure; ConfigMap patch confirmed the fix path

#466 added the {{RATE_LIMIT}} placeholder to named.conf.options.tmpl and
substituted it in the instance-level builder (build_options_conf), but not
in the cluster-level builder (build_cluster_options_conf). Every cluster
ConfigMap therefore shipped the literal placeholder, and named exited at
startup with:

  /etc/bind/named.conf.options:20: '}' expected near '{'

crash-looping the bind9 operand container and failing the e2e suite
(test_instance_pod_label_selector_finds_pods: pods never Ready in 4m) on
main and on every PR rebased onto it.

Render the cluster-level rate-limit from spec.global.rateLimit (default
15/s, 0 disables) and add a regression test asserting the directive is
rendered and no template placeholder survives substitution.

Verified locally: unit suite green, and an operand pod previously in
CrashLoopBackOff becomes Ready once the placeholder is substituted.

Signed-off-by: Erick Bourgeois <erick@jeb.ca>
@ebourgeois
ebourgeois merged commit 3c11ab3 into main Aug 30, 2026
35 checks passed
@ebourgeois
ebourgeois deleted the fix-rate-limit branch August 30, 2026 12:57
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