docs: fix upstream target syntax in examples#5
Merged
Conversation
The quickstart and most other docs showed `targets { target { address "X" } }`,
which neither the single-file nor the multi-file KDL parser actually accepts.
Switch examples to `target "host:port"` (with optional `weight=N`/`max-requests=N`
as KDL entries) — the form the single-file parser at
crates/config/src/kdl/upstreams.rs reads, and the form already used by many
other examples in the same docs.
Touches 36 files across getting-started, configuration, concepts, operations,
deployment, development, examples, reference, and appendix. Versioned archives
under content/v/ are intentionally left alone.
Refs zentinelproxy/zentinel#254
2 tasks
2 tasks
raffaelschneider
added a commit
that referenced
this pull request
Jun 7, 2026
- Snapshot the current top-level docs into `content/v/26.06/` so the version picker can serve a frozen 26.06 archive. - Update `config.toml` version picker: `current = "26.06"`, add a 26.06 (latest) entry, and demote 26.05 to `/v/26.05/` archive. 26.06 inherits the 26.06_1 docs that already landed: metrics endpoint as a dedicated listener with non-root logging caveats (#6), upstream `target` syntax normalization (#5), and the route-level circuit-breaker / retry-policy not-yet-implemented banner (#7). Refs zentinelproxy/zentinel#254 #255 #256 #258, release 26.06_1 (0.6.15).
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.
Summary
Fixes a long-standing documentation bug surfaced in zentinelproxy/zentinel#254: the quickstart and most other config examples used
targets { target { address "X" } }, which neither the single-file nor the multi-file KDL parser actually accepts. Users following the quickstart hitUpstream '...' requires at least one targetand had to reverse-engineer the working form.This PR switches all examples to the form the single-file parser at
crates/config/src/kdl/upstreams.rsreads:— which is also what many examples in the same docs were already using, so the docs were internally inconsistent (e.g.
quick-start.mdhad both forms on the same page).Scope
getting-started,configuration,concepts,operations,deployment,development,examples,reference, andappendix.content/v/25.12,26.01,26.02,26.04,26.05are intentionally not changed — those releases actually shipped with the broken syntax in their docs, and rewriting them would falsify the historical record.Transformations
target { address "X" }target "X"target { address "X" weight=N }target "X" weight=Ntarget { address "X"; weight N; max-requests N }target "X" weight=N max-requests=Ntargets { ... }wrappertargets { }example indirectives.mdtarget "127.0.0.1:8080"target { weight=N }row in HAProxy comparison tabletarget "host:port" weight=NHelm/Jinja2/envsubst templates in
config-management.mdand Rust test format-strings inintegration-tests.mdwere also corrected so the templates produce valid KDL.Not in this PR
Issue #254 has two more reports that are not documentation bugs and need separate fixes in
zentinelproxy/zentinel:/var/log/zentinelpermission failure when the official Docker image runs as non-root — needs a container/process fix.metrics.address "0.0.0.0:9090"never binds — needs investigation in the proxy.There is also a deeper underlying issue: the single-file parser (
crates/config/src/kdl/upstreams.rs) and the multi-file parser (crates/config/src/multi_file/parsers.rs) accept differenttargetsyntaxes. That divergence is what made it so easy for docs to drift from reality. Worth a follow-up tracking issue in the proxy repo.Test plan
getting-started/quick-start.md,configuration/upstreams.md,configuration/namespaces.md,getting-started/installation.md,deployment/docker.md.zentinel.kdland confirmzentinel --config zentinel.kdl --check(or--dry-run) succeeds against a current build.content/(excludingcontent/v/) for any remainingtarget {ortargets {— should be zero.