apiVersion: v1
kind: Pod
metadata:
  name: git-synced-volume-pod
spec:
  containers:
  - image: nginx:alpine
    name: web-server
    volumeMounts:
    - name: html
      mountPath: /usr/share/nginx/html
      readOnly: true
    ports:
    - containerPort: 80
      protocol: TCP
  - image: bborbe/git-sync:1.3.0
    name: git-syncer
    volumeMounts:
    - name: html
      mountPath: /git
    env:
    - name: GIT_SYNC_REPO
      value: https://github.com/user-name-is-taken/kubia-website-example.git
    - name: GIT_SYNC_DEST
      value: /git
    # see this file https://github.com/bborbe/git-sync/blob/master/git-sync.go
    # for available parameters
  volumes:
  - name: html
    gitRepo:
      repository: https://github.com/user-name-is-taken/kubia-website-example.git
      revision: master
      directory: .