Skip to content

Conversation

@peruchi
Copy link

@peruchi peruchi commented Dec 9, 2025

Update to Gateway API v1.4.0 and Go 1.24

Summary

This PR updates the plugin to use Gateway API v1.4.0 and Go 1.24, which includes support for the standard CORS filter type in HTTPRoute.

Motivation

Gateway API v1.4.0 promotes CORS from experimental (v1alpha2) to standard (v1). This update ensures the plugin can properly deserialize and handle HTTPRoute filters including the new standard CORS filter, without losing filter configuration during route manipulation.

Previously, when using Gateway API v1.3.0, CORS filters defined in HTTPRoute were being deserialized as {"type": "CORS"} without the actual cors configuration block, causing validation errors when the plugin attempted to update routes.

Changes

Dependencies

Package Before After
Go 1.22.3 1.24.0
sigs.k8s.io/gateway-api v1.3.0 v1.4.0
k8s.io/client-go v0.30.1 v0.31.1
k8s.io/api v0.30.1 v0.31.1
k8s.io/apimachinery v0.30.1 v0.31.1

Code Changes

Dockerfile

  • Updated Go version from 1.22.5 to 1.24

pkg/plugin/grpcroute.go

  • Fixed type assignments for GRPC header match types to use the correct Gateway API v1.4.0 types:
    • gatewayv1.HeaderMatchExactgatewayv1.GRPCHeaderMatchExact
    • gatewayv1.HeaderMatchRegularExpressiongatewayv1.GRPCHeaderMatchRegularExpression

This change is required because Gateway API v1.4.0 introduced separate type constants for GRPC header matching (GRPCHeaderMatchType) distinct from HTTP header matching (HeaderMatchType).

Testing

  • Plugin compiles successfully with Go 1.24
  • Verified CORS filters are correctly deserialized with all parameters
  • Tested with HTTPRoute containing CORS filter - weights update correctly
  • Header-based routing preserves CORS filters when creating canary routes

Breaking Changes

  • Go 1.24 required: This update requires Go 1.24 or later to build
  • Kubernetes compatibility: Requires Kubernetes cluster with Gateway API v1.4.0 CRDs installed

Related Issues

Checklist

  • Code compiles without errors
  • Dependencies updated via go mod tidy
  • No debug code or logging left in codebase
  • Dockerfile updated for new Go version

… types in routing logic

- Updated Go version in Dockerfile and go.mod to 1.24.
- Updated toolchain version to 1.24.3.
- Updated various dependencies to their latest versions, including k8s.io and sigs.k8s.io packages.
- Refactored gRPC header match types in grpcroute.go to use gatewayv1.GRPCHeaderMatch instead of the generic header match types.

Signed-off-by: lucas.peruchi-ext <[email protected]>
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