liveBook · Manning

GitOps

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

GitOps is an operational practice that manages infrastructure and application changes through version-controlled declarative definitions and automated reconciliation or deployment.

GitOps manages infrastructure changes through declarative infrastructure as code, version control, and continuous deployment. A controller detects drift between the desired configuration and actual state, then reconciles the difference and runs tests. section 7.4

A practical GitOps change typically follows this path:

  • Branch or update the declarative configuration. section 7.4
  • Commit the change, open a pull request, and run automated checks. section 7.4 section 7.5
  • Review and merge the change so continuous deployment applies it and reduces drift. section 7.4

Collaborative infrastructure change

A team proposes an infrastructure update on a feature branch, tests it, adds reviewers, and merges it after approval. Commit and pull-request history records who requested and made the change. section 7.4

Figure 7.20 An implementation of GitOps can use feature-based development to open a pull request, test changes on a branch, add reviewers, and merge the changes.

Shows a feature-based GitOps workflow from branch creation through testing, review, and merge. section 7.4

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Explains declarative configuration, drift detection, reconciliation, testing, and collaboration, without detailing controller internals.
Examples
Uses feature branches, pull requests, reviewers, automated tests, and Kubernetes controllers reconciling declarative configuration.
What it assumes
Builds on infrastructure as code, declarative configuration, testing, version control, and continuous delivery practices.
What you can do after
Apply it via version-controlled infrastructure commits, automated tests, and continuous reconciliation or deployment.
How it connects
Connects infrastructure as code, version control, continuous deployment, drift detection, Kubernetes, and event-driven infrastructure as code.

Also explained in

Compare how 6 books explain GitOps →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.