{"record":{"id":"f5d5e2ac614b0308","repo":"cilium/cilium","slug":"failed-to-setup-envoy-load-balancer-reconciler-w","errorCode":null,"errorMessage":"failed to setup Envoy load balancer reconciler: %w","messagePattern":"failed to setup Envoy load balancer reconciler: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"operator/pkg/ciliumenvoyconfig/cell.go","lineNumber":100,"sourceCode":"\t\treturn nil\n\t}\n\n\tparams.Logger.Info(\"Register Envoy load balancer reconciler\")\n\n\treconciler := newCiliumEnvoyConfigReconciler(\n\t\tparams.CtrlRuntimeManager.GetClient(),\n\t\tparams.Logger,\n\t\tparams.Config.LoadBalancerL7Algorithm,\n\t\tparams.Config.LoadBalancerL7Ports,\n\t\t10,\n\t\tparams.ProxyTimeouts.ProxyIdleTimeoutSeconds,\n\t\tparams.ProxyTimeouts.ProxyStreamIdleTimeoutSeconds,\n\t\tagentOption.Config.EnableIPv4,\n\t\tagentOption.Config.EnableIPv6,\n\t)\n\n\tif err := reconciler.SetupWithManager(params.CtrlRuntimeManager); err != nil {\n\t\treturn fmt.Errorf(\"failed to setup Envoy load balancer reconciler: %w\", err)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":82,"sourceCodeEnd":105,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/operator/pkg/ciliumenvoyconfig/cell.go#L82-L105","documentation":"During operator startup, registerL7LoadBalancingController builds an Envoy load balancer reconciler and registers it with the controller-runtime manager via SetupWithManager. If registration fails (controller builder errors, missing Scheme registration, or watch setup problems), startup of the L7 load-balancing controller aborts with this wrapped error.","triggerScenarios":"SetupWithManager returns an error: CiliumEnvoyConfig types not registered in the manager Scheme, the ciliumenvoyconfigs CRD does not exist in the cluster, or the controller builder cannot set up watches/informer caches for the watched resource types.","commonSituations":"Cluster missing the cilium.io CiliumEnvoyConfig CRD (CRDs not applied/upgraded); operator cell wiring missing ciliumv2 Scheme registration; RBAC preventing cache sync for watched resources; controller-runtime version incompatibilities.","solutions":["Verify the CiliumEnvoyConfig CRD is installed: kubectl get crd ciliumenvoyconfigs.cilium.io; if missing, apply the CRDs from the matching Cilium version","Check the wrapped cause in the startup error for scheme/watch specifics","Ensure the manager Scheme includes ciliumv2 types (correct cell wiring/registration)","Confirm RBAC allows the operator to list/watch CiliumEnvoyConfigs"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before startup, verify the CRD and RBAC are in place\n_, err := discoveryClient.ServerResourcesForGroupVersion(\"cilium.io/v2\")\nif err != nil {\n    return fmt.Errorf(\"CiliumEnvoyConfig CRD not available: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := reconciler.SetupWithManager(params.CtrlRuntimeManager); err != nil {\n    log.Fatal(\"L7 LB controller registration failed\",\n        \"cause\", errors.Unwrap(err),\n        \"hint\", \"check CRDs installed and scheme registration\")\n}","preventionTips":["Apply Cilium CRDs for the exact operator version before starting the operator","Register ciliumv2 types in the controller-runtime Scheme during cell wiring","Grant list/watch RBAC on ciliumenvoyconfigs to the operator ServiceAccount","Test operator startup in CI against a cluster with CRDs applied"],"tags":["kubernetes","controller-runtime","envoy","startup","crd"],"backgroundTag":"controller-setup-failed","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}