Recently I’ve been looking into alternatives to the git flow branching model and since I’m already using GitLab, I stumbled upon their own branching model called GitLab flow. I’m currently trying to get my head around how to implement this properly for microservices. We will assume, that I am deploying all services to the same kubernetes cluster, each deployment should reside in its own namespace.

If I understand this model correctly, one should continuously deploy the master branch to a staging environment and deploy tagged commits occasionally to the production environment. While this works properly if there are only two environments, I’d also like to make use of the dynamic environments available in GitLab, i.e. for each branch off of master, I want to be able to create a review deployment.

Now if I have e.g. multiple microservices which make up a single application, what’s the best way to deploy all microservices to a separate kubernetes namespace for each branch, when pushing the repository of a single microservice using GitLab CI. I can’t think of a clean solution as soon as there are dynamic environments involved.

How am I supposed to handle the above use case properly for microservices? Are there branching models / git workflows which work better for microservices?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.