Comments (2)
Creating stories for #58
Feel free to update as needed
cc @serenamarie125 @rtaniwa @gorkem @spadgett
from backstage-plugins.
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.
cc: @serenamarie125 @christophe-f
from backstage-plugins.
Related Issues (20)
- chore(plugins): remove unnecessary `useState`s when using `useAsync` HOT 2
- "Pipelines with Tekton" plugin: Module not found: Error: Can't resolve '@patternfly/react-styles/css/components/Topology/topology-components.css' HOT 3
- [Topology]: Topology view re-renders on intervals and display empty state HOT 1
- [shared-react]: add null checks to tekton utils
- keycloak-backend plugin: Compromised token in the ErrorLog HOT 1
- Unable to Fetch Tekton Pipeline and TaskRuns if they are present in a different namespace HOT 2
- Customer Action: ServiceNow
- keycloak-backend plugin: Config Loader issue on Backstage v1.17 HOT 1
- Topology standalone dev environment breaks on click on k8s nav option
- Jfrog-artifactory plugin standalone dev environment breaks on load
- Upgrade janus plugins like topology and tekon to Patternfly 5 HOT 3
- Ansible plugin should list workflow templates HOT 3
- 🔌 Plugin: Jira Plugin for the Backstage
- ocm-backend: Extract extra types in `config.d.ts`
- Fix plugins that have been affected by `@backstage/[email protected]`
- 3scale-backend: Extract extra types in `config.d.ts`
- aap-backend: Extract extra types in `config.d.ts`
- aap-backend: improve AAP setup documentation HOT 1
- Add automated tests for each plugins `config.d.ts`
- Tekton and Topology: Prerequisites in documentation insufficient to view logs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backstage-plugins.