Skip to content

Move MeshIdentity and MeshTrust into separate modules#4473

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/move-mesh-identity-trust-module
Draft

Move MeshIdentity and MeshTrust into separate modules#4473
Copilot wants to merge 3 commits intomasterfrom
copilot/move-mesh-identity-trust-module

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

Plan: Move MeshIdentity and MeshTrust into their own modules

Summary

Successfully moved MeshIdentity and MeshTrust from the generic resources module into their own dedicated modules following the "one module per resource" pattern established in the codebase.

Changes Completed

  • Create new /app/mesh-identities/ module with:

    • data/MeshIdentity.ts (moved from resources)
    • views/MeshIdentitySummaryView.vue (moved from resources)
    • index.ts (new - service registration)
    • routes.ts (new - route definitions)
    • sources.ts (new - data sources)
  • Create new /app/mesh-trusts/ module with:

    • data/MeshTrust.ts (moved from resources)
    • views/MeshTrustSummaryView.vue (moved from resources)
    • index.ts (new - service registration)
    • routes.ts (new - route definitions)
    • sources.ts (new - data sources)
  • Update imports in:

    • /app/service-mesh/index.ts (add new modules to services)
    • /app/meshes/routes.ts (update route imports)
    • /app/legacy-data-planes/routes.ts (update route imports)
    • Update view components to use new module paths
  • Clean up resources module:

    • Remove MeshIdentity and MeshTrust data files
    • Remove MeshIdentity and MeshTrust view files
    • Remove routes.ts (only contained MeshIdentity/MeshTrust routes)
    • Remove sources.ts (only contained MeshIdentity/MeshTrust sources)
    • Update resources/index.ts to return empty services array
  • Fix service container registration:

    • Remove unnecessary routes registration from mesh-identities
    • Remove unnecessary routes registration from mesh-trusts
    • Keep only sources registration (routes are imported directly where needed)

Files Changed

  • 15 files changed initially, 2 files updated to fix service container registration
  • Created 2 new modules: mesh-identities and mesh-trusts
  • Each module follows the established pattern with data, views, routes, sources, and index.ts
  • All imports updated to use new module paths
  • Routes are imported directly in consuming modules (not via service container)
  • No functionality changes - purely organizational refactoring

Testing

The refactoring maintains all existing functionality:

  • Routes remain unchanged (same paths and names)
  • Data transformations are identical
  • View components unchanged except for import paths
  • Feature tests (MeshIdentity.feature, MeshTrust.feature) should pass without modification
Original prompt

This section details on the original issue you should resolve

<issue_title>move MeshIdentity and MeshTrust into their own module</issue_title>
<issue_description>### Description

For ease these were initially added to resources which is is more used for an "abstract" resource i.e. other resources probably inherit/use this.

MeshIdentity/MeshTrusts ideally don't belong in here and should be in their own module or modules, either:

  • mesh-identities and mesh-trusts; or
  • mtls containing both potentially subfolder'd into mtls/meshidentities, mtls/meshidentities

I kinda like having an mtls module containing all mtls stuff which can be enabled disabled in one shot. But we currently have a pattern of one module per resource and then we sometimes wrap those into a parent module (as is the case with service-mesh.

All in all, I guess we should stick with the "one module per resource" pattern for now at least</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for kuma-gui failed.

Name Link
🔨 Latest commit 81c7cf1
🔍 Latest deploy log https://app.netlify.com/projects/kuma-gui/deploys/695e9e3cfe4b5400088db691

Co-authored-by: johncowen <554604+johncowen@users.noreply.github.com>
Copilot AI changed the title [WIP] Move MeshIdentity and MeshTrust to their own module Move MeshIdentity and MeshTrust into separate modules Jan 7, 2026
Copilot AI requested a review from johncowen January 7, 2026 17:10
@johncowen
Copy link
Contributor

@copilot it looks to me like you don't need to register the routes in the new service container config you've added in the index.ts files. The routes get imported into the meshes module and they aren't ever requested via the container.

I think you can remove the routes registrations in the service container for both your new modules, but keep the sources registered.

Co-authored-by: johncowen <554604+johncowen@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 7, 2026

@copilot it looks to me like you don't need to register the routes in the new service container config you've added in the index.ts files. The routes get imported into the meshes module and they a...

You're correct! Removed the unnecessary routes registration from both modules in commit 81c7cf1. The routes are now only imported directly where they're used (in meshes and legacy-data-planes modules), while the sources remain registered in the service container.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

move MeshIdentity and MeshTrust into their own module

2 participants