apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app: hostpath-provisioner
  name: hostpath-provisioner
  namespace: kube-system
spec:
  selector: 
    matchLabels: 
      name: hostpath-provisioner
  template:
    metadata:
      name: hostpath-provisioner
      labels:
        name: hostpath-provisioner
    spec:
      nodeSelector:
        nailgun.name/hostpath: enabled
      serviceAccount: hostpath-provisioner
      containers:
      - name: hostpath-provisioner
        image: nailgun/k8s-hostpath-provisioner:latest
        args: ['-root', '/host']
        env:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        volumeMounts:
        - name: host-root
          mountPath: /host
      volumes:
      - name: host-root
        hostPath:
          path: /
