On Thursday, 15 September 2016 08:51:47 UTC-4, Brandon Philips wrote:
>
> Instead of bundling the app with the images you could use a gitRepo volume 
> and have the directory directly populated: 
> http://kubernetes.io/docs/user-guide/volumes/#gitrepo
>

When does the gitRepo volume clone the Git repository?  In the case where 
cluster nodes have no access to the Internet or any other host outside the 
cluster (or the cluster shouldn't make any external connections), is it 
possible to clone the Git repository before the volume is created or 
mounted? 


I would create a container that polls or listens to git webhooks and 
> updates the gitRepo volume. Then it would roll the application deployment 
> once the volume was updated.
>
> There isn't an off the shelf chunk of code that will do this for you 
> unfortunately. You would need to string it together with some poll/webhook 
> code and the Kubernetes client or API.
>

How does a container update the gitRepo volume?  Is the volume a standard 
Git repository and workspace?


Another, potentially easier, way to tackle this would be to create a 
> container and schedule it in the same pod in your app. The container would 
> simply have a git client inside of it and execute a bash script that does a 
> pull on some interval:
>
> `while true; do git clone https://git.repo/photos.git photos; git pull 
> https://git.repo/photos.git staging; sleep 10; done`
>

How would this differ from a gitRepo volume?

Derek

>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to