Skip to content

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

Closed
RajPrakash681 wants to merge 2 commits into
headlamp-k8s:mainfrom
RajPrakash681:feat/knative-eventing-channel-subscription-details
Closed

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

Conversation

@RajPrakash681

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.

This branch is built on #1354, so until #1354 merges the diff here also shows its commit. Only the last commit, knative: eventing: Add Channel and Subscription detail pages, is new.

Related Issue

Part of #922
Depends on #1354

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.
  • 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 on clusters without Eventing. 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.
  • The shared EventingResourceDetail page and the route check in KnativeCustomResource are the same as in knative: eventing: Add Broker and Trigger detail pages #1353, which adds the Broker and Trigger pages; here the shared page also accepts sections after the conditions. Whichever of the two merges second will be rebased onto the other.
  • Tests for the Channel's Subscriptions section: a subscriber linked by UID, one without a match, and a Channel without Subscriptions.

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

Taken in Headlamp's dark theme at 2x zoom, with the sidebar collapsed.

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

Signed-off-by: RajPrakash681 <rjnt452@gmail.com>
Signed-off-by: RajPrakash681 <rjnt452@gmail.com>
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.

1 participant