Repository navigation
Closed
Labels
epic:surfacesEpic: behold as an infrastructure viewer inside other tools (INTENTIUS/behold#1049)wave:2Wave 2 of an epic's rollout: can start once earlier waves land
Description
An "Infrastructure" tab on a component's page in Backstage that draws the Terraform roots, and later the workloads and releases, belonging to that component, with a link to the whole estate. It is frontend only and reads a published graph.json, so the portal needs no checkout or cloud credentials. Filed here under a label until behold-surfaces exists. Part of #1049, phase 2.
Today
- Backstage 1.49.0 made the new frontend system the default for new apps.
@backstage/frontend-plugin-apiis 0.18.2, and the latest release is 1.56.5 (2026-11-12). - New system:
EntityContentBlueprint(path,title,loader,group,icon,routeRef,filter) under an./alphaexport. Legacy apps wire tabs with<EntityLayout.Route>. - No well-known infrastructure annotation exists. Plugins define their own:
backstage.io/kubernetes-id,backstage.io/kubernetes-namespace,argocd/app-name,terraform/workspaces. proxy.endpointstakes headers, so a private bucket needs no backend code. A frontend-only plugin with both exports works in Backstage, Spotify Portal and Red Hat Developer Hub.- The TechDocs publisher serves HTML as
text/plain, so the graph cannot be hosted in the TechDocs bucket.
Change
- One npm package (name to decide), frontend only. Default export: a legacy
createPluginwith anEntityInfrastructureContentcomponent../alpha:createFrontendPluginwith anEntityContentBlueprintwhose filter shows the tab only on entities that resolve to a slice. - Config: a default export URL and proxy path.
behold.intentius.io/export-urlon an entity overrides it. - Resolve the slice, first match wins:
behold.intentius.io/roots(comma list of root box ids ingraph.json); thenterraform/workspaces,backstage.io/kubernetes-idandbackstage.io/kubernetes-namespacematched against node owner hints. The Kubernetes ones match only once Kubernetes kinds draw (Kubernetes kinds, helm-chart and cloudformation in CONTRACT_READ_KINDS; pass --detail #1056 and phase 3). - Fetch
graph.jsonthrough the proxy, cut it withcutAroundseeded by the boxes, and post the cut to the single-file viewer in an iframe. - A test app on each frontend system.
Done when
- On the new frontend system, a component annotated
behold.intentius.io/roots: <root>shows a tab drawing only that root and its neighbours from a publishedexample-terraform-estategraph.json. - The same works in a legacy app through
<EntityLayout.Route>. - A component with no matching annotation shows no tab.
- An export in a private bucket loads through
proxy.endpointswith no backend plugin.
Depends on
"Cut: around one resource or root", "Single-file viewer build", "Export writes graph.json and the single-file viewer", and a host for it ("Pages publication template" or --publish).
Not in this issue
Directory listing and Red Hat Developer Hub packaging. A selector annotation and spec.owner mapping. A backend that reads live.
Metadata
Metadata
Assignees
Labels
epic:surfacesEpic: behold as an infrastructure viewer inside other tools (INTENTIUS/behold#1049)wave:2Wave 2 of an epic's rollout: can start once earlier waves land
Activity
feat(surfaces): a Backstage Infrastructure tab whose annotation picks…
feat: estate-read batch 5, --discover reads, catalog edges, Backstage…
lex00 commentedon Nov 15, 2026
Progress on the Backstage tab. The viewer checks ran. The tab itself is not part of this work.
Done when:
<EntityLayout.Route>, which is also unbuilt.proxy.endpoints. Nothing here tests that.The viewer checks used headless Chrome and the single-file viewer built from behold
mainwith pinhole0.6.0. The viewer builds now, andsrc/viewer/viewer-browser.test.tspasses with 3 tests. The graph was the sandbox's published https://intentius.io/behold-sandbox/graph.json.?src=graph.jsonthe viewer draws all 9 cards.?src=graph.json&focus=behold-sandbox/appit lights 3 cards and dims the other 6. Focus dims and does not remove, so a tab that wants one root's cards has to cut the document first, as the issue plans.behold:graphmessage to the framed viewer receivesbehold:readyand thenbehold:drawnwith 9 cards.The tab will meet one oddity. The
service[0]andservice[1]cards of theapproot come from a resource withcount. They are drawn in the parent boxstack:behold-sandbox, not instack:behold-sandbox/app, so a focus on the root does not light them.feat(viewer): focus cuts the graph to one root, and the Backstage tab…
lex00 commentedon Nov 16, 2026
The Backstage tab is built and now checked in two scratch Backstage
1.56.0apps, one on the new frontend system and one legacy. Both read the public sandbox export in headless Chrome. The plugin was copied fromsurfaces/backstage-plugin-beholdinto each app bye2e/install-into-app.sh. Nothing was published.Done when:
behold.intentius.io/roots: behold-sandbox/appgave an Infrastructure tab with the 3 cards of that root and 2 edges. Naming the cardbehold-sandbox/app/random_password.dbgave that card and its neighbourdb_credentialswith 1 edge.<EntityLayout.Route>. The same two components gave the same text and cards.proxy.endpoints. A local server answered 401 without a bearer token.proxy.endpoints./beholdadded the header, and the tab readhttp://localhost:7007/api/proxy/behold/graph.jsonwith a 200.I also ran the viewer path. With
behold.htmlfromnpm run build:viewerbesidegraph.jsonon a local server, the tab opens the viewer in an iframe and answers itsbehold:readywith the cut. The viewer drew the 3 cards of the cut and no others. The sandbox's own Pages site has nobehold.html, so against it the tab draws the cut itself.The cut leaves out the
null_resource.service[0]and[1]cards of theapproot. A resource withcountis drawn in the parent boxstack:behold-sandbox, so they are not in the root's box. The foldednull_resource ×3card stays. This is in the README, andsrc/slice.test.tsnow runs the cut over the sandbox'sgraph.json.The sandbox has no edge between its two roots, so a neighbour in another root cannot show against it.
src/slice.test.tskeeps a test with one added across roots.