fix(operator): substitute RATE_LIMIT in cluster-level named.conf.options - #468
Merged
Conversation
#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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#466added the{{RATE_LIMIT}}placeholder totemplates/named.conf.options.tmpland 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, andnamedexited at startup:The
bind9operand 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) — onmainitself and on every PR rebased onto it (currently blocking dependabot PRs #461–#465).Root-cause verification (local, kind)
main(53df509): 11 passed, 1 failed — same test as CI.Fix
build_cluster_options_confnow rendersrate-limitfromspec.global.rateLimit(default 15/s per source /24,responsesPerSecond: 0disables) and substitutes{{RATE_LIMIT}}, matching the instance-level builder.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 testcargo fmt --check,cargo clippy --all -- -D warnings— clean