apiVersion: v1
kind: Pod
metadata:
  name: k8s-client-python-dash-pod 
  labels:
    k8-app: k8s-client-python-dash-pod
spec:
  volumes:
  - name: html
    persistentVolumeClaim:
       claimName: html-claim
  - name: admin-volume
    hostPath:
       path: /users/admin
#    emptyDir: {}
  containers:
  - name: k8s-client-python-dashborad
    image: k8s-client-python
    imagePullPolicy: "IfNotPresent"
    volumeMounts:
    - name: html
      mountPath: /html
    - name: admin-volume
      mountPath: /admin-volume
    command: ["/bin/sh", "-c"]
    args:
      - ./script/entry.sh;
        while true; do
          date >> /html/index.html;
          python ./app/pod_info.py >> /html/index.html;
          sleep 22;
        done
  restartPolicy: OnFailure
