You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
As a developer, I want to visualize resources of Deployment kind and Deployment Config Kind with pods ring demonstrating pod status and decorators for the route in a sample plugin for topology as Read-only. This will require connecting with the cluster and evaluating if we can list/watch k8s resources from the cluster, if not what is that needed to get to it?
Acceptance Criteria
evaluating if we can list/watch k8s resources from the cluster
K8s plugin can be used to get the entity's resources from a cluster for the topology plugin. Currently there is only support for listing the resources and instead of watching the resources for updates, polling is done at a set interval.
Currently there is no need of a separate backend as we can use the k8s plugin api to consume the cluster resources.
Steps to use k8s plugin api to get the service objects in a separate plugin:
Install and configure kubernetes plugin by following these guides:
In the plugin component you want to fetch the resources in, first get the entity (const { entity } = useEntity() // Grab the current entity from the context).
Now using useKubernetesObjects hook (const { kubernetesObjects, error } = useKubernetesObjects(entity)) get the k8s resources.
Note:
K8s plugin identifies if the provided entity has k8s resources and if yes from which namespace it should get the resources based on the following annotations added to the entity's catalog-info.yaml annotations: 'backstage.io/kubernetes-id': dice-roller 'backstage.io/kubernetes-namespace': dice-space
For k8s plugin to get the desired entity's k8s resources the following label should be added to the resources 'backstage.io/kubernetes-id': <BACKSTAGE_ENTITY_NAME>
A custom label selector can also be added which will then be used by Backstage to find the resources. The label selector takes precedence over the id annotation. backstage.io/kubernetes-label-selector': 'app=my-app,component=front-end
In order to use k8s plugin to get the resources for Topology view, the above annotations/labels should be in place.
Description
As a developer, I want to visualize resources of Deployment kind and Deployment Config Kind with pods ring demonstrating pod status and decorators for the route in a sample plugin for topology as Read-only. This will require connecting with the cluster and evaluating if we can list/watch k8s resources from the cluster, if not what is that needed to get to it?
Acceptance Criteria
The text was updated successfully, but these errors were encountered: