{"record":{"id":"c14318d6bd15da7e","repo":"cilium/cilium","slug":"failed-to-collect-grpcroute-entries-w","errorCode":null,"errorMessage":"failed to collect GRPCRoute entries: %w","messagePattern":"failed to collect GRPCRoute entries: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cilium-cli/sysdump/sysdump.go","lineNumber":2224,"sourceCode":"\t\t\t\tn := corev1.NamespaceAll\n\t\t\t\tv, err := c.Client.ListUnstructured(ctx, backendTLSPolicy, &n, metav1.ListOptions{})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to collect BackendTLSPolicy entries: %w\", err)\n\t\t\t\t}\n\t\t\t\tif err := c.WriteYAML(backendTLSPoliciesFileName, v); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to collect BackendTLSPolicy entries: %w\", err)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tDescription: \"Collecting GRPCRoute entries\",\n\t\t\tQuick:       true,\n\t\t\tTask: func(ctx context.Context) error {\n\t\t\t\tn := corev1.NamespaceAll\n\t\t\t\tv, err := c.Client.ListUnstructured(ctx, grpcRoute, &n, metav1.ListOptions{})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to collect GRPCRoute entries: %w\", err)\n\t\t\t\t}\n\t\t\t\tif err := c.WriteYAML(grpcRoutesFileName, v); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to collect GRPCRoute entries: %w\", err)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tDescription: \"Collecting TCPRoute entries\",\n\t\t\tQuick:       true,\n\t\t\tTask: func(ctx context.Context) error {\n\t\t\t\tn := corev1.NamespaceAll\n\t\t\t\tv, err := c.Client.ListUnstructured(ctx, tcpRoute, &n, metav1.ListOptions{})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to collect TCPRoute entries: %w\", err)\n\t\t\t\t}\n\t\t\t\tif err := c.WriteYAML(tcpRoutesFileName, v); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to collect TCPRoute entries: %w\", err)","sourceCodeStart":2206,"sourceCodeEnd":2242,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/cilium-cli/sysdump/sysdump.go#L2206-L2242","documentation":"Returned by the 'Collecting GRPCRoute entries' sysdump task when the Client.ListUnstructured call for GRPCRoute (gateway.networking.k8s.io) fails. GRPCRoute is a relatively recent gateway-api addition, so the most common wrapped cause is that the CRD is not installed or the installed CRDs predate GRPCRoute (NoKindMatchError/NotFound).","triggerScenarios":"Fires when c.Client.ListUnstructured(ctx, grpcRoute, &corev1.NamespaceAll, metav1.ListOptions{}) errors: grpcroutes.gateway.networking.k8s.io CRD missing/old version, RBAC denial on the list verb, or an API server request failure.","commonSituations":"Clusters with older gateway-api CRD bundles lacking GRPCRoute; partial CRD upgrades where some routes (HTTPRoute) exist but GRPCRoute does not; RBAC-restricted identities running cilium-cli sysdump.","solutions":["Upgrade the gateway-api CRDs to a release including GRPCRoute (standard-install.yaml for v1.1+)","Confirm with kubectl api-resources | grep grpcroutes","Fix RBAC: grant list on grpcroutes.gateway.networking.k8s.io","Re-run after checking cluster connectivity if the wrapped error is transient"],"exampleFix":"v, err := c.Client.ListUnstructured(ctx, grpcRoute, &n, metav1.ListOptions{})\nif err != nil {\n    if meta.IsNoMatchError(err) || apierrors.IsNotFound(err) {\n        return nil // GRPCRoute CRD not installed; skip\n    }\n    return fmt.Errorf(\"failed to collect GRPCRoute entries: %w\", err)\n}","handlingStrategy":"try-catch","validationCode":"kubectl api-resources --api-group=gateway.networking.k8s.io | grep grpcroutes || echo \"GRPCRoute missing - apply gateway-api v1.1+ CRDs\"","typeGuard":"func isMissingCRDErr(err error) bool {\n    return apierrors.IsNotFound(err) || meta.IsNoMatchError(err) || apierrors.IsNotRegistered(err)\n}","tryCatchPattern":"v, err := c.Client.ListUnstructured(ctx, grpcRoute, &n, metav1.ListOptions{})\nif err != nil {\n    if isMissingCRDErr(err) {\n        return nil // GRPCRoute CRD not installed; skip\n    }\n    return fmt.Errorf(\"failed to collect GRPCRoute entries: %w\", err)\n}","preventionTips":["Upgrade gateway-api CRDs as a unit so all route kinds (HTTPRoute, GRPCRoute, TLSRoute, TCPRoute) stay in sync","Pre-flight kubectl api-resources check before sysdump","Keep RBAC aligned across all gateway.networking.k8s.io route resources","Verify cluster connectivity before long sysdump runs"],"tags":["kubernetes","sysdump","gateway-api","crd-missing","cilium-cli"],"backgroundTag":"crd-not-found","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}