Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knative Backstage plugin article #5897

Merged
merged 22 commits into from Apr 3, 2024

Conversation

aliok
Copy link
Member

@aliok aliok commented Mar 7, 2024

Signed-off-by: Ali Ok <aliok@redhat.com>
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 7, 2024
@aliok aliok marked this pull request as ready for review March 7, 2024 08:27
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 7, 2024
@knative-prow knative-prow bot requested review from nainaz and pmbanugo March 7, 2024 08:27
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 7, 2024
@knative-prow knative-prow bot requested review from csantanapr and skonto March 7, 2024 08:27
@knative-prow knative-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 7, 2024
Copy link

netlify bot commented Mar 7, 2024

Deploy Preview for knative ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit aa4e6a3
🔍 Latest deploy log https://app.netlify.com/sites/knative/deploys/660d182e410b360008e79b8f
😎 Deploy Preview https://deploy-preview-5897--knative.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Ali Ok <aliok@redhat.com>
Signed-off-by: Ali Ok <aliok@redhat.com>
Signed-off-by: Ali Ok <aliok@redhat.com>
@Leo6Leo Leo6Leo self-requested a review March 7, 2024 20:32
Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. 👍
Thanks @aliok.

I only left some nits. But looks great so far

blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved

## Demo and quick start

If you would like to see the plugin in action, you can install the backend in your Kubernetes cluster and the plugin in your Backstage instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a link for some how-tos for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a link now

Copy link
Member

@Leo6Leo Leo6Leo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some nit, otherwise it looks good and easy to follow along!


## Contact

