Aller au contenu principal

C4 System Design β€” the minicloud Platform

The platform's solution-architecture model β€” the platform is made of these components, working together like this. Modelled once as a Structurizr DSL (workspace.dsl) and rendered to C4-model diagrams β€” diagram-as-code, so it never drifts. Every relationship is verified against the GitOps manifests (no invented edges).

Boundary: this models the Platform β€” the shared technical capabilities (the internal cloud provider). The Information System (the insurer's business apps) appears as a single external consumer and gets its own C4 model later. See the Architecture Hub for how the two pillars relate.

Two lenses, same facts. Each view is shown as the icon-rich visual (brand logos + verb-labelled edges, mingrammer diagrams); the equivalent formal C4 notation (Structurizr, standard boxes) is linked beside it. Click any diagram to open it full-screen. The complementary capability map, technology topology and physical view live on Platform Architecture.

Jump to Β· β‘  Context Β· β‘‘ Container Β· β‘’ Deployment Β· β‘£ Subsystem deep-dives

β‘  System Context β€” who the platform talks to​

The platform as one system, its users, the external systems it depends on, and the Information System as its consumer.

C4 System Context β€” minicloud Platform

Formal C4 notation (Structurizr): Context diagram β†’.


β‘‘ Container β€” the complete platform (all capabilities)​

The whole platform in one view: every capability as a container, grouped (Access & Networking · Delivery/GitOps · Security & Secrets · Data & Messaging · Storage & Backup · Observability · AI Runtime · Runtime & Tooling), with the relationships that make it work — code→production (Delivery), request→app (Access), secrets, telemetry, backup, and what the IS consumes. It's detailed — click to open full-screen and zoom.

C4 Container view β€” the complete minicloud Platform

Formal C4 notation (Structurizr): Container diagram β†’.

Drill into a subsystem β†’ GitOps / ArgoCD Β· Secrets / Vault+ESO Β· AI / LiteLLM β€” or follow a flow: delivery Β· request Β· observability.


β‘’ Deployment β€” where it physically runs​

The same model, deployed: the 6-node k3s cluster + the off-cluster MAAS controller, with placement (Vault β†’ fast-heron, vLLM β†’ star-kitten, control-plane β†’ set-hog) and Longhorn replicated across the storage nodes.

C4 Deployment view β€” 6-node k3s + controller


Subsystem deep-dives (C4 Component + flow)​

Zooming inside the key containers β€” "the GitOps platform in detail", and the same for secrets and the AI gateway. All grounded in the GitOps manifests + the platform rules. (Click any diagram to enlarge.)

↑ Back to the Container view

How code reaches production β€” the delivery flow​

A git push to a running production workload (CI β†’ registries β†’ Kargo β†’ ArgoCD β†’ cluster), showing the continuous-delivery vs continuous-deployment split: the same artifact is built+proved once, Kargo auto-deploys it to dev (continuous deployment β€” no human), then a CODEOWNERS-gated PR promotes it to prod (continuous delivery β€” a human decides when). The full narrative is on the Delivery Workflow page.

System-design view β€” icon-rich, the four stages colour-coded (grey build Β· cyan promote Β· green = automatic dev Β· amber = human-gated prod). Open full SVG β†’

Delivery pipeline β€” continuous delivery (prod) + continuous deployment (dev)

Formal C4 dynamic view β€” the same sequence in standard C4 notation (Structurizr). Open full SVG β†’

Delivery flow β€” how code reaches production

The GitOps workflow system (the reconcile loop)​

The whole GitOps system in one view β€” where the delivery flow follows the artifact, this follows the control loop: humans and Kargo only ever write to Git (the single source of truth); ArgoCD is the only thing that writes to the cluster, continuously reconciling desired state (Git) against live state and self-healing drift. Shows the two-repo model, Kargo promotion (dev auto / prod CODEOWNERS-gated) into Git, the app-of-apps tree, the Helm wrapper+library render, and the drift-correction loop (red). Open full SVG β†’

GitOps workflow system β€” Git is the source of truth, ArgoCD is the only cluster writer

GitOps delivery β€” inside ArgoCD​

Zooming inside the reconcile engine above: Root App-of-Apps β†’ ApplicationSets / AppProjects β†’ Sync+Health controller β†’ the cluster; Kargo opens the CODEOWNERS-gated PR.

C4 Component β€” inside ArgoCD

Secrets delivery β€” inside Vault + ESO​

Vault KV/PKI (KMS auto-unseal) β†’ ESO ClusterSecretStore reads Vault β†’ ExternalSecret renders the k8s Secrets workloads consume.

C4 Component β€” inside Vault + ESO

AI gateway β€” inside LiteLLM​

Virtual keys/budgets β†’ model router β†’ PII guardrail (Presidio) + cache + provider connectors (vLLM / Groq / cloud).

C4 Component β€” inside the LiteLLM gateway

How a request reaches an app (networking flow)​

User β†’ Cloudflare β†’ tunnel β†’ ingress β†’ Authentik (forward-auth) β†’ the workload.

Request flow β€” how a user request reaches an app

Telemetry + alerting (observability flow)​

Prometheus scrapes the cluster · OTel ships logs→Loki / traces→Tempo · alerts → Alertmanager → SES email.

Observability flow β€” telemetry + alerting

Further subsystem views are cheap to add β€” the model already holds the elements; just add a component/dynamic view to workspace.dsl.


Legend​

  • Shapes (C4): rounded person = a Person; blue box = the Platform (software system); grey box = an external system; purple box = the Information System (the platform's consumer); teal/coloured boxes = containers (platform capabilities, tinted by group).
  • Arrows: every arrow is a relationship with a verb (builds Β· pushes Β· promotes Β· reconciles Β· supplies-secrets Β· issues-certs Β· authenticates Β· scrapes Β· ships-logs Β· backs-up Β· routes-to Β· consumes).
  • Each formal view also has a C4 key (auto-generated): structurizr-<view>-key.svg.

Maintaining it​

Edit diagrams/structurizr/workspace.dsl, run make c4 (Structurizr CLI β†’ PlantUML β†’ SVG, via Docker), commit the refreshed SVGs β€” a CI workflow also regenerates on change. This is the single source of truth for the platform's C4 views; the capability map / technology topology / physical view remain the complementary stylistic references.