apiVersion: v1
kind: Pod
metadata:
  name: gitrepo-volume-sync-pod
spec:
  volumes:
  - name: html
    emptyDir: {}
  containers:
  - image: openweb/git-sync
    name: git-sync-sidecar-container
    env:
    - name: GIT_SYNC_REPO
      value: https://github.com/invalidred/kubia-website-example.git
    - name: GIT_SYNC_DEST
      value: /git
    - name: GIT_SYNC_BRANCH
      value: master
    - name: GIT_SYNC_REV
      value: FETCH_HEAD
    - name: GIT_SYNC_WAIT
      value: "10"
    volumeMounts:
    - name: html
      mountPath: /git
  - image: nginx:alpine
    name: web-server
    volumeMounts:
    - name: html
      mountPath: /usr/share/nginx/html
      readOnly: true
    ports:
    - containerPort: 80
      protocol: TCP
