Add architecture diagrams to the six tutorial READMEs that lacked one - #27
Merged
Conversation
Every tutorial README now opens with an Architecture section, in the same slot the service-bus and CCM pages already use: a one-line lead-in, then a Mermaid flowchart sharing the house init directive and shape conventions. The three index pages show what their child tutorials share and where they diverge: one KEDA add-on and one managed identity feeding three event-source lanes; one CSI driver and Azure provider serving two namespaces that differ only in the identity the provider authenticates with; and the policy engine picked at cluster creation deciding which tutorial can run at all. The three policy tutorials show the enforcement mechanism and label each edge with the script number that changes its outcome, so the diagram tracks the walkthrough rather than restating it. Names, labels, selectors, roles and namespaces were read from the manifests and scripts: this is where the event-hubs identity turning out to hold Event Hubs Data Owner and Storage Blob Data Contributor, despite its scaler using a connection string, comes from. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an “## Architecture” section with Mermaid flowchart diagrams to six tutorial READMEs that previously lacked an up-front architecture overview, aligning them with the other tutorial pages that already include diagrams.
Changes:
- Added new
## Architecturesections with Mermaid diagrams to six tutorial READMEs. - Standardized diagram placement (immediately after the “Running on LocalStack?” note) and formatting (
%%{init: ...}%%, shared shape vocabulary). - Documented tutorial-specific policy/identity relationships visually (e.g., per-engine policy CRDs, per-step policy effects).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tutorials/policies/README.md | Adds an architecture diagram summarizing how policy engine choice maps to CRDs and which tutorials require which engine. |
| tutorials/policies/cilium/ingress-tutorial/README.md | Adds an object-level Cilium ingress-policy diagram showing L3/L4 then L7 enforcement progression. |
| tutorials/policies/cilium/egress-tutorial/README.md | Adds a Cilium FQDN/DNS-observation diagram explaining the mechanism behind progressive tightening steps. |
| tutorials/policies/calico/calico-policy-tutorial/README.md | Adds a Calico policy-flow diagram illustrating default-deny plus selective egress/ingress reopening steps. |
| tutorials/key-vault-csi-driver/README.md | Adds an identity/access-mode architecture diagram for the CSI driver + Azure provider across the two samples. |
| tutorials/keda/README.md | Adds a KEDA index architecture diagram showing shared add-on/identity and per-tutorial event sources and scaling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Motivation
Seven of the thirteen tutorial READMEs already open with an
## Architecturesection and a Mermaid diagram; six did not. On the pages that have one, the diagram is what makes the walkthrough legible before you run a single script — it names the objects, shows which component acts on which, and marks where the identity boundary sits. The six pages without one asked the reader to build that picture from prose and a script table.Three of the six are index pages (
keda,key-vault-csi-driver,policies), where a diagram earns its place for a reason the child pages cannot cover: what the sibling tutorials share and where they diverge. That relationship is the whole point of those pages, and it was previously only stated in a table.Changes
Six diagrams, each in an
## Architecturesection placed right after the "Running on LocalStack?" note — the slot service-bus and ccm use — with a one-sentence lead-in before the block, matching the existing pages. All six reuse the house%%{init: ...}%%directive and the established shape vocabulary (([...])for queues and external endpoints,[[...]]for the event hub,-.->for "watched by / read by / enforced by").tutorials/kedalocal-keda-uami-testidentity and the single KEDA add-on on the left, then one lane per tutorial with its event source, trigger, role grant and HPAtutorials/key-vault-csi-driverazureKeyvaultSecretsProvideridentitytutorials/policiescalico-policy-tutorialcilium/egress-tutorialkube-dnsanswers observed bycilium-agent) and the per-hostname verdict at each of the three tighteningscilium/ingress-tutorialrule1reapplied at L3/L4 then L7,tiefighterdropped at L7 andxwingdropped at L3In the three policy tutorials the edges are labelled with the script number that changes each outcome (
blocked by 03, allowed from 05), so the diagram tracks the walkthrough instead of restating it.Every name, label, selector, role and namespace was read out of the manifests and scripts rather than inferred. One thing that surfaced from doing so:
event-hubsdoes grant the shared identityAzure Event Hubs Data OwnerandStorage Blob Data Contributor(03-create-resources.sh) even though its scaler authenticates with a connection string, so the index diagram shows both grants.Documentation only — no scripts, manifests or Terraform/Bicep touched. Additions only; no existing line was modified.
Tests
No test suite covers README content, so verification was rendering:
mmdc(mermaid-cli) as a standalone file, then re-extracted from the committed READMEs and rendered again — all six render clean, which confirms the fenced blocks survived insertion intact.event-hubsdiagram was rendered the same way as a baseline. The subgraph-title overlap that appears on long nested titles is present there too, so it is pre-existing house behaviour and not introduced here.mermaidblock, with no duplicates.Worth a reviewer's opinion:
cilium/ingress-tutorialalready carries three PNGs from the Cilium docs illustrating the same progression. The Mermaid diagram still adds the actual Kubernetes objects where the PNGs are conceptual art, but it is the one to drop if you find it redundant. The ninesamples/*READMEs also have no diagram and were left alone, since the scope here was the tutorials.🤖 Generated with Claude Code