apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: ti-setup-cleaner
spec:
  selector:
    matchLabels:
      name: ti-setup-cleaner
  template:
    metadata:
      labels:
        name: ti-setup-cleaner
    spec:
      # imagePullSecrets:
      # - name: regcred
      containers:
        - name: hyperkube
          image: gcr.io/google_containers/hyperkube:v1.14.3
          imagePullPolicy: Always
          command: [ "/bin/bash", "-c", "--" ]
          args: [ "rm -rf /host/ti; sleep 999" ]
          volumeMounts:
          - mountPath: /host/ti
            name: ti-volume
      volumes:
      - name: ti-volume
        hostPath:
          # directory location on host
           path: /ti
           # this field is optional
           type: DirectoryOrCreate
