hasura / gitkube

Build and deploy docker images to Kubernetes using git push
Apache License 2.0
3.81k stars 208 forks source link

Track latest build tag and patch when image changes for deployments #73

Open shahidhk opened 6 years ago

shahidhk commented 6 years ago

As mentioned in #71, sometimes a user might need to update the deployment (say kubectl apply) and when it happens, the image name is overwritten.

The controller needs to keep track of latest build tags for deployments in each remote.

When any of these deployments' image field gets updated, controller can patch it to the latest build tag.

So, whenever a new build happends, a relevent key should be updated in Remote.Status. Then controller can watch all the tracked deployments and patch when required.

majodev commented 6 years ago

Hi, I also think automatically tagging with latest or another label (e.g. the name of the branch that was pushed) would be the most convenient workaround for these cases.