---
apiVersion: apps/v1
kind: DaemonSet
spec:
  selector:
    matchLabels:
      app: dispatch
  template:
    metadata:
      labels:
        app: dispatch
    spec:
      containers:
        - name: dispatcher
          image: docker.io/sbezverk/dispatch:0.0.0
          imagePullPolicy: Always
          args:
            - --register
            - "true"
          volumeMounts:
            - name: kubelet-socket
              mountPath: /var/lib/kubelet/device-plugins
            - name: socket
              mountPath: /var/lib/dispatch
      volumes:
        - hostPath:
            path: /var/lib/kubelet/device-plugins
            type: DirectoryOrCreate
          name: kubelet-socket
        - hostPath:
            path: /var/lib/dispatch
            type: DirectoryOrCreate
          name: socket
metadata:
  name: dispatch
  namespace: default
