Skip to content

chore(controller): remove dead dashboard controller - #2694

Merged
Andrei Kvapil (kvaps) merged 2 commits into
mainfrom
chore/remove-dashboard-controller
May 20, 2026
Merged

chore(controller): remove dead dashboard controller#2694
Andrei Kvapil (kvaps) merged 2 commits into
mainfrom
chore/remove-dashboard-controller

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented May 20, 2026

Copy link
Copy Markdown
Member

What this PR does

Removes the dashboard controller and its API surface. cozystack-ui now consumes ApplicationDefinition resources directly, so the controller that projected them into a set of dashboard.cozystack.io CRDs (Sidebar, Factory, Navigation, Breadcrumb, CustomFormsOverride, CustomFormsPrefill, CustomColumnsOverride, MarketplacePanel, TableUriMapping, CFOMapping, BreadcrumbInside) is dead code.

Removed:

  • internal/controller/dashboard/ Go package
  • api/dashboard/v1alpha1/ API types
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_*.yaml CRDs
  • dashboard.cozystack.io wiring in cmd/cozystack-controller/main.go
  • dashboard.cozystack.io RBAC rules in the cozystack-controller and cozy-dashboard charts
  • ./api/dashboard/... codegen path in hack/update-codegen.sh

The spec.dashboard field on ApplicationDefinition is intentionally kept — it is populated by hack/update-crd.sh and read directly by cozystack-ui.

Release note

chore(controller): remove the dashboard controller and dashboard.cozystack.io CRDs; cozystack-ui now reads ApplicationDefinitions directly.

Summary by CodeRabbit

  • Chores

    • Removed dashboard-related APIs, controllers, and UI integrations, disabling dashboard custom resources and related runtime behavior.
    • Removed dashboard CRDs from deployments and added a migration to clean up obsolete dashboard CRDs.
    • Updated RBAC to remove dashboard API group access and bumped platform migration target version.
  • Documentation

    • Removed dashboard integration and configuration guides.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 40b33b95-2f42-4256-9064-8198a72509f8

📥 Commits

Reviewing files that changed from the base of the PR and between e24c55b and 1c059b3.

📒 Files selected for processing (39)
  • api/dashboard/v1alpha1/dashboard_resources.go
  • api/dashboard/v1alpha1/groupversion_info.go
  • api/dashboard/v1alpha1/zz_generated.deepcopy.go
  • cmd/cozystack-controller/main.go
  • hack/update-codegen.sh
  • internal/controller/dashboard/README.md
  • internal/controller/dashboard/breadcrumb.go
  • internal/controller/dashboard/customcolumns.go
  • internal/controller/dashboard/customformsoverride.go
  • internal/controller/dashboard/customformsoverride_test.go
  • internal/controller/dashboard/customformsprefill.go
  • internal/controller/dashboard/factory.go
  • internal/controller/dashboard/factory_test.go
  • internal/controller/dashboard/helpers.go
  • internal/controller/dashboard/manager.go
  • internal/controller/dashboard/marketplacepanel.go
  • internal/controller/dashboard/navigation.go
  • internal/controller/dashboard/sidebar.go
  • internal/controller/dashboard/static_helpers.go
  • internal/controller/dashboard/static_processor.go
  • internal/controller/dashboard/static_refactored.go
  • internal/controller/dashboard/tableurimapping.go
  • internal/controller/dashboard/ui_helpers.go
  • internal/controller/dashboard/unified_helpers.go
  • packages/core/platform/images/migrations/migrations/40
  • packages/core/platform/values.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_breadcrumbs.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_breadcrumbsinside.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_cfomappings.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_customcolumnsoverrides.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_customformsoverrides.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_customformsprefills.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_factories.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_marketplacepanels.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_navigations.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_sidebars.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_tableurimappings.yaml
  • packages/system/cozystack-controller/templates/rbac.yaml
  • packages/system/dashboard/templates/rbac.yaml
