AlinsRan opened a new pull request, #2839:
URL: https://github.com/apache/apisix-ingress-controller/pull/2839

   ## Problem
   
   Gateway API 1.6 promoted the L4 routes to `v1` and deprecated `v1alpha2`, 
but the controller still registers, watches, indexes and validates all three 
through `sigs.k8s.io/gateway-api/apis/v1alpha2`. Every informer re-list logs:
   
   ```
   Warning: The v1alpha2 version of TCPRoute has been deprecated and will be 
removed in a future release of the API. Please upgrade to v1.
   ```
   
   That warning is the visible half. The real problem is that in the **1.6 
standard channel** CRDs, `v1alpha2` is `served: false`:
   
   | CRD | v1 | v1alpha2 (standard) | v1alpha2 (experimental) |
   | --- | --- | --- | --- |
   | tcproutes | served, storage | **not served** | served, deprecated |
   | udproutes | served, storage | **not served** | served, deprecated |
   | tlsroutes | served, storage | **not served** | served, deprecated |
   
   So for anyone installing the standard channel, `HasAPIResource` in 
`setupGatewayAPIControllers` finds nothing, and the TCPRoute, UDPRoute and 
TLSRoute reconcilers are silently skipped — L4 routing does not work at all. 
`make install-gateway-api` installs the experimental channel, which still 
serves `v1alpha2`, which is why CI never caught this.
   
   ## Solution
   
   Switch every reference to `apis/v1`:
   
   - scheme registration (`internal/manager/run.go`) and the CRD probe 
(`internal/manager/controllers.go`)
   - field indexers, the three reconcilers, the translator, the status writer, 
the route adapters
   - the TCPRoute/UDPRoute validating webhooks — paths move from 
`/validate-gateway-networking-k8s-io-v1alpha2-*` to `-v1-*`, 
`config/webhook/manifests.yaml` is regenerated to match, and the hand-written 
e2e webhook manifest is synced
   
   The `v1alpha2` rule and status types are already type aliases of their `v1` 
counterparts, so this is a version switch rather than a behavior change.
   
   User manifests that still declare `gateway.networking.k8s.io/v1alpha2` keep 
working wherever the installed CRDs serve that version, because the API server 
converts them before they reach the informer. Examples, e2e manifests and the 
docs support table now use `v1`.
   
   One schema difference worth noting: `v1` tightens `TCPRouteSpec.Rules` from 
`MaxItems=16` to `MaxItems=1`. The translator iterates rules and is unaffected, 
and every manifest in this repo already carries a single rule.
   
   ## Breaking change
   
   L4 routing now requires **Gateway API 1.6 or later**, the first release that 
serves the `v1` versions of TCPRoute, UDPRoute and TLSRoute. `Makefile` already 
pins `GATEAY_API_VERSION ?= v1.6.0`.
   
   ## Verification
   
   - `go build ./...`, `go vet ./...`, `gofmt -l` clean
   - `make lint` — 0 issues
   - `go test ./internal/... ./pkg/...` — all packages pass


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to