Understanding key concepts of GitOps
There are many ways of implementing GitOps, and we’ll look at several in this chapter, but at its core, GitOps is about applying the software development life cycle to both application source code and infrastructure configuration—or infrastructure as code (IaC). The Git repository becomes the source of truth for what is in production, what was in production, and what will be in production soon. In order to do so, the Git repository will have to include configuration files, application code, infrastructure definitions, and deployment manifests—everything needed to reproduce a fully working version of the application.
Declarative representations are preferred over compiled artifacts, but when source code is compiled into artifacts, they need to be versioned and tied back to a commit within the Git repository itself. Tools such as Terraform, Docker, and Kubernetes interpret these declarative files and automatically apply changes...