If you have any questions or feedback, please feel free to reach out to us. You can find us in the [CNCF Slack](https://cncf.slack.io) in the [#knative](https://cloud-native.slack.com/archives/C04LGHDR9K7) channel.
Copy link
Member

@Leo6Leo Leo6Leo Mar 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cncf slack link is invalid. https://communityinviter.com/apps/cloud-native/cncf or https://cloud-native.slack.com should be the correct one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated

blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
![](/blog/articles/images/knative-backstage-plugins-01.png)
*Knative EventTypes shown as APIs in Backstage*

Knative Triggers can be pointing at any [Addressable](https://knative.dev/docs/concepts/duck-typing/#addressable) or at even a URL directly. Since Backstage side won't know how to handle these, the plugin will only show the trigger's subscriber if it is already registered in Backstage. For this relation, we use the [`backstage.io/kubernetes-id`](https://backstage.io/docs/features/kubernetes/configuration#surfacing-your-kubernetes-components-as-part-of-an-entity) annotation in the Backstage entity and the Kubernetes resource.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Knative Triggers can be pointing at any [Addressable](https://knative.dev/docs/concepts/duck-typing/#addressable) or at even a URL directly. Since Backstage side won't know how to handle these, the plugin will only show the trigger's subscriber if it is already registered in Backstage. For this relation, we use the [`backstage.io/kubernetes-id`](https://backstage.io/docs/features/kubernetes/configuration#surfacing-your-kubernetes-components-as-part-of-an-entity) annotation in the Backstage entity and the Kubernetes resource.
Knative Triggers can be pointing at any [Addressable](https://knative.dev/docs/concepts/duck-typing/#addressable){:target="_blank"} or at even a URL directly. Since Backstage side won't know how to handle these, the plugin will only show the trigger's subscriber if it is already registered in Backstage. For this relation, we use the [`backstage.io/kubernetes-id`](https://backstage.io/docs/features/kubernetes/configuration#surfacing-your-kubernetes-components-as-part-of-an-entity){:target="_blank"} annotation in the Backstage entity and the Kubernetes resource.

Copy link
Member Author

@aliok aliok Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, applied manually

blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
blog/docs/articles/knative-backstage-plugins.md Outdated Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 21, 2024
aliok and others added 12 commits March 27, 2024 12:37
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
Co-authored-by: Leo Li <leoli@redhat.com>
Co-authored-by: Leo Li <leoli@redhat.com>
Co-authored-by: Leo Li <leoli@redhat.com>
Co-authored-by: Leo Li <leoli@redhat.com>
Co-authored-by: Leo Li <leoli@redhat.com>
Co-authored-by: Leo Li <leoli@redhat.com>
Co-authored-by: Leo Li <leoli@redhat.com>
Co-authored-by: Leo Li <leoli@redhat.com>
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 27, 2024
Signed-off-by: Ali Ok <aliok@redhat.com>
@aliok
Copy link
Member Author

aliok commented Mar 27, 2024

@Leo6Leo @creydr can you have a look again?

Copy link
Contributor

@nainaz nainaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a great write up. Left some nit-pick.


[Backstage](https://backstage.io/){:target="_blank"} is a platform for building developer portals. It provides a unified way to manage and visualize the different resources that developers use in their daily work.

However, Backstage is not your next generation Kubernetes dashboard. It is not designed to replace the Kubernetes dashboard or any other Kubernetes management tool.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should drop the use of However as it is there twice in the first paragraph here and may be try something like "While Backstage is not designed as a next generation Kubernetes Dashboard , it can visualize and partially manage Knative resources. These resources would be read-only and focused on what's relevant to developers.


However, Backstage is not your next generation Kubernetes dashboard. It is not designed to replace the Kubernetes dashboard or any other Kubernetes management tool.

With these in mind, our vision is to provide a way to visualize and partially manage Knative resources in Backstage. However, these are to be considered as read-only resources and we aim to show
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should drop the use of However as it is there twice in the first paragraph here and may be try something like "While Backstage is not designed as a next generation Kubernetes Dashboard , it can visualize and partially manage Knative resources. These resources would be read-only and focused on what's relevant to developers.


[The Event Mesh plugin](https://github.com/knative-extensions/backstage-plugins){:target="_blank"} is a Backstage plugin that allows you to view and manage Knative Eventing resources. The plugin talks to a special backend that runs in the Kubernetes cluster and communicates with the Kubernetes API server.

The plugin is not designed to be the ultimate tool for managing Knative Eventing resources. It is designed to be a developer-friendly tool that allows developers to visualize and partially manage the resources that are relevant to them. Given these constraints, the plugin is designed to be read-only, at least for the time being.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole part seems to be the repeat of earlier intro paragraph. Should we eliminate it?


This plugin leverages Backstage's [entity provider](https://backstage.io/docs/features/software-catalog/external-integrations/#custom-entity-providers){:target="_blank"} and [entity processor](https://backstage.io/docs/features/software-catalog/external-integrations/#custom-processors){:target="_blank"} concept. The entity provider is responsible for fetching the resources from the backend and the entity processor is responsible for processing the resources and making them available to the frontend. The provider is the part that talks to the custom backend.

The plugin fetches Knative EventType, Broker, and Trigger resources from the backend. Actually, it doesn't fetch the resources as is since the Kubernetes resources are not particularly designed for using them in this kind of UI, but it fetches better suited representations of the resources where some fields are ignored, some aggregated, and some transformed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads contradictory as first sentence said fetches and second says it doesn't fetch. :(
The plugin fetches Knative EventType, Broker, and Trigger resources from the backend. Instead of directly fetching the raw Kubernetes resources, it gathers a more user-friendly representation of the data. This means certain fields are excluded, some are combined for clarity, and others are transformed to be easier to understand within this interface.


If you would like to see the plugin in action, you can [install](https://github.com/knative-extensions/backstage-plugins?tab=readme-ov-file#running-the-backstage-plugin){:target="_blank"} the backend in your Kubernetes cluster and the plugin in your Backstage instance.

However, if you want a quick look at the plugin, you can check out the [demo video](https://www.youtube.com/watch?v=4h1j1v8KrY0){:target="_blank"}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a quicker look, check out the demo video

@aliok
Copy link
Member Author

aliok commented Apr 3, 2024

@Leo6Leo @creydr @nainaz can you have a look again and lgtm if good?

Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this @aliok

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 3, 2024
Copy link

knative-prow bot commented Apr 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, creydr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit 1fb2674 into knative:main Apr 3, 2024
19 checks passed
@nainaz
Copy link
Contributor

nainaz commented Apr 3, 2024

Looks like I am too late :)
Thank you for writing this @aliok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants