apiVersion: v1
kind: Pod
metadata:
  name: grav-gitsync-test
  namespace: grav
spec:
  containers:
  - image: docker.pkg.github.com/y-kimura-opst/grav-sample-docker/grav:main
    command:
    - php
    - -S
    - 0.0.0.0:8080
    - system/router.php
    imagePullPolicy: Always
    name: sync
    volumeMounts:
    - mountPath: /sync/user
      name: grav-sync
  imagePullSecrets:
  - name: github-registry
  initContainers:
  - command:
    - sh
    - -c
    - chown -R 101:82 /sync/user
    image: busybox
    imagePullPolicy: Always
    name: chown
    volumeMounts:
    - mountPath: /sync/user
      name: grav-sync
  volumes:
  - name: grav-sync
    persistentVolumeClaim:
      claimName: grav-sync
