apiVersion: v1
kind: Pod
metadata:
  name: test-pd
spec:
  containers:
  - image: alpine
    name: test-container
    command: ['sh', '-c', 'if [! -f /mnt/a.txt]; then exit; else sleep 999999; fi;]']
    volumeMounts:
    - mountPath: /mnt
      name: cache-volume
  initContainers:
  - name: install
    image: busybox
    command: ['sh', '-c', 'FILE=/mnt/a.txt && echo > $FILE']
    volumeMounts:
    - name: cache-volume
      mountPath: '/mnt'
  volumes:
  - name: cache-volume
    emptyDir: {}


