Repository navigation
Closed
Labels
epic:surfacesEpic: behold as an infrastructure viewer inside other tools (INTENTIUS/behold#1049)wave:3Wave 3 of an epic's rollout: can start once earlier waves land
Description
The reference catalog is each lexicon's list of how its resources name each other. The catalog never runs on a declared graph or across workspace members, so no edge ever goes from a manifest to a Terraform resource. Its paths also cannot address an annotation key such as eks.amazonaws.com/role-arn. Part of #5094 and INTENTIUS/behold#1049, phase 3.
Today
readPath(packages/core/src/graph-refs.ts, line 164) splits on.. The header oflexicons/k8s/src/reference-catalog.tsnames annotations and dotted label keys as out of reach for this reason.- The catalog runs in
chant graph --live, insearch --live, and over cloud indexes (deriveEdgesAcross,packages/core/src/lifecycle/derive-edges.ts, index: derived edges for indexed resources - referenceCatalog over indexed nodes #4522).compose-graph.tsadds only memberlinks. reconstructIndexedEdges(graph-refs.ts, line 383) is pure, refuses ambiguous matches, and reports dangling references with their rule id.- A declared Terraform node has kind
Terraform::Resource, its provider type inattrs.type, the block text inattrs.source, and no arguments. A rule that targetsgoogle_service_accountmatches nothing.
Change
- After composing, run
reconstructIndexedEdgesover the composed nodes on full attributes, whatever--detailasks for. Derived edges go inedges. Unresolved references go in top-leveldanglingwith their rule. Ambiguous ones go in a new additive field. - Kubernetes names have to stay inside their member and namespace while cross-lexicon rules reach other members. One
scopeOfper node cannot do both. The implementer picks two passes or a scope extension. - For this pass only, give each Terraform node its provider type as
kindand its literal arguments asattrs, aslexicons/terraform/src/behaviour/request.tsdoes for the behaviour engine. Count the arguments that are not literal. - Add a quoted key segment to
readPath, for examplemetadata.annotations["iam.gke.io/gcp-service-account"]. The exact syntax is a decision.
Done when
readPathreturns["x"]for that path on an object holding the annotation, and the existing catalog tests pass unchanged.- Fixture: member
apphas a Deployment withserviceAccountName: runner, and memberrbachas ServiceAccountrunnerin the same namespace. The graph prints an edge with rulek8s:K8s::Apps::Deployment:spec.template.spec.serviceAccountName. - Rename the reference to
missingand it appears indanglingwith that rule. - Two members that both hold
runnerthere give no edge and two recorded candidates. --detail 0output still has the derived edges.
Depends on
Nothing.
Not in this issue
The new rules, each with its own issue, and label selectors with dotted keys.
Metadata
Metadata
Assignees
Labels
epic:surfacesEpic: behold as an infrastructure viewer inside other tools (INTENTIUS/behold#1049)wave:3Wave 3 of an epic's rollout: can start once earlier waves land
Activity
feat: estate-read batch 1, discover, manifests kind, reference catalo…