Repository navigation
fix: assign unique controller name to authconfig status updater - #690
Conversation
Controller-runtime v0.19+ validates that all controllers registered with the same manager have unique names. The AuthConfigStatusUpdater was implicitly getting the name "authconfig" from the logger hierarchy, which conflicted with the main AuthConfigReconciler. Explicitly set the controller name to "authconfigstatus" using the Named() builder method to ensure uniqueness. Fixes the error: "controller with name authconfig already exists" Signed-off-by: Michael Nairn <mnairn@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthrough
ChangesController Naming
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The controller naming change addresses the startup collision without introducing an identified runtime or integration risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the controller name Comment |
Summary
Fixes controller startup failure caused by duplicate controller names when using controller-runtime v0.19+.
Problem
The Kubernetes version upgrade in PR #684 introduced controller-runtime v0.23, which includes stricter validation introduced in v0.19 that requires all controllers registered with the same manager to have unique names.
Both the
AuthConfigReconcilerandAuthConfigStatusUpdaterreconcile the same resource type (AuthConfig). Without an explicit controller name, controller-runtime derives the name from the resource type, causing both to get the name "authconfig".This causes Authorino to fail on startup with:
Solution
Explicitly set the controller name to
"authconfigstatus"using the.Named()builder method inAuthConfigStatusUpdater.SetupWithManager()to ensure uniqueness.References
Summary by CodeRabbit