Bug Report
Environment
- Kubespray branch: release-2.31
- Cilium version: 1.19.3 (as shipped in release-2.31)
- Gateway API CRDs version: v1.5.1 (standard channel — the default)
- Affected variable:
cilium_gateway_api_enabled: true
What happened
After deploying with cilium_gateway_api_enabled: true and the default gateway_api_channel: standard, the cilium-operator enters CrashLoopBackOff immediately on startup.
Both replicas fail with:
level=fatal msg="failed to start: failed to populate object graph: failed to create gateway controller: failed to setup reconciler: failed to setup field indexer \"gatewayTLSRouteIndex\": no matches for kind \"TLSRoute\" in version \"gateway.networking.k8s.io/v1alpha2\""
Root cause
The Gateway API v1.5.1 standard channel CRD bundle includes the TLSRoute CRD, but marks v1alpha2 as not served:
v1 served=true storage=true
v1alpha2 served=false storage=false <- Cilium tries to index this
v1alpha3 served=false storage=false
TLSRoute is an experimental resource. In the standard channel bundle, its older versions are present in the CRD spec but intentionally not served. Cilium 1.19.3's operator unconditionally registers a field indexer for TLSRoute/v1alpha2 when enable-gateway-api: true, and treats the resulting error as fatal.
Reproduction steps
- Deploy a cluster with Kubespray release-2.31
- Set
cilium_gateway_api_enabled: true (leave gateway_api_channel at default standard)
- Observe
cilium-operator pods in CrashLoopBackOff
Workaround
Manually patch the TLSRoute CRD to re-enable serving of v1alpha2:
kubectl patch crd tlsroutes.gateway.networking.k8s.io --type=json \
-p='[{"op": "replace", "path": "/spec/versions/1/served", "value": true}]'
kubectl rollout restart deployment -n kube-system cilium-operator
Bug Report
Environment
cilium_gateway_api_enabled: trueWhat happened
After deploying with
cilium_gateway_api_enabled: trueand the defaultgateway_api_channel: standard, thecilium-operatorenters CrashLoopBackOff immediately on startup.Both replicas fail with:
Root cause
The Gateway API v1.5.1 standard channel CRD bundle includes the
TLSRouteCRD, but marksv1alpha2as not served:TLSRouteis an experimental resource. In the standard channel bundle, its older versions are present in the CRD spec but intentionally not served. Cilium 1.19.3's operator unconditionally registers a field indexer forTLSRoute/v1alpha2whenenable-gateway-api: true, and treats the resulting error as fatal.Reproduction steps
cilium_gateway_api_enabled: true(leavegateway_api_channelat defaultstandard)cilium-operatorpods in CrashLoopBackOffWorkaround
Manually patch the
TLSRouteCRD to re-enable serving ofv1alpha2:kubectl patch crd tlsroutes.gateway.networking.k8s.io --type=json \ -p='[{"op": "replace", "path": "/spec/versions/1/served", "value": true}]' kubectl rollout restart deployment -n kube-system cilium-operator