Skip to main content

From graph to repository

Generation
One build, one repository

A build renders every component, resolves every link, and aggregates the result into a single GitOps repository that describes the whole system — including the parts nobody enjoys writing.

the graphresolve linksIN AND OUTrender each componentIN PARALLELaggregateONE TREEPOST-GENERATIONacross the whole treestack-metadata.yamlnetwork policies from linksconfig checksums (opt-in)image inventory · air-gapyour stack repocommitdiff vs last pushimpact mapaffected files onlyPUSH: THE INCREMENTAL PATH
The build, end to end: resolve every link, render every component in parallel, aggregate one tree, run the post-generation chain across it, commit. A push takes the lower path and renders only what the change can reach.

What you get​

your-stack-repository/
├─ k8s/
│ ├─ build/
│ │ ├─ base/<component>/ in-cluster image build manifests
│ │ └─ overlays/<environment>/
│ └─ deploy/
│ ├─ base/<component>/ workloads, services, policies, secrets, routes
│ └─ overlays/<environment>/ per-environment values
├─ <component>/helm/ chart values and the script that renders the chart
├─ <application>/dev_tools/ Tiltfile, AGENTS.md, spec-kit for your AI coding agent
├─ apps/<name>/ your application code — on the build branch only
├─ doc/ generated documentation, per component and for the system
├─ scripts/ decrypt, validate, operate
├─ networkpolicy/ the network policies the links imply
├─ networkpolicy-manifest.json every policy, and the links that could not be resolved
├─ network-diagram.md every open path, and why
├─ rbac/ cluster roles for the people the graph grants access to
├─ audit/ a security audit of the design, regenerated every build
├─ versioning/ image inventory and migration script (air-gapped stacks)
├─ kustomization-build-all.yaml every build manifest in one apply
├─ kustomization-deploy-all.yaml every deploy manifest in one apply
├─ stack-metadata.yaml the graph, as data
└─ README.md the architecture, rendered as a diagram

Every component contributes its own subtree; the aggregation step merges them and preserves every environment any component defines. The whole tree lands on the generated branch and is merged into your build branch — see The stack repository and the merge.

A template does not ask "what is in this stack". It asks "is there a link of type X into me, or out of me" — and generates from the answer. The link type is literally sourceType-targetType, which is what makes the behaviour predictable.

The linkOn the sourceOn the targetElsewhere
application → relational databaseconnection variables, mounted secret, egress policythe database and its user, ingress policy, cross-namespace RBACa backup subject; a scrape target
gateway → applicationthe route, TLS, path rules, auth modenothing it has to know abouta certificate request; an identity redirect URI
application → object storageendpoint and credentialsthe bucket and its access keylifecycle and replication settings
metrics → anythingscrape configuration and alert rulesthe metrics endpoint exposeddashboards provisioned
database → bucket——backup schedule and retention, as link attributes

The consequence: you never write the second half of an integration. Drawing the edge produces the consumer's configuration, the producer's resource, the isolation rules between them and the operational wiring around them, in one pass.

The post-generation chain​

After every component has rendered, a chain runs across the whole tree. This is where the cross-cutting concerns are produced — the things no single component can know. The first step always runs; the others are switched by the system's section values.

Stack metadata

The graph is written to stack-metadata.yaml: every component, link, sub-component and attribute, as data. This file is what the stack agent later reads, and what every validation run is measured against.

Network policies from the links

Namespace-level microsegmentation generated directly from the graph — including sub-component to component edges, component to sub-component edges, and cross-stack links. Nothing that was not declared is permitted, and nothing has to be maintained by hand. Switched by microsegmentation_level; none turns it off.

Or the strict, regulated set

With microsegmentation_level set to pci_dss_strict, a stricter set replaces the standard one for the whole stack: a default-deny baseline in every namespace, no blanket allow rules, no blanket internet egress, and internet ingress only through the gateway. Three destinations are outside the pod network and cannot be matched by a namespace rule: the cluster DNS (node-local cache), the API server and the nodes themselves (kubelet, node-exporter). Each is allowed by CIDR from the stack configuration keys cluster_dns_cidr, control_plane_cidr and node_cidr. Until a key is set, that rule allows its ports to any destination, the build log says so, and the manifest lists it under fallback_to_any, so an assessor sees exactly what is open. Every declared link still works: a link whose port is not known to the generator is allowed on all ports between its two namespaces and listed in the generated network diagram, so it can be tightened rather than silently blocked. The full rules, including cross-stack links, are in Network policies.

Configuration checksums (optional)

Adds content checksums to the workload pod template, so that changing a secret or a configuration value actually rolls the pod instead of sitting unread in the API server. Switched on by checksum_annotations.

Image inventory and air-gap rewrite (optional)

Every image the stack uses is inventoried; a migration script and a set of image rewrites are produced so the same stack can be installed from a private registry with no internet access. Switched on by air_gapped — see Air-gapped installation.

Network policies are never written by a component

A component template never ships a network policy file. Policies are generated from the graph after all components have rendered, because only then is the full set of edges known. That is why adding a link automatically opens exactly the path it needs — and removing it closes it again.

Incremental change​

A full build regenerates everything. A push does not.

The platform diffs the new graph against the last pushed state, determines which attributes changed, and resolves — through a per-component impact map — exactly which generated files each of those attributes can affect. Only those files are re-rendered.

The result is that changing one attribute produces a small, reviewable diff and a short list of things to apply, instead of a repository-wide churn you have to read.

The push log ends with one kubectl apply --server-side per changed manifest, build manifests first.

Where Helm charts come from​

Components deployed from a Helm chart are rendered with helm template at build time, so the repository holds plain YAML. The chart archive is resolved in a fixed order: the build machine's local cache, then the platform's chart bucket shared by every stack when the platform has one, then the upstream repository with three attempts. Whatever the source, the archive is the chart's published one, so the output is the same. When every source fails, the render stops with an error instead of writing an empty manifest.

Your edits are not steamrolled​

Every file is merged three ways between what the platform generated last time, what it generates now and what is on your branch, so your edits survive builds. Files you mark ignore are never touched again, and a conflict on a push stops the push instead of committing conflict markers. The rules, file by file, are in The stack repository and the merge. The generated tree stays yours to extend.