Repository navigation
Closed
Labels
epic:surfacesEpic: behold as an infrastructure viewer inside other tools (INTENTIUS/behold#1049)wave:4Wave 4 of an epic's rollout: can start once earlier waves land
Description
Live Kubernetes objects already name what they depend on outside the cluster: a ServiceAccount's annotation names a cloud identity, an ExternalSecret names a store, and an Argo CD Application names a repo and path. A pure function that turns those fields into labelled placeholder cards lets a cluster surface show this with no configuration and no Terraform read. Part of #1049, phase 4.
Today
- Nothing in behold reads
ExternalSecret,SecretStore,secretStoreRefor the identity annotations. src/k8s-edges.tsjoins in-cluster references only, and its header saysApplication.spec.source.repoURLis not an edge on purpose.src/estate-edges.tsdraws an Application's path to a member directory only when that directory is in the graph.- Catalog rules: ExternalSecret to its store and to the cloud secret chant#5098 and Catalog rules: Workload Identity and IRSA annotations to the cloud identity chant#5099 draw edges for the same fields when the target is declared in the repo. Placeholders cover targets the graph does not hold.
Change
- A module in
web/with no Node imports:outsideRefs(objects)takes Kubernetes objects and returns{ cards, edges, notes }. Each card has a stable id from what it names andplaceholder: true. - Rules, each with a fixture:
- ServiceAccount annotations
iam.gke.io/gcp-service-account,eks.amazonaws.com/role-arnandazure.workload.identity/client-id, to a cloud identity card. - ExternalSecret
spec.secretStoreRefto its store, and a store'sspec.provider(GCP Secret Manager, AWS Secrets Manager, Vault) to a provider card carrying theremoteRef.keyvalues. - Argo CD Application
spec.sourceandspec.sources[](repoURL,path,chart), and Flux Kustomizationspec.sourceRefandspec.path, to a source card.
- ServiceAccount annotations
- Read the same field paths as Catalog rules: ExternalSecret to its store and to the cloud secret chant#5098 and Catalog rules: Workload Identity and IRSA annotations to the cloud identity chant#5099, so a placeholder and a derived edge never disagree. When the graph already holds the target, return no card for it.
- A field the rules do not understand goes in
notes. It is never dropped silently.
Done when
- A ServiceAccount annotated
arn:aws:iam::111122223333:role/ci-runnergives one card labelled with that role and an edge from the ServiceAccount. - An ExternalSecret using ClusterSecretStore
gcpwithprojectID: demo-projgives a store card and a provider card namingdemo-projand the key. - Two ServiceAccounts with the same annotation share one card.
- Given a graph that already holds the
aws_iam_role, the function returns no card for it.
Depends on
Nothing.
Not in this issue
Crossplane, ACK and Config Connector external names, which come next. Replacing a placeholder with the real Terraform resource from a published export, which needs the phase 2 graph document.
Metadata
Metadata
Assignees
Labels
epic:surfacesEpic: behold as an infrastructure viewer inside other tools (INTENTIUS/behold#1049)wave:4Wave 4 of an epic's rollout: can start once earlier waves land
Activity
feat: estate-read batch 1, readGraph, graph document, contract kinds,…