apiVersion: v1
kind: Pod
metadata:
  name: while
  labels:
    name: while
spec:
  containers:
  - name: while-echo
    image: bash
    volumeMounts:
    - mountPath: /data/cdrom
      name: demo-volume
    command: ["bash", "-c"]
    args: ["while true; do ls /var/run/secrets/kubernetes.io; echo nono > /data/cdrom/nono; sleep 1; done"]
  - name: while-ls
    image: bash
    volumeMounts:
    - mountPath: /data/cdrom
      name: demo-volume
    command: ["bash", "-c"]
    args: ["while true; do ls /data/cdrom; sleep 1; done"]
  volumes:
  - name: demo-volume
    emptyDir: {}
