apiVersion: v1
kind: Pod
metadata:
  labels:
    run: time-check
  name: time-check
  namespace: dvl1987
spec:
  volumes:
    - name: log-volume
      emptyDir: {}        
  containers:
  - image: busybox
    name: time-check
    env:
      - name: TIME_FREQ
        valueFrom:
          configMapKeyRef:
            name: time-config
            key: TIME_FREQ
    volumeMounts:
    - name: log-volume
      mountPath: "/opt/time"
    command: [ "/bin/sh", "-c", "while true; do date; sleep $TIME_FREQ;done >> /opt/time/time-check.log" ]
#    command:
#    - "/bin/sh"
#    - "-c"
#    - "while true; do date; sleep $TIME_FREQ;done > /opt/time/time-check.log"

