Continuous deployment with Flux CD
In the CI section, we created an application repository for building and testing the core application. In the case of CD, we would need to create an environment repository as that is what we will use for doing all deployments. We already have a repository that we created in Chapter 13, Understanding DevOps with GitOps, where we created a GKE instance on GCP using the GitOps push deployment model. We will reuse that and add configuration for deploying the Flask application using the GitOps pull deployment model.
We will have two branches within the environment repository – dev and prod. All configuration in the dev branch would apply to the development environment, and that on prod will apply to the production environment. The following diagram illustrates the approach in detail:
The existing repository has a single branch called master
. However, since we will be managing multiple...