Skip to content

knative: eventing: Add Broker and Trigger detail pages - #1353

Open
RajPrakash681 wants to merge 1 commit into
headlamp-k8s:mainfrom
RajPrakash681:feat/knative-eventing-detail-pages
Open

RajPrakash681 wants to merge 1 commit into
headlamp-k8s:mainfrom
RajPrakash681:feat/knative-eventing-detail-pages

Conversation

@RajPrakash681

@RajPrakash681 RajPrakash681 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds detail pages for Knative Eventing Brokers and Triggers. Selecting a Broker or Trigger in the plugin's lists now opens a page that shows what it does in plain words, instead of Headlamp's generic Custom Resource view.

Related Issue

Part of #922

Changes

  • Broker page: its class (the eventing.knative.dev/broker.class annotation), its address, and a link to the object with its settings (spec.config, usually a ConfigMap). A reference without apiVersion or kind, which only a cluster without Knative's webhook accepts, is shown as text.
  • Trigger page: its Broker (from spec.broker or spec.brokerRef, linked to the Broker page), its filter, its subscriber, and the URI the subscriber resolved to.
  • Filter: shown as it is configured, as read-only, syntax-highlighted YAML: the filters expressions when there is at least one, otherwise the older filter.attributes. A Trigger that filters nothing reads "All events".
  • Both pages show the resource's conditions and events, and the Knative Eventing banner when Eventing is not installed in the resource's cluster; another selected cluster without Eventing does not hide the page. Missing optional fields show -, so objects on a cluster that has only the CRDs still render.
  • KnativeBroker and KnativeTrigger name their own detailsRoute and listRoute, so names in the lists, the Broker links on Trigger rows and pages, Headlamp's Back button and the navigation after a delete all lead to the plugin's pages. The other kinds built on KnativeCustomResource (the Serving internals, Domain Mappings and Cluster Domain Claims) still open Headlamp's Custom Resource views.
  • OwnerLink links each Knative kind whose class names its own detailsRoute to the plugin's page, so references to a Broker or a Trigger (for example a Subscription's owner) open the new pages. It also links ConfigMaps, and its Service, Secret and ConfigMap links use the kind as the route name, so Headlamp's details drawer opens them without logging "No details component for kind".
  • formatTriggerFilter turns the active filter into YAML, using the existing Trigger filter type, which is now exported instead of duplicated. The Triggers list and the Trigger page share one BrokerLink.
  • Test files: a new order-created Trigger with exact and prefix filters, which setup-eventing.sh waits for.

Steps to Test

  1. cd knative && npm run tsc && npm run lint && npm test.
  2. On a cluster with Knative Eventing, run ./test-files/setup-eventing.sh, open Knative > Eventing > Brokers and select default. The page shows MTChannelBasedBroker, the Broker's address and a link to the config-br-default-channel ConfigMap.
  3. Open Triggers and select order-created: the filter shows its exact and prefix expressions as YAML. catch-all reads All events, and dangling-subscriber shows SubscriberResolved as False with the Subscriber URI as -. Selecting the Broker name on a Trigger page opens the Broker page, whose Back button opens the Brokers list.
  4. On a cluster without Knative Eventing, a Broker or Trigger page shows the "Knative Eventing was not detected" banner.

Screenshots

image

Trigger detail page for order-created, with its filter as read-only YAML

image image image

@illume
illume requested a balanced review from Copilot October 15, 2026 06:14

Copilot AI 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.

🔵 Needs a closer look

Filter semantics need correction, and shared routing changes still require integration validation in Headlamp.

1 open finding
What changed in this PR

Adds dedicated Broker and Trigger detail pages to the Knative plugin, building on the Eventing list views from #1342.

Changes:

  • Adds Eventing resource views, relationship links, conditions, and events.
  • Extends navigation, installation banners, and filter summaries.
  • Adds helper tests, Eventing fixtures, and documentation.
File Description
knative/​test-files/​setup-eventing.sh Creates and waits for Eventing fixtures.
knative/​test-files/​README.md Documents Eventing checks.
knative/​test-files/​eventing/​01-broker-and-triggers.yaml Adds Broker and Trigger fixtures.
knative/​test-files/​eventing/​00-namespace-and-sink.yaml Adds the test namespace and subscriber.
knative/​test-files/​cleanup.sh Removes Eventing fixtures.
knative/​src/​sidebarGating.ts Gates Eventing navigation and selects landing pages.
knative/​src/​sidebarGating.test.ts Tests component-specific navigation.
knative/​src/​resources/​knative/​trigger.ts Defines Trigger data and routes.
knative/​src/​resources/​knative/​index.ts Exports Eventing resources.
knative/​src/​resources/​knative/​eventingData.ts Formats Eventing references and filters.
knative/​src/​resources/​knative/​eventingData.test.ts Tests Eventing data helpers.
knative/​src/​resources/​knative/​customResource.ts Supports resource-specific plugin routes.
knative/​src/​resources/​knative/​conditionedResource.ts Documents shared status fields.
knative/​src/​resources/​knative/​common.ts Adds shared Eventing types.
knative/​src/​resources/​knative/​broker.ts Defines Broker data and routes.
knative/​src/​navigation.ts Adds the Eventing sidebar section.
knative/​src/​navigation.test.ts Updates navigation expectations.
knative/​src/​listRoutes.ts Maps Eventing list components.
knative/​src/​listRoutes.test.ts Adds Eventing component mocks.
knative/​src/​index.tsx Registers detail routes and icons.
knative/​src/​components/​triggers/​List.tsx Lists Triggers and linked relationships.
knative/​src/​components/​triggers/​Detail.tsx Displays Trigger configuration and destination.
knative/​src/​components/​common/​OwnerLink.tsx Extends reference links and corrects core routes.
knative/​src/​components/​common/​NotInstalledBanner.tsx Adds component-specific installation guidance.
knative/​src/​components/​common/​NotInstalledBanner.stories.tsx Adds an Eventing banner story.
knative/​src/​components/​common/​EventingResourceDetail.tsx Shares detail layout and installation checks.
knative/​src/​components/​brokers/​List.tsx Lists Brokers and readiness.
knative/​src/​components/​brokers/​Detail.tsx Displays Broker configuration and address.
knative/​README.md Documents Eventing support and views.
knative/​package.json Updates the plugin description.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread knative/src/resources/knative/eventingData.ts Outdated
@RajPrakash681
RajPrakash681 force-pushed the feat/knative-eventing-detail-pages branch from 25fa76c to a47be28 Compare October 15, 2026 06:44
@illume
illume requested a balanced review from Copilot October 15, 2026 07:07

Copilot AI 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.

🔵 Needs a closer look

Shared navigation changes and detail-page integration still need runtime validation before approval.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

Co-authored-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: RajPrakash681 <rjnt452@gmail.com>
@RajPrakash681
RajPrakash681 force-pushed the feat/knative-eventing-detail-pages branch from 6b65202 to 05df156 Compare October 17, 2026 20:18
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.

2 participants