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
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c827300
Knative Backstage plugin article
aliok Mar 7, 2024
a709333
Add some images
aliok Mar 7, 2024
f650739
Make YouTube video image larger
aliok Mar 7, 2024
b613eef
Show embedded YouTube video
aliok Mar 7, 2024
866f359
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
28a2f74
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
3332cfe
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
e2bb447
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
7fe199b
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
fb3190c
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
f9dfe53
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
a3f52ce
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
3441601
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
dc9a515
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
1d746aa
Update blog/docs/articles/knative-backstage-plugins.md
aliok Mar 27, 2024
8e004f8
Merge branch 'main' into 2024-03-01-backstage-blogpost
aliok Mar 27, 2024
25b16d0
Address comments, add target=_blank to links
aliok Mar 27, 2024
0ce765c
Update blog/docs/articles/knative-backstage-plugins.md
aliok Apr 3, 2024
f34b53d
Update blog/docs/articles/knative-backstage-plugins.md
aliok Apr 3, 2024
c506b8a
Update blog/docs/articles/knative-backstage-plugins.md
aliok Apr 3, 2024
745082a
Update blog/docs/articles/knative-backstage-plugins.md
aliok Apr 3, 2024
aa4e6a3
Update blog/docs/articles/knative-backstage-plugins.md
aliok Apr 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions blog/config/nav.yml
Expand Up @@ -46,6 +46,7 @@ nav:
- releases/announcing-knative-v0-3-release.md
- releases/announcing-knative-v0-2-release.md
- Articles:
- articles/knative-backstage-plugins.md
- articles/knative-eventing-vision.md
- articles/new_event_discovery_features.md
- articles/getting-started-blog-p2.md
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions blog/docs/articles/knative-backstage-plugins.md
@@ -0,0 +1,62 @@
# Knative and Backstage

**Author: Ali Ok, Principal Software Engineer @ Red Hat**

## What's the vision?

[Backstage](https://backstage.io/) 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.
aliok marked this conversation as resolved.
Show resolved Hide resolved

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.

aliok marked this conversation as resolved.
Show resolved Hide resolved

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.

aliok marked this conversation as resolved.
Show resolved Hide resolved
resources that are relevant to the developer persona.

## Plugins and backends

The plugins are the frontend part of the Backstage plugin. They are responsible for rendering the UI and communicating with the backend. The backend is responsible for talking to the Kubernetes API server and providing the necessary information to the frontend. Currently, we only have 1 plugin and it requires a backend to work. We think that most of the plugins we might provide in the future will require a backend-for-frontend to work.
aliok marked this conversation as resolved.
Show resolved Hide resolved

## The Event Mesh plugin

[The Event Mesh plugin](https://github.com/knative-extensions/backstage-plugins) 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.
aliok marked this conversation as resolved.
Show resolved Hide resolved

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?

aliok marked this conversation as resolved.
Show resolved Hide resolved

This plugin leverages Backstage's [entity provider](https://backstage.io/docs/features/software-catalog/external-integrations/#custom-entity-providers) and [entity processor](https://backstage.io/docs/features/software-catalog/external-integrations/#custom-processors) 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.
aliok marked this conversation as resolved.
Show resolved Hide resolved

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.
aliok marked this conversation as resolved.
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.
aliok marked this conversation as resolved.
Show resolved Hide resolved
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


How the matching works is documented with diagrams in the [Event Mesh plugin README file](https://github.com/knative-extensions/backstage-plugins?tab=readme-ov-file#event-mesh-plugin-1).
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
How the matching works is documented with diagrams in the [Event Mesh plugin README file](https://github.com/knative-extensions/backstage-plugins?tab=readme-ov-file#event-mesh-plugin-1).
How the matching works is documented with diagrams in the [Event Mesh plugin README file](https://github.com/knative-extensions/backstage-plugins?tab=readme-ov-file#event-mesh-plugin-1){:target="_blank"}.


What's really cool about this integration is that Backstage's ability to show graphs. For example, you can see the relationships between EventTypes, Brokers, and Trigger subscribers in a graph.

![](/blog/articles/images/knative-backstage-plugins-02.png)
*Graphs in Backstage*

## 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


However, if you want a quick look at the plugin, you can check out the [demo video](https://www.youtube.com/watch?v=4h1j1v8KrY0).
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
However, if you want a quick look at the plugin, you can check out the [demo video](https://www.youtube.com/watch?v=4h1j1v8KrY0).
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"}.

The demo video is recorded with the quick start available in Ali Ok's [demo repository](https://github.com/aliok/knative-backstage-demo).
aliok marked this conversation as resolved.
Show resolved Hide resolved

<iframe width="560" height="315" src="https://www.youtube.com/embed/4h1j1v8KrY0?si=tzUmjcrYOfCy6E1H" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>


## Contributions welcome

We are looking for contributors to help us improve the plugin and the backend. If you are interested in contributing, please check out the [README file](https://github.com/knative-extensions/backstage-plugins) of the plugins repository. How to start the backend, how to install the plugin, and how to modify the plugin are all documented there.
aliok marked this conversation as resolved.
Show resolved Hide resolved

There are a few issues that are marked as good first issues and we are looking for help with them. If you are interested in contributing, please check out the [good first issues](https://github.com/knative-extensions/backstage-plugins/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
aliok marked this conversation as resolved.
Show resolved Hide resolved

## What's next

We are exploring the possibility of adding more functionality to integrate Backstage with Knative. One aspect here is reusing the [Knative Functions](https://knative.dev/docs/functions/) templates as [Backstage templates](https://backstage.io/docs/features/software-templates/adding-templates). This would allow developers to create new Knative Functions from Backstage and manage them from there, while having the compatibility with the [Func CLI](https://knative.dev/docs/functions/install-func/).
aliok marked this conversation as resolved.
Show resolved Hide resolved

## 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

aliok marked this conversation as resolved.
Show resolved Hide resolved