Spinnaker delivery pipeline

10/18/2018

I have some issues about a spinnaker deploy strategy.

I have a microservices app to deploy in Kubernetes and I started to use Spinnaker to manage the deploy workflow. I use Google Kubernetes Engine and Google Container Registry + Google Cloud Build to manage the image builds. The repository is hosted on Github and I have to build a new Docker image once there are some changes on the repository. In Spinnaker I deploy the application using manifest (v2).

So on one side I have the yaml manifest file used for deploy and on the other side there is the docker image hosted on Google.

I followed this tutorial to build my delivery pipeline. I run tests and build the image in Google Cloud Build, then Spinnaker detects a new docker image in the registry and it starts to deploy using a manifest stored directly in Spinnaker. This works fine for me.

But what if I would like to version the manifest file and put it into the git repository? To do so I have to add a Github artifact on Spinnaker, used into the deploy stage as text source. But it runs only if some changes are found in the manifest file. So to avoid this I have to set a default file path in the artifact (specifying the git branch to look for). In this way I must work always with the same branch and I can't deploy in a dev environment using different branches with different names. Also, I'd have to set up two Github artifacts, one for dev and one for prod. I think this is not a good solution.

I would like to know how do you manage a case like this. Probably I made a mistake in the delivery workflow and I must set manifest statically in Spinnaker. Otherwise I don't know how to get the right copy of the manifest file.

Thank you.

-- pnotarangelo
git
github
google-cloud-build
kubernetes
spinnaker

0 Answers