GitOps and source of truth: two layers, one flow

The remark landed in the middle of a meeting, in a tone that left no room for doubt: “what you are describing is not GitOps”. Its author will remain anonymous; for the purposes of this article, let’s call him Bob. Bob has nothing against us, Bob has a conviction.
What we had just described was a production deployment chain at a large banking group. A source of truth models the intent: sites, devices, services, addressing, policies. A generator derives the target configuration files from it, pushes them to a branch and opens a merge request. Opening the merge request triggers the pipeline: syntax tests, business-logic tests specific to the client, with their results displayed in the merge request itself. Engineers then review the diff and the test results together. The merge triggers the deployment: prechecks validate the state of the devices, a controller applies the files that have just entered the main branch, and postchecks confirm that the result is the one expected.
In this chain, Git contains exactly what goes to production, every change is a reviewed commit, and nothing is deployed without a merge. Bob disputed none of these points. What bothered him was the entry point: in his view, making the source of truth the place where intent is entered, rather than the repository itself, was incompatible with a GitOps approach.
The reaction interested me because it is common, and because it rests on a precise confusion: the one between a delivery method and the place where intent is captured. To untangle it, we need to go back to what GitOps actually requires.
What follows is not a truth I claim to impose. It is a personal reading, informed by what I have seen work, and fail, at clients. It is open to debate, and that is the point.
What GitOps requires
The term has a reference definition, the one from the CNCF OpenGitOps working group. It fits in four principles.
The first requires that the desired state of the system be expressed declaratively: you describe what you want to obtain, not the sequence of operations to get there. In networking, that means target configurations or a data model, not a runbook of commands.
The second requires that this desired state be stored in a versioned and immutable way, with a complete history. This is where, and only where, Git comes in. Every version is identifiable, you know who changed what and when, and you can return to any earlier state. (InfraHub is an interesting exception here, compared with NetBox or Nautobot: it carries this principle all the way up to the source of truth itself, with branches, diffs and an immutable history on the data, and no longer only on the files derived from it.)
The third requires that software agents automatically pull the desired state from the repository, without a human having to trigger anything.
The fourth requires that these agents continuously reconcile the actual state with the desired state: they observe, they compare, they correct the gap.
Read the four again. None of them says how the declarative state gets into the repository, nor where intent must be entered. None of them requires the repository to be the entry point. Whether a person writes the files or a program produces them from a model, the principles are met identically, because they are about what happens from Git onwards, not about what happens before.
If you want to find the flaw in the chain described above, it is not, as it happens, where Bob placed it. A controller that pushes the configuration at merge time and stops there meets the first two principles entirely, the third halfway (the merge triggers, no agent pulls), and the fourth not at all: postchecks validate the deployment at the moment it happens, but nobody then watches for drift between the repository and the devices. That is a legitimate debate, and it deserves to be had. But it is a debate about reconciliation, not about the entry point. The day a drift-detection loop is added, the source of truth upstream will not have moved an inch.
Which leaves the real question, the one the dogma prevents from being asked: where should intent be entered, and by whom?
In the GitOps approach, the source of truth is the Git repository
That is the default answer, the one imported from the application world: the repository is the source of truth, and teams edit the files in it themselves. One pull request per change, a CI that checks the syntax, a review, a merge.
It is also where the ambiguity appears. If the source of truth is Git, it cannot at the same time be a third-party tool, InfraHub, NetBox or Nautobot. Put that way, Bob’s objection holds: two sources of truth for the same kind of information is one too many. It only dissolves once you look at what each of them actually contains, and that is the subject of what follows. Before that, we need to understand why, in a network context, making the repository the entry point for intent works poorly in practice. Not because teams are uncomfortable with Git, even though that is often the case in a network team, but above all for a simple reason: scale.
This model suits a team of developers managing a few dozen Kubernetes manifests. Modelling a network infrastructure, on the other hand, means handling thousands of interfaces, VLANs, prefixes, BGP neighbours and filtering rules, each with its attributes and dependencies. A routine change, adding a site or a service, touches dozens of objects spread across as many files. Consistency between those files then rests on the attention of the person editing them, or on the pipeline.
Relying on CI/CD to check data consistency and compliance with business constraints quickly becomes very complex and hard to maintain. The relationships between the declared objects are numerous and nested: an interface belongs to a device, carries a VLAN that must exist on the site, within a range allowed for that type of service. Checking this on flat files means rewriting in scripts what an ORM or a graph database does naturally, because there the relationships are the model itself.
The other limitation is that this way of working does not go in the direction of fail fast. The data is committed, the commit triggers the pipeline, the pipeline runs for a more or less long time, then returns its errors. The error is detected after the fact, whereas the healthier option would be for the system to reject the inconsistent data or the business-rule violation much further upstream, before even taking it into account.
The audience can potentially make the problem worse. Day-to-day changes are not made by the architect who designed the model, but by the level 1 and level 2 teams who operate the network. Git is generally not their tool. Branches, rebases, merge conflicts, the syntax of the files, whether YAML with its indentation and implicit types, JSON or Jinja templates, all of it demands learning that has nothing to do with their job, and every step is one more opportunity for error. You can train the teams, write documentation, provide templates: in practice, the outcome is most often the same, people end up working around the tool.
And that is what matters in the end: adoption. An automation can be technically flawless; if the people meant to use it work around it, it is worth nothing. They go back to the CLI, the repository diverges from reality, and six months later Git describes a network that no longer exists. GitOps did not fail on a principle, it failed on an interface.
This observation does not call into question the repository, the review or the merge. It only says that entering information by hand directly in the Git repository is problematic. A level of abstraction above it is needed.
A layer of abstraction above Git
That level of abstraction exists, and it has a name the network automation community has used for years: the source of truth. Nautobot, InfraHub or NetBox, depending on the context, play that role. Their function in a GitOps flow is not to replace Git. It is to sit upstream, between the user and the repository, so that intent is captured in a model rather than in a file. Three things then change.
The first is the interface. A level 1 engineer who needs to add a site fills in a form, with drop-down lists, constrained fields, relationships that suggest themselves. They know neither the file name, nor the expected indentation, nor the Git branch the generated files will land on. They describe what they want, in the vocabulary of their job, and that is precisely what makes adoption easy.
The second is validation before writing, the fail fast the pipeline was missing. In a source of truth, validation happens at entry time: the model rejects a prefix that overlaps another, an interface attached to a device that does not exist, a VLAN outside the range allowed for that site. And beyond structural consistency, the client’s own business rules are encoded there: this family of devices does not accept that type of service, this site imposes that addressing scheme. These checks are simple to write because they apply to objects and their relationships, not to files. Data quality is validated before commit.
The third is derivation. It is the least visible and the most decisive. In a well-built model, you do not enter low-level objects one by one. You enter a high-level object, a site of a certain type, a service of a certain class, and the model creates or updates everything that follows from it: interfaces, addressing, VLANs, neighbours, filtering rules. The user describes a need, the source of truth deduces the detail (Design Builder on the Nautobot side, Generators on the InfraHub side; on the NetBox side, custom scripts come close, but imperatively and without a design lifecycle). The volume that made manual editing impossible is absorbed by the tool, not by the person.
These three contributions answer, point for point, what made manual editing fail: scale, the audience, and the adoption that follows from them. But they raise an obvious question: once intent lives in a model, what becomes of the repository?
And the flow is still GitOps
It becomes what it should always have been: the mandatory gateway between intent and production, and nothing else.
Let’s go back over the chain from the beginning with this reading grid. The source of truth validates and derives the intent. The generator, a Nautobot job or an InfraHub pipeline depending on the tool, produces the target configurations and pushes them to a branch. From there on, nothing distinguishes this flow from a “manual” GitOps: opening the merge request runs the tests, engineers review the diff with the results in front of them, the merge triggers the prechecks and then the deployment, the controller applies the files from the main branch, and the postchecks validate the result.
The review even gains in quality. When a human writes the file, the reviewer checks both the intent and its translation: did they really want this VLAN, and is the syntax right? When the file is generated, the translation is mechanical and tested once and for all in the generator. The reviewer only looks at the intent, and the diff is readable because it reflects a change in the model, not a manual edit that may have touched three lines too many.
The repository, for its part, keeps all its properties. The history is complete, every deployment corresponds to a commit, rollback means returning to the previous commit and letting the pipeline do its work. What is in production is what is in Git. We have simply stopped asking people to write in it.
One objection remains, and it is more serious than the first.
Two truths, two levels
“You have two sources of truth.” The model on one side, the repository on the other, and the day they diverge, which one do you believe?
The answer lies in the fact that the two do not describe the same thing. The source of truth holds the intent: a site of a certain category, a service of a certain class, the relationships between them. The repository holds the rendering of that intent for a given platform: the exact configuration of a device, in its syntax, with its values expanded, or else YAML files conforming to the data model of a vendor framework (Cisco Nexus as Code or Arista AVD, for example), which will then take care of the final rendering. Each is authoritative for its layer. If you want to know what the network is supposed to deliver, you query the model (InfraHub, NetBox, Nautobot). If you want to know what was pushed to a device on a given date, you query Git.
What keeps the coexistence healthy is that the passage from one to the other has only one path, generation, and that it only goes one way. Nobody edits a generated file by hand: the edit would be overwritten at the next generation, and that is intended. The two layers only diverge if someone bypasses the flow, and in that case the Git history shows precisely the commit that did not go through the generator.
It is the same split as between a compiler and a binary. The source code is authoritative for what the program should do, the artefact is authoritative for what runs, and nobody worries about having “two truths” as long as the artefact always comes out of the same code through the same chain.
This is where the InfraHub exception mentioned earlier takes on its full meaning. By bringing branches, diffs and an immutable history to the intent layer, it gives the model the properties that were until now reserved for the repository: a change to the design is proposed in a branch, reviewed as a diff of objects, merged, and the generation of the files is no more than its consequence. The split into two layers does not disappear, but the upper layer stops being the only place in the flow without versioning, and the objection loses its last argument.
It does, however, open another question, a more unsettling one for the dogma.
Do you really need Git to do GitOps?
So, GitOps without Git? At the mere thought, our Bob would start hyperventilating. And yet, read the second principle one last time: the desired state must be stored in a versioned and immutable way, with a complete history. It does not say “in Git”. Git is the most widespread implementation of this principle, the one that gave the method its name, but the principle is more general than the tool. And if, in the end, another tool carries these same principles, then we remain within the same philosophy; only the name of the tool changes.
As soon as a source of truth itself offers branches, diffs, an immutable history and a mechanism for proposing and reviewing changes, it meets this second principle without the help of a repository. One can then imagine the flow without Git: intent is modified in a branch of the model, the proposed change is reviewed and tested, its merge triggers the generation of the configurations and their deployment, and the model’s history is authoritative for what was pushed and when. InfraHub is in fact heading in that direction by keeping the generated artefacts, versioned per branch, alongside the data that produced them. The four principles are met.
Should Git be removed, then? In practice, rarely. All the review, CI and deployment tooling is built around repositories, reviewers have their habits, CI/CD platforms trigger on a merge. Keeping Git as the delivery interface remains the pragmatic choice, and it is the one made in the chain described at the beginning. But it should be kept for what it is: a convenient implementation of the second principle, not a condition for the method’s existence. Once you are there, the debate about what is or is not GitOps has changed in nature.
What to take away
GitOps defines what happens from a versioned state onwards: declarative, immutable, deployed by an automated chain, ideally continuously reconciled. It does not define how intent gets into that state, it has never required a human to type it into a file, and on close inspection, it does not even require Git.
For a network, that freedom is no small detail. The scale of the data and the profile of the teams make manual editing a dead end, and an automation that people work around is useless. Placing a source of truth upstream of Git, with its interface, its validation at entry time and its ability to derive the detail from an intent, is what allows the GitOps flow to be used, and not merely to exist.
If you insist on debating what is or is not GitOps, the right ground is that of its four founding principles, not that of a sacred dogma around a tool, Git. That is my reading, at any rate, and if yours differs, I would be glad to discuss it.
Recommended reading. The CNCF OpenGitOps principles, for the reference definition. The documentation of Nautobot Design Builder and InfraHub, for two approaches to deriving low-level objects from a design.