GitOps changed how organizations manage infrastructure and application delivery. It gives teams a framework for consistency, automation and reliability. But GitOps only works when teams adopt its principles correctly and build a practical system around them.
In this post, we look at what GitOps is, walk through the OpenGitOps standards, and share practical advice to help teams avoid the mistakes that make GitOps fail.
How GitOps Became Popular: Parallels with Code Management
Imagine managing all your infrastructure and applications the way developers manage code: one reliable system that tracks every change, lets you roll back when needed and keeps everything in sync. That is the promise of GitOps.
GitOps takes the principles of Git-based code management and applies them to infrastructure and software delivery. You declare the desired state of your systems in Git, and automation makes the real system match it. Developers liked Git because it versions, audits and rolls back changes easily. GitOps gives infrastructure the same benefits.
At its core, GitOps makes four promises:
- One source of truth. All infrastructure and application configuration lives in Git, like your code.
- Version control for infrastructure. Every change is logged, so you can see who did what and when.
- Reconciliation. When something drifts, it is brought back to the desired state.
- A rollback safety net. When things go wrong, you can return to a known good state.
The familiarity of Git, together with simple automation, made GitOps popular with teams that wanted faster delivery.
GitOps also has challenges. Many organizations adopt GitOps without fully understanding how to adapt its practices to their setup. As GitOps grew, so did the need for well-designed systems that make it work in large, complex environments. Adopting GitOps is the easy part. Doing it well is the work.
Common Mistakes in GitOps Implementation
Modern cloud environments are complex. Think of the kinds of artifacts and concerns in a typical application ecosystem: services, cloud resources, virtual machines, PaaS components, monitoring, alerting, database schemas, routing rules, secrets and variables. In theory, GitOps can and should cover all of them. In practice, many organizations cover only some, and their GitOps is fragmented or incomplete.
- Misunderstood principles. GitOps covers more than deployment automation. It is a system for managing critical changes with strong guarantees, and teams often start without the principles to build one.
- Disjointed systems. Infrastructure, application configuration and delivery pipelines live in silos, so it is hard to see how a change in one affects the others.
- Inconsistent states. With no single source of truth across concerns, environments become inconsistent. This leads to configuration drift, unpredictable behavior and manual firefighting.
- Manual wiring. Teams spend a lot of time wiring GitOps components together by hand, which adds risk.
- Limited visibility. Many changes flow through GitOps, and without one central view, debugging and incident recovery take longer.
For example, a team might manage application code with GitOps, infrastructure with IaC tools and configuration by hand. This fragmented approach adds complexity and loses most of the benefits of GitOps.
Advice for Building Your Own GitOps Systems
1. Adopt the right standards: OpenGitOps
The OpenGitOps project, from the GitOps Working Group, sets out a clear set of principles for adopting and scaling GitOps.
- Declarative. A system's desired state is expressed declaratively.
- Versioned and immutable. The desired state is stored in a way that enforces immutability and versioning, with a complete history.
- Pulled automatically. Software agents pull the desired state from the source automatically.
- Continuously reconciled. Software agents observe the actual state and work to apply the desired state.
These principles describe what GitOps should look like. In practice, GitOps is a way of working, and organizations must build the right system around the principles. That means answering hard operational questions: what to store in Git, how to manage complex configuration, and how to reconcile environments safely.
2. Implement it the right way: avoid common errors
a. Introduce abstractions that translate into implementations
A GitOps system at scale needs abstractions that make complex systems simple to describe for developers and operators. Shared abstractions make the system easier to use and to work on together. They should:
- Describe what is needed (the desired state), not how to do it.
- Let platform engineering teams create higher-level building blocks, such as "service" or "database", that turn into real implementations like Kubernetes manifests, Terraform modules or configuration files.
- Spare developers the details, and still give power users full flexibility.
b. Use declarative definitions for all concerns
To stay consistent and easy to roll back, your GitOps system should declare every operational concern:
- Infrastructure as Code (IaC). Define infrastructure, such as servers, storage and databases, declaratively.
- Kubernetes manifests. Manage containerized workloads with YAML files that define Deployments, Services and other Kubernetes objects.
- Everything else. CI/CD, configuration management, IAM, image wiring and any other concern that completes the definition of an environment.
c. Wire things together declaratively
A GitOps system needs a declarative way to connect its parts. When resources are connected in the model, a change reaches everything that depends on it.
For example:
- A database connection string from Terraform is wired into a Kubernetes ConfigMap for an application.
- An IAM role created for a service is referenced in that service's deployment.
- Outputs from IaC tools become environment variables in runtime configuration.
d. Combine one model with flexible execution
A well-designed GitOps system turns its declarations into several kinds of execution:
- IaC execution. Provisioning infrastructure such as VMs, databases and networks.
- Kubernetes manifests. Generating YAML for containerized workloads and applying it to clusters.
- Everything else. Image wiring, CI/CD and tool configuration, through the tools you prefer.
e. Focus on extensibility
Your GitOps system should support extensions, so it keeps up with your needs. Teams should be able to:
- Add new resource types or configuration easily.
- Add or replace external systems, such as cloud providers, CI/CD pipelines or monitoring tools, without touching every layer.
- Customize workflows and still follow the GitOps principles.
How Facets Helps Organizations Achieve GitOps
Facets builds the OpenGitOps principles into the platform. Teams with many projects do not have to work out the details themselves, and they get a ready framework for GitOps at scale.
Applying the OpenGitOps principles
1. Declarative blueprints
"A system managed by GitOps must have its desired state expressed declaratively."
At the heart of Facets is the blueprint, a declarative model of your whole system. A blueprint defines:
- Resources such as services, databases and caches.
- The relationships and dependencies between them.
- Anything else that should be managed centrally, such as a database schema, dashboards and alerts.
The blueprint is stored as JSON files, one per resource, so it is the single source of truth for infrastructure, code and configuration. The declaration pillar explains the idea behind it.
2. Versioned and immutable history
"Desired state is stored in a way that enforces immutability, versioning and retains a complete version history."
Every blueprint lives in a Git repository, and every change is a Git commit. This gives you:
- Version control. Every change is tracked, so you can trace it and roll it back.
- Immutability. A committed state does not change. A new state is a new commit.
You can keep the blueprint in a private repository in your own Git account, and per-environment overrides can also be kept in Git with GitOps for Overrides (your setup in your Git).
3. Pulled automatically
"Software agents automatically pull the desired state declarations from the source."
When a pull request is merged on your Git provider, a webhook-triggered sync brings the change into the blueprint. Overrides can sync both ways when GitOps for Overrides is on. Then a release, scheduled or on demand, applies the change to an environment. In each release, the Facets orchestrator:
- Reads the blueprint for the environment.
- Applies that environment's overrides.
- Generates the Terraform and applies it to add or change resources.
- Configures downstream tools, such as monitoring and alerting, as the blueprint declares.
4. Reconciliation through releases
"Software agents continuously observe the actual system state and attempt to apply the desired state."
In Facets, only the orchestrator changes an environment, and it does so through a release. A release with Refresh finds changes made outside Facets, and applying it brings the environment back to the blueprint, with the same contracts, policies and approvals. Teams can run a release for one resource or a whole environment:
- Scheduled releases. Each environment can run releases on a schedule, from every few minutes to weekly.
- On-demand releases. Teams can start a release for specific resources or a whole environment.
Why Facets reconciles through releases
Many GitOps controllers apply every commit as soon as they see it. That works while only people commit. AI assistants and infrastructure agents now commit too, and a controller that applies every commit gives an agent's commit a direct path to production. In Facets, every change runs through the same steps first: the module contracts check it, the Terraform plan shows what will change, guardrail policies check the release and approval rules hold it for a person where you need one. A merged commit changes the desired state, and the release decides what reaches your cloud. Read verify and release for the full argument.
Beyond OpenGitOps: Facets' Enhancements for Complex Setups
The OpenGitOps principles are a solid foundation, but GitOps in a large organization with a complex setup is still hard. It means adapting the principles to many situations, supporting different workflows and building systems that teams actually adopt. Facets adds these to help GitOps scale:
- A lower barrier to entry. Facets provides ready-made modules with contracts, so teams start from good practice on day one.
- Insight into releases. Each environment's release history lists every release with its type, status, plan and logs, so teams can see what changed and resolve problems.
- Controlled changes. Approval rules hold a release until a person with approval authority approves it. Deleting, disabling or editing the protected fields of a critical resource needs a separate permission.
- Extensibility. Teams can define their own resource types and add them to blueprints, which takes GitOps beyond the usual practice. For example, Facets supports GitOps-driven database management and the rollout of standard dashboards.
- UI workflows for every role. The web UI lets people who are not experts see how declarations map to what runs. Developers, operations teams and architects get views that fit their work, and role-based access control keeps each view focused.
Conclusion
As software systems grow more complex, modeling them well in GitOps gets harder. We see many organizations use GitOps as a catch-all term, without a clear grasp of its principles. A poor implementation causes four problems:
- Configuration drift and inconsistencies. Without one approach, environments become unpredictable, and drift is costly to fix.
- Human error. Manual and ad hoc changes bypass the GitOps workflow and can cause downtime, outages or security issues.
- Slow recovery. Without clear versions and rollbacks, recovering from an incident takes longer and costs more.
- Deployment bottlenecks. Slow, risky deployments reduce team speed and create a fear of releasing.
The cost of GitOps done badly goes beyond operations: it affects business agility, team morale and customer trust.
To see how drift is found and fixed through releases, read what infrastructure drift is and how to handle it. Read Why Facets for the model behind this, or book a demo.
