In this series of posts, I introduce multiple concepts of DevOps in simple and clear ways. The first one is GitOps?
GitOps is a pattern of operation of applications allowing to automate the continuous delivery. It is based on declarative infrastructure code files (Infra-as-Code) stored in Git. The concept has been invented by Weaveworks in august 2017.
GitOps can be used for:
- synchronizing Kubernetes cluster configuration with the desired state in the git repository configuration files (Namespaces, ConfigMaps, Secrets, Ingress, …),
- deployment of applications to Kubernetes (Deployments, Pods, Services, Helm Charts).
These files play the role of source of truth.
The principles of GitOps are:
- Declarative configuration of the system state,
- Version controlled of the desired system state,
- Immutable storage : git is the source of truth,
- Automated delivery by autonomous agents,
- Autonomous agents (“operators”) enforce the desired state and alert on drift,
- Closed loop by approval of automated changes.
The code in Git describes the state of the system (YAML files, Helm charts files, …).
Let’s introduce two tools for GitOps :