apiVersion: v1
kind: Pod
metadata:
  name: issue3
spec:
  containers:
  - name: app
    image: busybox
    command: ['while true; do echo "$(date) | $(du -sh ~)" >> /var/logs/diskspace.txt; sleep 5; done;']
    volumeMounts:
    - name: app1
      mountPath: /var/logs
  - name: transformer
    image: busybox
    command: ['sleep 20; while true; do while read LINE; do echo "$LINE" | cut -f2 -d"|" >> $(date +%Y-%m-%d-%H-%M-%S)-transformed.txt; done < /var/logs/diskspace.txt; sleep 20; done;']
  volumes:
  - name: app1
    emptyDir: {} 
