feat: speak inventory v1alpha2 property-graph model#10
Merged
Conversation
milo-os/inventory v0.1.0 ships a v1alpha2 API that collapses the typed per-kind CRDs into a property graph: generic Node + Edge (each with an attribute bag) under group graph.inventory.miloapis.com, with NodeType / EdgeType as the schema registry. Rework the plugin to speak it, replacing the v1alpha1 typed commands. Implements #9. Key changes: - Bump go.miloapis.com/inventory to v0.1.0; client + apply use the v1alpha2 scheme (graph.inventory.miloapis.com) - get <TYPE>: list nodes of an asset class with columns derived from the matching NodeType's attribute schema (falls back to the union of attribute keys present when no NodeType is registered) - get edges [--type/--from/--to]: list relationships - types: browse the NodeType/EdgeType registry - neighbors NODE [--edge/--direction]: graph traversal over edges - tree [--edge/--root-type]: containment hierarchy rebuilt from edges (default located-in, rooted at Region), with cycle guard - summary: counts per node type and per edge type - apply: graph kinds (NodeType, EdgeType, Node, Edge) in dependency order (types, then nodes, then edges); unsupported kinds rejected up front - Remove the v1alpha1 typed list commands (providers/regions/sites/ clusters/nodes)
Contributor
Author
|
IAM next, then reworking the importer. |
This was referenced Jun 12, 2026
scotwells
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Reworks the plugin to speak the v1alpha2 property-graph API shipped in milo-os/inventory v0.1.0, replacing the v1alpha1 typed commands. Implements #9.
v1alpha2 collapses the ~13 typed CRDs into generic
Node+Edge(each with an attribute bag) under groupgraph.inventory.miloapis.com, withNodeType/EdgeTypeas the schema registry. Relationships that were typed fields (a site's region, a node's cluster) are now edges.Command surface (replaces providers/regions/sites/clusters/nodes)
get <TYPE>get edges [--type/--from/--to]typesneighbors NODE [--edge/--direction]tree [--edge/--root-type]located-in, rooted atRegion); cycle-guardedsummaryapply -fVerification
go test ./...green.graph.inventory.miloapis.com/v1alpha2is served (plugin reaches it; the call returnsforbidden, not not-found). Full read verification is blocked on RBAC — my principal has no grant on the graph group yet (the v1alpha2 equivalent of the v1alpha1 inventory roles). That's an IAM/infra task, not plugin code.Notes
graph.inventory.miloapis.comso the plugin (and the loader) can operate end-to-end.