apiVersion: v1
kind: Pod
metadata:
  name: web-app
spec:
  containers:
  - name: web-app-ctr
    image: httpd:2.4.47
    ports:
    - containerPort: 80
    volumeMounts:
    - mountPath: /usr/local/apache2/htdocs
      name: git ## the same volume
  - name: sync-ctr
    image: k8smaestro/git:2.11.1
    volumeMounts:
    - mountPath: /var/lib/data
      name: git ## the same volume
    env:
    - name: GIT_REPO
      value: https://github.com/dnaprawa/beginner-html-site-scripted
    command:
    - "sh"
    - "-c"
    - "git clone $(GIT_REPO) . && watch -n 600 git pull" # every 10 minutes do `git pull`
    workingDir: /var/lib/data
  volumes:
  - emptyDir: {}
    name: git