Skip to content

knative: eventing: Add Channel and Subscription detail pages - #1358

Draft
RajPrakash681 wants to merge 1 commit into
headlamp-k8s:mainfrom
RajPrakash681:feat/knative-eventing-channel-subscription-details
Draft

RajPrakash681 wants to merge 1 commit into
headlamp-k8s:mainfrom
RajPrakash681:feat/knative-eventing-channel-subscription-details

Conversation

@RajPrakash681

@RajPrakash681 RajPrakash681 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds detail pages for Knative Channels and Subscriptions, following the list views in #1354. Selecting a Channel or Subscription now opens a page that shows how events flow through it, instead of Headlamp's generic Custom Resource view.

Related Issue

Part of #922

Changes

  • Channel page: its backing Channel (for example InMemoryChannel/orders), its address, and a Subscriptions section with the state the Channel reports for each subscriber. Knative identifies subscribers by UID, so each one is matched to the Subscription with that UID in the Channel's namespace and linked to its page; a subscriber without a match shows its UID. The Subscriptions are listed only when the Channel reports subscribers.
  • Subscription page: its Channel, subscriber and reply destination (linked where they can be), and the endpoints Knative resolved for them: the subscriber, reply and dead letter sink URIs. Headlamp's own "Controlled by" row shows the Trigger a Broker created a Subscription for.
  • 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. Channels and Subscriptions that Knative created and owns stay read-only, as in knative: eventing: Add Channel and Subscription list views #1354.
  • KnativeChannel and KnativeSubscription name their own detailsRoute and listRoute, so names in the lists, the Channel links on Subscription rows and pages, Headlamp's Back button and the navigation after a delete lead to the plugin's pages.
  • OwnerLink links every Knative kind whose class names its own detailsRoute to the plugin's page, and the other Knative kinds to Headlamp's Custom Resource view, so a kind that gets a page needs no change there.
  • The shared EventingResourceDetail page works for any Knative resource with conditions. knative: eventing: Add Broker and Trigger detail pages #1353, which adds the Broker and Trigger pages, uses the same page and the same route check in KnativeCustomResource; whichever of the two merges second will be rebased onto the other.
  • The Subscriptions and Triggers lists share one destinationColumn for their Channel, Subscriber and Reply columns, and a Channel subscriber's ready uses the shared ConditionStatus type.
  • Tests for the Channel's Subscriptions section (a subscriber linked by UID, one without a match, and a Channel that reports no subscribers) and for which page OwnerLink links each kind to.

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 > Channels and select orders. The page shows InMemoryChannel/orders, the Channel's address, and orders-to-display under Subscriptions as Ready.
  3. Select orders-to-display. It links Channel/orders, Service/event-display and Broker/default, and shows the resolved subscriber and reply URIs. Selecting Channel/orders opens the Channel page.
  4. Open Subscriptions and select one of the default-… Subscriptions: "Controlled by" shows its Trigger, and Edit and Delete are not offered.
  5. On a cluster without Knative Eventing, a Channel or Subscription page shows the "Knative Eventing was not detected" banner.

Screenshots

Channel page: the backing Channel and the address.

Channel detail page for orders

A Channel's Subscriptions: each subscriber with its Subscription's name and state.

Subscriptions section of the orders Channel

Subscription page: the Channel, subscriber, reply, and the endpoints Knative resolved.

Subscription detail page for orders-to-display

A Subscription a Broker created: controlled by its Trigger, and read-only.

Subscription created by the default Broker for the catch-all Trigger

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.

🟢 Approval recommended

No blocking issues were identified in the reviewed changes; automated checks were not run.

0 open findings

What changed in this PR

Adds dedicated Channel and Subscription detail pages to the Knative plugin, building on the list views from #1354 and advancing Eventing support in #922.

Changes:

  • Shows resource relationships, resolved endpoints, conditions, events, and subscriber status.
  • Connects navigation to plugin pages while preserving read-only behavior for Knative-owned resources.
  • Adds tests, fixtures, and documentation for Channel and Subscription workflows.
File Description
knative/​test-files/​setup-eventing.sh Applies and waits for new fixtures.
knative/​test-files/​README.md Documents fixture verification.
knative/​test-files/​eventing/​02-channel-and-subscriptions.yaml Adds Channel and Subscription fixtures.
knative/​src/​resources/​knative/​trigger.ts Reuses shared authentication types.
knative/​src/​resources/​knative/​subscription.ts Defines Subscription fields and routes.
knative/​src/​resources/​knative/​index.ts Exports new resource classes.
knative/​src/​resources/​knative/​eventingData.ts Broadens destination helper documentation.
knative/​src/​resources/​knative/​customResource.ts Supports plugin-specific resource routes.
knative/​src/​resources/​knative/​common.ts Shares Eventing resource types.
knative/​src/​resources/​knative/​channel.ts Defines Channel fields, routes, and accessors.
knative/​src/​resources/​knative/​broker.ts Reuses shared Eventing types.
knative/​src/​readOnlyResources.ts Protects Knative-owned Channels and Subscriptions.
knative/​src/​readOnlyResources.test.ts Extends read-only action tests.
knative/​src/​navigation.ts Adds Eventing sidebar entries.
knative/​src/​navigation.test.ts Updates expected sidebar entries.
knative/​src/​listRoutes.ts Registers new list components.
knative/​src/​listRoutes.test.ts Adds list-component mocks.
knative/​src/​index.tsx Registers detail routes and resource icons.
knative/​src/​components/​triggers/​List.tsx Reuses destination links.
knative/​src/​components/​subscriptions/​List.tsx Displays Subscription relationships and readiness.
knative/​src/​components/​subscriptions/​Detail.tsx Displays destinations and resolved endpoints.
knative/​src/​components/​common/​OwnerLink.tsx Supports Channel and Trigger references.
knative/​src/​components/​common/​EventingResourceDetail.tsx Shares detail layout and Eventing availability checks.
knative/​src/​components/​common/​DestinationLink.tsx Renders destination references or fallback text.
knative/​src/​components/​common/​DestinationLink.test.tsx Tests destination rendering and namespace handling.
knative/​src/​components/​channels/​List.tsx Displays Channel configuration and readiness.
knative/​src/​components/​channels/​Detail.tsx Displays Channel details and subscriber links.
knative/​src/​components/​channels/​Detail.test.tsx Tests UID matching and fallback states.
knative/​README.md Documents new Eventing 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.

@RajPrakash681
RajPrakash681 marked this pull request as draft October 16, 2026 07:15
@RajPrakash681
RajPrakash681 force-pushed the feat/knative-eventing-channel-subscription-details branch from 9c206ec to 8a86fa1 Compare October 17, 2026 06:55
Co-authored-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: RajPrakash681 <rjnt452@gmail.com>
@RajPrakash681
RajPrakash681 force-pushed the feat/knative-eventing-channel-subscription-details branch from 8a86fa1 to 1f4fd95 Compare October 17, 2026 20:18
@illume
illume requested a balanced review from Copilot October 18, 2026 05:59

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 routing changes need navigation verification against the Headlamp SDK before approval.

No open issues 🎉

Review effort: Balanced

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