apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: hostpath-multihost-manager
  labels:
    k8s-app: hostpath-multihost-manager
  namespace: kube-system

spec:
  selector:
    matchLabels:
      k8s-app: hostpath-multihost-manager

  template:
    metadata:
      labels:
        k8s-app: hostpath-multihost-manager

    spec:
      containers:
      - name: hostpath-multihost-manager
        image: kubeboost/hostpath-multihost-manager:v1.0.0

        # The volumes are always created under /var/kubernetes directory in
        # the manager pods. So this path shall not be changed.
        volumeMounts:
        - name: pv-volume
          mountPath: /var/kubernetes

        # The manager waits for requests to create or delete a directory at
        # port 8080.
        ports:
        - name: http
          containerPort: 8080
          protocol: TCP

      # Path in the host where to write the hostpath volumes.
      # THIS PATH CAN BE CHANGED.
      volumes:
      - name: pv-volume
        hostPath:
          path: /var/kubernetes