💤 Files with no reviewable changes (33)
  • internal/controller/dashboard/ui_helpers.go
  • internal/controller/dashboard/README.md
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_customformsprefills.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_sidebars.yaml
  • internal/controller/dashboard/marketplacepanel.go
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_tableurimappings.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_customcolumnsoverrides.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_navigations.yaml
  • internal/controller/dashboard/customcolumns.go
  • internal/controller/dashboard/breadcrumb.go
  • internal/controller/dashboard/factory_test.go
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_factories.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_cfomappings.yaml
  • internal/controller/dashboard/helpers.go
  • internal/controller/dashboard/customformsprefill.go
  • internal/controller/dashboard/customformsoverride.go
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_marketplacepanels.yaml
  • internal/controller/dashboard/factory.go
  • internal/controller/dashboard/sidebar.go
  • internal/controller/dashboard/static_processor.go
  • internal/controller/dashboard/navigation.go
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_breadcrumbs.yaml
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_breadcrumbsinside.yaml
  • internal/controller/dashboard/tableurimapping.go
  • packages/system/cozystack-controller/definitions/dashboard.cozystack.io_customformsoverrides.yaml
  • internal/controller/dashboard/customformsoverride_test.go
  • api/dashboard/v1alpha1/groupversion_info.go
  • packages/system/dashboard/templates/rbac.yaml
  • internal/controller/dashboard/static_helpers.go
  • api/dashboard/v1alpha1/zz_generated.deepcopy.go
  • api/dashboard/v1alpha1/dashboard_resources.go
  • internal/controller/dashboard/unified_helpers.go
  • internal/controller/dashboard/manager.go

📝 Walkthrough

Walkthrough

This 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.

Changes

Dashboard Subsystem Removal

Layer / File(s) Summary
Controller entrypoint and codegen
cmd/cozystack-controller/main.go, hack/update-codegen.sh
Dashboard package import, scheme registration, manager setup, and dashboard CRD package in controller-gen are removed; manager startup simplified.
Internal dashboard implementation removals
internal/controller/dashboard/breadcrumb.go, internal/controller/dashboard/customcolumns.go
Deleted dashboard Manager helper implementations that built/upserted Breadcrumb and CustomColumnsOverride resources.
Migration and platform update
packages/core/platform/images/migrations/migrations/40, packages/core/platform/values.yaml
Adds migration script to delete legacy dashboard CRDs and updates platform migrations target version from 40→41.
RBAC template updates
packages/system/cozystack-controller/templates/rbac.yaml, packages/system/dashboard/templates/rbac.yaml
Removes dashboard.cozystack.io from controller RBAC rules; updates dashboard-readonly ClusterRole to cozystack.io/applicationdefinitions.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • cozystack/cozystack#1457: Prior/related work that reintroduced/refactored dashboard controller logic touching the same files and functions.

Suggested labels

kind/feature

Suggested reviewers

  • lllamnyp
  • klinch0
  • lexfrei

Poem

🐰 I nibbled menus, crumbs, and sidebars bright,
Then with a hop I cleared them from the site.
CRDs gone, RBAC trimmed with care,
A migration stamp: the version's there.
Quiet repo glows in soft commit light.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(controller): remove dead dashboard controller' clearly and concisely summarizes the main change in the PR—removing the dashboard controller implementation and related API surface. It accurately reflects the primary objective stated in the PR objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/remove-dashboard-controller

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt size/XXL This PR changes 1000+ lines, ignoring generated files labels May 20, 2026
@kvaps
Andrei Kvapil (kvaps) marked this pull request as ready for review May 20, 2026 11:11
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 ApplicationDefinition resources directly, rendering the dashboard.cozystack.io CRDs and the controller that projected them obsolete. This change simplifies the codebase by removing dead code and reducing the maintenance burden of managing redundant API types.

Highlights

  • Dashboard Controller Removal: Removed the internal/controller/dashboard/ package and its associated API surface, as the UI now consumes ApplicationDefinition resources directly.
  • CRD Cleanup: Deleted all dashboard.cozystack.io CRDs and their corresponding definitions in packages/system/cozystack-controller/definitions/.
  • Configuration Updates: Cleaned up cmd/cozystack-controller/main.go, hack/update-codegen.sh, and RBAC rules in both cozystack-controller and cozy-dashboard charts to reflect the removal of the dashboard controller.
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
  • Ignored by pattern: **/zz_generated.*.go (1)
    • api/dashboard/v1alpha1/zz_generated.deepcopy.go
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dosubot dosubot Bot added the area/dashboard Issues or PRs related to the dashboard / UI label May 20, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

high

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

@sircthulhu Kirill Ilin (sircthulhu) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall

Please consider removing unnecessary CRDs in a migration script

Andrei Kvapil (kvaps) and others added 2 commits May 20, 2026 16:33
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>

@sircthulhu Kirill Ilin (sircthulhu) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kvaps
Andrei Kvapil (kvaps) merged commit ce8e738 into main May 20, 2026
11 checks passed
@kvaps
Andrei Kvapil (kvaps) deleted the chore/remove-dashboard-controller branch May 20, 2026 16:37
@myasnikovdaniil myasnikovdaniil added the backport Should change be backported on previous release label May 21, 2026
@github-actions

Copy link
Copy Markdown

Successfully created backport PR for release-1.4:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dashboard Issues or PRs related to the dashboard / UI area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review backport Should change be backported on previous release kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt size/XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants