Skip to content

2.0: the portability split of the format, core keys and an envoy block #23

Closed

Description

@tudor-pop

Problem

The format does not say which of its keys are Envoy's own. Every key is read as if every proxy could carry it, so a second backend cannot tell which keys it must implement and which it may refuse: it would either refuse most files or render a configuration that silently does less than the Envoy one.

What changes

Every key of the description is classed core (every backend implements it) or backend-specific; the Envoy-specific ones move under a reserved envoy { } key, and nginx { } and haproxy { } are reserved the same way for the generators to come (a render for one target reads its own block and leaves the others alone); --target (Envoy only at first) with the refusal rule; a 1.x file is refused with each key to move and its new place; a page under docs/ carries the table of the keys shared by Envoy, nginx and HAProxy and, per backend-specific key, what the other two offer instead; the reference pages carry the class of each key; the examples move. The owner asked on 2026-11-11 for the estimate of this part alone, with that table, before anything is built.

Acceptance

go test ./... green; examples/full renders the same envoy.yaml bytes as 1.x after its keys move; a 1.x file is refused naming every key; the reference pages show each key's class.

Consumers

  • Every 1.x proxyfile and the JSON schema (as the epic says).

Lane

LIGHT.

Filing note (added at filing, 2026-11-11)

  • Open tickets checked: gh search issues 'nginx' --owner kitecorp --state open (4 results, none in this repository and none about rendering for nginx), gh search issues 'haproxy' --owner kitecorp --state open (none) and gh search issues 'portability' --owner kitecorp --state open (2 results, none in this repository and neither about proxies).
  • Measured at master 1c2965f (the epic's Filing note has the detail): the top-level keys are namespace, listen, admin, limits, timeouts, services, auth, remove_from_clients, cors, origins, routes, rpc, log and tracing, and part of the Envoy-only behaviour is written by the generator with no key (the runtime keys, local_reply, the retry conditions, the Lua status filter, the Connect-gRPC bridge), so the classification covers it too. The auth check is ext_authz in HTTP mode, not over gRPC.

Activity

  1. added
    enhancement
    on Nov 11, 2026
  2. tudor-pop commented on Nov 11, 2026

    @tudor-pop
    ContributorAuthor

    The estimate for this part alone, built before any second generator (2026-11-11):

    Task What Size
    1 docs/portability.md: the table of keys by backend (shared by Envoy, nginx and HAProxy; partial on one of them; Envoy only) S
    2 The description and the checker: the reserved envoy, nginx and haproxy top-level maps (nginx and haproxy take no keys in 2.0.0; a key inside is refused as "no generator for nginx in this version"); envoy { namespace, heap, tracing, connect_bridge }; each moved key refused at its 1.x place with the message naming the new place; the schema rewritten M
    3 --target on render and check: envoy the default, nginx and haproxy refused naming docs/portability.md; the Envoy target refuses nothing it accepted in 1.3 S
    4 The generator reads the moved keys; examples/* migrated; each example's committed envoy.yaml byte-identical to 1.3's; one refusal test per moved key S
    5 The key pages gain a class column (Field.Class); the README's diagram and key list follow; docs/portability.md linked S
    6 Release v2.0.0 (tag, release run, image) S

    Together: size L. What moves: namespace to envoy.namespace, limits.heap to envoy.heap, tracing (its xray provider is Envoy's own tracer) to envoy.tracing, and the Connect bridge, implicit on every RPC route today, becomes envoy.connect_bridge (default true). Everything else stays where it is: every other key has an nginx and a HAProxy form (the auth check through nginx's auth_request and HAProxy's community auth-request Lua script; tracing later through a shared otel provider, since nginx's OpenTelemetry module and HAProxy's filter from 3.4 speak OTLP). Partial on nginx, and refused there in those forms: limits.request_headers.count, timeouts.request, auth.when_unavailable = allow, auth.only_with_header, * prefixes in auth.accept and remove_from_clients, and the per-route action headers to the check.

    Three decisions before this is planned: tracing moves under envoy now (proposal: yes; a shared tracing key can come back later without a break); admin stays shared with per-backend paths (proposal: yes); 2.0.0 is released as soon as the split is done, before any second generator (proposal: yes).

  3. tudor-pop commented on Nov 11, 2026

    @tudor-pop
    ContributorAuthor

    Decided 2026-11-11, all three as proposed:

    1. tracing moves under envoy in 2.0 (envoy.tracing); its only provider, xray, is Envoy's own tracer. A core tracing key with a provider every backend has can come back later as an additive change.
    2. admin stays a core key with per-backend paths.
    3. 2.0.0 is released as soon as the split is done, before any second generator; a generator is additive and comes in 2.1 or later.

    The split's design is settled; planning starts when this epic is picked up.

  4. tudor-pop commented on Nov 11, 2026

    @tudor-pop
    ContributorAuthor

    Released as v2.0.0: https://github.com/kitecorp/proxyfile/releases/tag/v2.0.0, merged in #27 as 94b4522e. Image ghcr.io/kitecorp/proxyfile:2.0.0 (amd64 and arm64; docker run --rm ghcr.io/kitecorp/proxyfile:2.0.0 version prints proxyfile v2.0.0); release files proxyfile-{linux,darwin}-{amd64,arm64}, checksums.txt and proxyfile.schema.json, the darwin file's SHA-256 equal to its checksums line; go install github.com/kitecorp/proxyfile/v2/cmd/proxyfile@v2.0.0 prints proxyfile v2.0.0.

    Acceptance, checked on the released program:

    • go test ./... green: 10 packages ok, 491 passing tests (62 top-level), in the whole-branch review and in the release run.
    • examples/full renders the same envoy.yaml bytes as 1.x after its keys moved: cmp of the v2.0.0 render against v1.3.0:examples/full/envoy.yaml says same, and every committed example output is unchanged (TestExamplesAreCurrent in internal/render/render_test.go; git diff v1.3.0 -- 'examples/*/envoy.yaml' 'examples/*/rpc-table.json' prints nothing).
    • A 1.x file is refused naming every moved key, and nothing is written: v1.3.0's examples/full/gateway.yaml gives 3:1: "namespace" moved to envoy.namespace in proxyfile 2.0 and 7:3: "heap" moved to envoy.heap in proxyfile 2.0 in one run (exit 1); v1.3.0's examples/tracing/gateway.yaml gives 19:1: "tracing" moved to envoy.tracing in proxyfile 2.0 (exit 1). Rows: the moved-key rows of TestCheck in internal/format/check_test.go.
    • Every key page shows the key's class: docs/portability.md holds the table, and TestDocsAreCurrent in internal/format/docs_test.go keeps the Class column of every key table current (78 core cells, 24 envoy, plus the reserved nginx and haproxy blocks).
    • --target envoy is the default on render and check; nginx and haproxy are refused with no generator for <target> in this version; see docs/portability.md (TestRun rows in internal/cli/cli_test.go). envoy.connect_bridge defaults to true; examples/grpc renders without the bridge and Envoy 1.40.2 validates it with the other examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions