{"record":{"id":"3a7eaf63583db317","repo":"kubernetes/kops","slug":"registering-ipam-controller-w","errorCode":null,"errorMessage":"registering IPAM controller: %w","messagePattern":"registering IPAM controller: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops-controller/main.go","lineNumber":426,"sourceCode":"\t\tcontroller = ipamController\n\tcase \"gce\":\n\t\tipamController, err := controllers.NewGCEIPAMReconciler(mgr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating gce IPAM controller: %w\", err)\n\t\t}\n\t\tcontroller = ipamController\n\tcase \"metal\":\n\t\tipamController, err := controllers.NewMetalIPAMReconciler(ctx, mgr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating metal IPAM controller: %w\", err)\n\t\t}\n\t\tcontroller = ipamController\n\tdefault:\n\t\treturn fmt.Errorf(\"kOps IPAM controller is not supported on cloud %q\", opt.Cloud)\n\t}\n\n\tif err := controller.SetupWithManager(mgr); err != nil {\n\t\treturn fmt.Errorf(\"registering IPAM controller: %w\", err)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":408,"sourceCodeEnd":431,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops-controller/main.go#L408-L431","documentation":"The selected IPAM reconciler was created successfully but controller.SetupWithManager(mgr) failed, meaning controller-runtime rejected the registration (typically bad builder options, invalid Scheme GVK registration, or manager already started/invalid). setupCloudIPAM wraps the cause with this message and startup aborts.","triggerScenarios":"controller.SetupWithManager(mgr) returns err after a successful reconciler construction, for any of aws/gce/metal.","commonSituations":"Scheme missing the types the controller watches; manager built with incompatible options; running inside a modified/patched kops-controller; controller-runtime version skew between libraries.","solutions":["Inspect the wrapped cause to see which SetupWithManager step failed","Verify the kops Scheme registers all types the IPAM reconciler watches","Ensure the manager was not started before SetupWithManager was called","Rebuild kops-controller from the matching source/version to avoid skew"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := controller.SetupWithManager(mgr); err != nil {\n\tsetupLog.Error(err, \"registering IPAM controller failed\")\n\treturn fmt.Errorf(\"registering IPAM controller: %w\", err)\n}\n// caller: errors.As to unwrap the controller-runtime cause","preventionTips":["Register all watched types in the Scheme before SetupWithManager","Never start the manager before all controllers are registered","Pin controller-runtime versions to avoid skew"],"tags":["controller-runtime","ipam","startup","registration"],"backgroundTag":"controller-registration-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}