---
kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: sriov-network-config-daemon
  namespace: {{.Namespace}}
  annotations:
    release.openshift.io/version: "{{.ReleaseVersion}}"
spec:
  selector:
    matchLabels:
      app: sriov-network-config-daemon
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: sriov-network-config-daemon
        component: network
        type: infra
        openshift.io/component: network
    spec:
      hostNetwork: true
      hostPID: true
      nodeSelector:
        beta.kubernetes.io/os: linux
        node-role.kubernetes.io/worker:
      tolerations:
      - operator: Exists
      serviceAccountName: sriov-network-config-daemon
      containers:
      - name: sriov-network-config-daemon
        image: {{.Image}}
        command:
          - sriov-network-config-daemon
        imagePullPolicy: IfNotPresent
        securityContext:
          privileged: true
        args:
          - "--v=3"
          - "start"
        env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
        volumeMounts:
        - name: host
          mountPath: /host
        # - name: hostetc
        #   mountPath: /host/etc
        # - name: hostdev
        #   mountPath: /host/dev
        # - name: hostproc
        #   mountPath: /host/proc
        # - name: hostboot
        #   mountPath: /host/boot
        # - name: hostusrlib
        #   mountPath: /host/lib
        # - name: hostusrlib64
        #   mountPath: /host/lib64
        # - name: hostusr
        #   mountPath: /host/usr
        # - name: hostusrbin
        #   mountPath: /host/bin
        # - name: hostusrsbin
        #   mountPath: /host/sbin
        # - name: hostsysmodule
        #   mountPath: /host/sys/module
      volumes:
      - name: host
        hostPath:
          path: /
      # - name: hostetc
      #   hostPath:
      #     path: /etc
      # - name: hostdev
      #   hostPath:
      #     path: /dev
      # - name: hostproc
      #   hostPath:
      #     path: /proc
      # - name: hostboot
      #   hostPath:
      #     path: /boot
      # - name: hostusr
      #   hostPath:
      #     path: /usr
      # - name: hostusrbin
      #   hostPath:
      #     path: /usr/bin
      # - name: hostusrlib
      #   hostPath:
      #     path: /usr/lib
      # - name: hostusrlib64
      #   hostPath:
      #     path: /usr/lib64
      # - name: hostusrsbin
      #   hostPath:
      #     path: /usr/sbin
      # - name: hostsysmodule
      #   hostPath:
      #     path: /sys/module
