Skip to content

cilium-operator CrashLoopBackOff when cilium_gateway_api_enabled=true: TLSRoute v1alpha2 not served in Gateway API v1.5.1 standard channel #13222

@bbaassssiiee

Description

@bbaassssiiee

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

  1. Deploy a cluster with Kubespray release-2.31
  2. Set cilium_gateway_api_enabled: true (leave gateway_api_channel at default standard)
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions