Skip to content

feat: provide bindings for all CRD API versions - #247

Merged
aharbis merged 17 commits into
mainfrom
feat/all-api-versions
Oct 25, 2026
Merged

aharbis merged 17 commits into
mainfrom
feat/all-api-versions

Conversation

@aharbis

@aharbis aharbis commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Expands the library's bindings to cover all CRDs and all their API versions, across both standard and experimental channels. Resource modules (e.g., referencegrants) continue to re-export the versions they do today.

use gateway_api::referencegrants::ReferenceGrant; // re-export of v1
use gateway_api::referencegrants::v1::ReferenceGrant as ReferenceGrantV1;
use gateway_api::referencegrants::v1beta1::ReferenceGrant as ReferenceGrantV1beta1;

Fixes: #246

Additions

The following API versions are added to the library:

Resource standard experimental
BackendTLSPolicy v1alpha3 v1alpha3
GatewayClass v1beta1 v1beta1
Gateway v1beta1 v1beta1
HTTPRoute v1beta1 v1beta1
ReferenceGrant v1beta1 v1beta1
TLSRoute v1alpha2, v1alpha3 v1alpha2, v1alpha3

Internal

Testing

  • Integration tests now install the upstream CRDs and exercise CRUD for every API version of every resource in both Gateway API channels.
    • Versions a CRD defines but doesn't serve are checked to return 404 instead.
  • Upstream CRDs are now pinned at gateway-api/tests/fixtures/crds/<channel>/ and rewritten by the generator.
  • cargo xtask generate now writes the integration test matrix (tests/integration/channels.rs).
    • Each version runs the shared test body in suite/<resource>.rs, or a suite/<resource>_<version>.rs override if one exists.
    • New resources get a stub that fails with todo! until its tests are written.

Packaging

  • gateway-api package explicitly includes only its src tree and LICENSE.
    • Integration tests and their fixtures are now omitted.
  • Compressed .crate size: 142 KiB → 220 KiB (+55%).

@aharbis
aharbis marked this pull request as ready for review October 24, 2026 02:13
@aharbis
aharbis added this pull request to stack #250 October 25, 2026 20:49
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
Signed-off-by: Aidan Harbison <aharbison93@gmail.com>
@aharbis
aharbis force-pushed the feat/all-api-versions branch from f53efd4 to d87ad85 Compare October 25, 2026 22:03
@aharbis
aharbis merged commit 95688b7 into main Oct 25, 2026
6 checks passed
@aharbis
aharbis deleted the feat/all-api-versions branch October 25, 2026 22:05
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.

Provide bindings for all CRD API versions

1 participant