A sidecar app which clones a git repo and keeps it in sync with the upstream.
Go to file
Malepati Bala Siva Sai Akhil 1b17b9c23f Update Code of Conduct
Made the last sentence uniform wrt other sentences
2017-08-15 18:42:12 +05:30
Godeps Clean up logging using glogr 2016-09-16 08:35:27 -07:00
build Use the go-build-template 2016-10-30 17:09:06 -07:00
cmd/git-sync Add feature flag to enable ssh host key verification. 2017-04-25 00:34:01 +02:00
demo update pod config 2017-03-05 20:41:25 -08:00
docs Add feature flag to enable ssh host key verification. 2017-04-25 00:34:01 +02:00
pkg/version Use the go-build-template 2016-10-30 17:09:06 -07:00
vendor/github.com Clean up logging using glogr 2016-09-16 08:35:27 -07:00
.gitignore Use the go-build-template 2016-10-30 17:09:06 -07:00
CONTRIBUTING.md Create CONTRIBUTING.md 2016-08-22 16:18:11 -07:00
Dockerfile.in clean up Dockerfile, remove ssh-wrapper.sh and set env var 2017-01-26 19:04:24 +01:00
LICENSE Initial commit 2016-08-20 14:09:57 -07:00
Makefile Makefile: Fix bashism when building on Ubuntu + dash 2016-11-13 09:05:10 -05:00
OWNERS Update OWNERS to latest state 2017-03-22 03:52:17 +00:00
README.md Fix typo 2017-02-06 20:30:35 +00:00
RELEASING.md Add a RELEASING doc 2017-05-30 06:51:55 +00:00
code-of-conduct.md Update Code of Conduct 2017-08-15 18:42:12 +05:30
test_e2e.sh bump e2e timeouts 2017-01-26 22:21:54 -08:00

README.md

git-sync

git-sync is a simple command that pulls a git repository into a local directory. It is a perfect "sidecar" container in Kubernetes - it can periodically pull files down from a repository so that an application can consume them.

git-sync can pull one time, or on a regular interval. It can pull from the HEAD of a branch, or from a git tag, or from a specific git hash. It will only re-pull if the target of the run has changed in the upstream repository. When it re-pulls, it updates the destination directory atomically. In order to do this, it uses a git worktree in a subdirectory of the --root and flips a symlink.

Usage

# build the container
make container REGISTRY=registry TAG=tag

# run the container
docker run -d \
    -v /tmp/git-data:/git \
    registry/git-sync:tag \
        --repo=https://github.com/kubernetes/git-sync
        --branch=master
        --wait=30

# run an nginx container to serve the content
docker run -d \
    -p 8080:80 \
    -v /tmp/git-data:/usr/share/nginx/html \
    nginx

Analytics