Separate shared identity from view-specific relationships
The Kubernetes tutorial explains why a Service-to-Pod request edge differs from a ReplicaSet-to-Pod ownership edge. The two views share the same conceptual Pods but answer different questions. The example’sinventory.json owns the Pod IDs, labels, scope and state. scripts/views.py supplies the fixed objects, edges and placement for each view. It generates two JSON diagram documents and a scope note; the renderer then produces two SVGs.
The inventory is an example-specific format. The generated files are diagram documents, not Kubernetes manifests. Keep scope notes separate from DSL fields that the renderer does not recognize.
Run the example
Clone the example repository. Use Python 3.10 or later and the renderer revision pinned in its shared-inventory workflow. Then run:--check detects missing or changed generated models without writing. The render script regenerates the models, validates both, and redraws the SVGs.
Rename a Pod label in multi-view/inventory.json, keeping its ID. Re-run the render script and review the inventory, both generated documents, and both SVGs together. If there are fewer than three Pods, add another with a unique ID. The compact example deliberately accepts one to three Pods; this is a limit of its teaching layout, not the renderer.
Review the CI artifact before merging
The example’s workflow tests identity propagation, stale-file detection and invalid IDs. It builds a pinned renderer and publishes ashared-inventory-views artifact with the inventory, generated models, scope note and images.
Pull requests do not push generated changes. After a source-only inventory change reaches main, the workflow can commit both updated models and images. Branch protection may reject that bot commit; use the artifact through the repository’s normal review process in that case.
This pipeline synchronizes authored inventory → diagram documents → images. It does not synchronize application code or cluster state into the inventory. See diagrams from code for that separate evidence-gathering step.