Branching strategies and the GitOps workflow
GitOps requires at least two kinds of Git repositories to function: the application repository, which is from where your builds are triggered, and the environment repository, which contains all of the infrastructure and configuration as code (CaC). All deployments are driven from the environment repository, and the changes to the code repository drive the deployments. GitOps follows two primary kinds of deployment models: the push model and the pull model. Let’s discuss each of them.
The push model
The push model pushes any changes that occur within your Git repository to the environment. The following diagram explains this process in detail:
Figure 2.10 – The push model
The push model is inherently unaware of the existing configuration and reacts only to changes made to your Git repositories. Therefore, you will need to set up some form of monitoring to understand whether there are any deviations...