apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: ti-setup-inspector
spec:
  selector:
    matchLabels:
      name: ti-setup-inspector
  template:
    metadata:
      labels:
        name: ti-setup-inspector
    spec:
      # enable sa to run `kubectl` inside the container
      # serviceAccountName: ti-admin-sa
      # imagePullSecrets:
      # - name: regcred
      containers:
        - name: hyperkube
          image: gcr.io/google_containers/hyperkube:v1.14.3
          imagePullPolicy: IfNotPresent
          command: [ "/bin/bash", "-c", "--" ]
          args: [ "while true; do ls /; sleep 5; done;" ]
          volumeMounts:
          - mountPath: /host/ti
            name: ti-volume
          - mountPath: /etc
            name: machine-id
            readOnly: true
          - mountPath: /keys
            name: ti-secret-volume
            readOnly: true
      volumes:
      - name: ti-volume
        hostPath:
          # directory location on host
           path: /ti
           type: DirectoryOrCreate
      - name: ti-secret-volume
        hostPath:
          # directory location on host
           path: /ti/secrets/keys
           type: DirectoryOrCreate
      - name: machine-id
        hostPath:
          # directory location on host
           path: /etc
           # this field is optional
           type: Directory
