frontend: Display a8r.io service metadata in service views#4434
frontend: Display a8r.io service metadata in service views#4434illume merged 1 commit intokubernetes-sigs:mainfrom
Conversation
|
|
|
Welcome @mastermaxx03! |
|
Hi @kahirokunn 👋 Would appreciate a review when you have time. Happy to iterate on any feedback. |
|
@mastermaxx03 Thank you so much for this excellent PR! I'd like to share a few concerns I noticed: Rather than duplicating the entire processing logic again in the List view, would you consider refactoring the A8RServiceInfo side to organize the processing, and then leveraging that shared logic for both Details and List views? |
Hey @kahirokunn Thanks for calling that out. happy to clarify. Right now, the difference is intentional: the Details view is meant to surface all supported a8r.io annotations, including more descriptive fields like description, owner, and dependencies, while the List view actions are kept intentionally small and focused on a few high-signal actions (logs, documentation, repository, chat) to avoid clutter in the row menu. Because of that, the two views currently use separate logic paths, which I agree does introduce some duplication on the parsing side. We could refactor this so both views share a small helper for processing the annotations, while still keeping the List view limited to a curated subset of actions. I'm more than happy to do that it if you think this is a better direction. |
|
@mastermaxx03 Thanks for the clarification. That said, the meaning/function of the data is the same in both places (they’re both derived from the same a8r.io annotations), so I’d like to apply the DRY principle here. As you mentioned, providing a shared helper for parsing/processing the annotations sounds like a good direction. From a maintenance perspective, it would be ideal that changes in the annotation handling are applied consistently to both views automatically. Thanks again. |
I’ll refactor this to introduce a small shared helper responsible for parsing and normalising the a8r.io annotations (filtering, ordering, icon resolution, linkability), and then have both the Details view and the List view consume that shared logic. I'll push an update shortly. |
|
Thanks for the review feedback earlier! @kahirokunn |
|
The refactoring is excellent. I'm LGTM on the logic. |
|
I've reviewed the processing myself. @sniok @illume @joaquimrocha Everyone, do you have any thoughts on this UI, etc.? |
illume
left a comment
There was a problem hiding this comment.
Hey hey. Thanks!
Can you please change the commit message to match the commit message guide lines? Check some of the other messages to see the capitalization of the verb at the start.
Also, thanks for the review @kahirokunn
There was a problem hiding this comment.
Pull request overview
This pull request adds UI support for a8r.io service discovery annotations in Headlamp, enabling users to easily access service metadata such as owner, documentation links, logs, and communication channels directly from the UI.
Changes:
- Added a new
A8RServiceInfocomponent to display a8r.io annotations as formatted metadata with icons - Enhanced the Service list view with an Owner column and row action menu items for quick access to external links
- Added a conditional "Service Information" section in Service details view when a8r.io annotations are present
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/src/components/service/A8RServiceInfo.tsx | New component that parses and displays a8r.io annotations with icons, labels, and external links |
| frontend/src/components/service/List.tsx | Adds Owner column and row actions menu for a8r.io link annotations (logs, docs, repository, chat) |
| frontend/src/components/service/Details.tsx | Conditionally displays Service Information section, adds key props to map operations, and applies minor code cleanup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Please run the frontend tests locally? There’s a GitHub check failure. |
Hey @illume I’m working on these changes now. I’ll fix the frontend test failures and I'll push an updated, atomic commit shortly. |
|
Hi @illume and @kahirokunn,
All frontend tests and Storybook tests are now passing locally. |
|
Let's try running ci. |
|
Great, thank you for that. |
There was a problem hiding this comment.
Thanks again.
I have some notes after review for your consideration:
- Can you please add some states to ServiceDetails.stories.tsx which cover these new additions?
- There's a check failing in CI... Can you please run "npm run i18n"? It looks like there are translation strings that need to be generated. Don't worry about translating them all! But it needs the generated changes checked in.
- Please don't render the Owner column unless there are a8r annotations
- I left another note about adding tsdoc documentation to one of the functions (if you could also document any new interface fields that would be good).
- One little thing with the commit message. Since the vast majority of changes are in frontend/ (and fewer in app/ or backend/) it's good to add a bit more context. Since it touches two areas, you can add these areas into the context part of the commit message.
frontend: App: service: Add a8r.io service metadata support and icons
I’ve gone through your notes and addressed all of them: • Added Storybook states in ServiceDetails.stories.tsx and ServiceList.stories.tsx to cover services with and without a8r annotations For the conditional Owner column, I used the hideColumns prop to dynamically hide/show the column. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
illume
left a comment
There was a problem hiding this comment.
Thank you! Great work.
I'll wait a bit before merging to give @kahirokunn some time to give a final review (since they reported the issue).
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: illume, mastermaxx03 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Thanks for contributing!
cc @kahirokunn what do you think? |
AFAIK people are only using it on services.
Agree it should probably show with the other meta data... (But also, it's kind of fine separated.) btw. Looking at them side by side, I realise our meta data component is rendering quite weird with all that space between the keys and values. |
It's been quite a journey to get here. Thank you so much for all your hard work and patience throughout this process! |
It has been fun ngl! Regarding the spacing issue in the metadata component - that seems like a pre-existing issue. Should I address that in this PR or would that be better as a separate fix? |
|
Thank you for all your work on this! While integrating into the MetadataDisplay component might be good in theory, I think doing so would expand the scope significantly and take us away from the main focus of this PR (the a8r.io integration). I believe keeping the separate 'Services' section as it is now makes sense for this PR. Regarding the spacing issue. I agree that it's a pre-existing issue and would be better addressed in a separate PR to keep this one focused. Everything looks good to me! Let's move forward with this. LGTM! 🚀 |
Ok. Let's go with this as a first iteration.
|



Summary
Adds UI support for a8r.io service discovery annotations in Headlamp.
Related Issue
Fixes #4377
Changes
Steps to Test
Screenshots
Service list view with optional Owner column populated via a8r.io annotations.



Service list row actions menu showing quick-access links (Logs, Documentation, Contact Team) derived from a8r.io annotations, alongside existing actions.
Service details view displaying the new “Service Information” section populated from a8r.io annotations, including description, owner, dependencies, and external links.
Notes for the Reviewer