kubernetes and gitflow

git workflow Today

master branch:

- deployed to preview and production

- active development

- feature branches branch off from master

- all merges happen into master

kubernetes convention

production: deployed to production (via Jenkins pipeline)

 

master: deployed to preview (via Jenkins pipeline)

gitflow

production branch -- mirrors production

 

master branch -- active development

production changes

downward merges from production:

 

- production: changes are merged in

 

- master: regular merges from production

 

- all feature branches: regular merges from master

feature branch

feature branch: starts from master

 

WIP: regular downward merges from master

 

finished: merged up into master, PR in GitHub

release into production

- master is merged up into production *

   Q- use PRs from master into production?

   Q- does  GitHub support this?

 

- production is deployed

- downward merges happen (master, feature branches)

release branches ?

- release branch branches off master

- release branch merged into production: PR in GitHub

- downward merges happen (master, feature branches)

 

pros: master can still get merges ("development does not affects release" and viceversa)

           bugfixes can be made into release branch

           more control on deployments

 

con: a bit more complex flow

hotfixes branches

- hotfix branch branches off production

- hotfix branch merged into production: PR in GH

- downward merges from production (master, feature branches)

gitflow 101

production

master

features

releases (?)

hotfix

PR

PR

PR

branch-off

branch-off

+

merges

branch-off

merges

Kubernetes and gitflow

By Joaquin Rivera Padron

Kubernetes and gitflow

git flow for kubernetes deployments

  • 1,236