---
kind: Pod
apiVersion: v1
metadata:
  name: example
  namespace: zfs-system
spec:
  containers:
  - name: example
    image: busybox
    command:
      - "/bin/sh"
    args:
      - "-c"
      - "sleep 10; if [ -e /mnt/SUCCESS ]; then echo 'file already exists'; exit 0; else echo 'file does not exist attempting to create it'; whoami && touch /mnt/SUCCESS && exit 0 || exit 1; fi"
    volumeMounts:
      - name: zfs-volume
        mountPath: "/mnt"
  restartPolicy: "Never"
  volumes:
    - name: zfs-volume
      persistentVolumeClaim:
        claimName: example-pvc