chore(controller): remove dead dashboard controller - #2694
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (39)
💤 Files with no reviewable changes (33)
📝 WalkthroughWalkthroughThis PR removes the dashboard subsystem: deletes dashboard API types and deepcopy code, removes internal dashboard controller implementation and helpers, drops dashboard CRD manifests and codegen inclusion, updates RBAC to stop referencing dashboard.cozystack.io, and adds a migration to delete existing dashboard CRDs while bumping the platform version. ChangesDashboard Subsystem Removal
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request removes the dashboard controller and its associated API surface. The Cozystack UI has been updated to consume Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request removes the dashboard controller, its API group (dashboard.cozystack.io), and all associated reconciliation logic, documentation, and CRDs. The review feedback identifies a critical issue resulting from this removal: since the controller's projection mechanism is gone, the dashboard UI now requires direct read access to the apps.cozystack.io and core.cozystack.io resource groups to list application instances and tenant modules. It is recommended to update the RBAC configuration to include these groups to maintain UI functionality.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/system/dashboard/templates/rbac.yaml (15-22)
With the removal of the dashboard controller and its projection mechanism, the dashboard UI now needs direct read access to the underlying resource groups. Removing the dashboard.cozystack.io group without adding permissions for apps.cozystack.io and core.cozystack.io will likely prevent the UI from listing application instances and tenant modules. Consider adding these groups to the readonly role.
- apiGroups:
- apps.cozystack.io
- core.cozystack.io
resources:
- '*'
verbs:
- get
- list
- watch
Kirill Ilin (sircthulhu)
left a comment
There was a problem hiding this comment.
LGTM overall
Please consider removing unnecessary CRDs in a migration script
The dashboard controller used to project ApplicationDefinitions into a set of dashboard.cozystack.io CRDs (Sidebar, Factory, Navigation, Breadcrumb, CustomFormsOverride, CustomFormsPrefill, CustomColumnsOverride, MarketplacePanel, TableUriMapping, CFOMapping, BreadcrumbInside) consumed by the legacy UI. cozystack-ui now reads ApplicationDefinitions directly, so the controller, its API types, the generated CRDs and the related RBAC rules are no longer used. Removes: - internal/controller/dashboard - api/dashboard/v1alpha1 - packages/system/cozystack-controller/definitions/dashboard.cozystack.io_*.yaml - dashboard.cozystack.io wiring from cmd/cozystack-controller/main.go - dashboard.cozystack.io RBAC rules from cozystack-controller and cozy-dashboard charts - ./api/dashboard/... codegen path from hack/update-codegen.sh Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Existing clusters still have the legacy dashboard.cozystack.io CRDs installed even after the dashboard controller has been removed. Add a platform migration that deletes them and bump targetVersion to 41. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
e24c55b to
1c059b3
Compare
|
Successfully created backport PR for |
What this PR does
Removes the dashboard controller and its API surface. cozystack-ui now consumes
ApplicationDefinitionresources directly, so the controller that projected them into a set ofdashboard.cozystack.ioCRDs (Sidebar, Factory, Navigation, Breadcrumb, CustomFormsOverride, CustomFormsPrefill, CustomColumnsOverride, MarketplacePanel, TableUriMapping, CFOMapping, BreadcrumbInside) is dead code.Removed:
internal/controller/dashboard/Go packageapi/dashboard/v1alpha1/API typespackages/system/cozystack-controller/definitions/dashboard.cozystack.io_*.yamlCRDsdashboard.cozystack.iowiring incmd/cozystack-controller/main.godashboard.cozystack.ioRBAC rules in thecozystack-controllerandcozy-dashboardcharts./api/dashboard/...codegen path inhack/update-codegen.shThe
spec.dashboardfield onApplicationDefinitionis intentionally kept — it is populated byhack/update-crd.shand read directly by cozystack-ui.Release note
Summary by CodeRabbit
Chores
Documentation