apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app: node-feature-discovery
  name: node-feature-discovery
  namespace: openshift-cluster-nfd-operator
spec:
  selector:
    matchLabels:
      app: node-feature-discovery
  template:
    metadata:
      labels:
        app: node-feature-discovery
    spec:
      hostNetwork: true
      serviceAccount: node-feature-discovery
      containers:
        - env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          image: quay.io/openshift/origin-node-feature-discovery:4.6
          name: node-feature-discovery
          command: ["/usr/bin/node-feature-discovery"]
          args:
            - "--sleep-interval=60s"
          volumeMounts:
            - name: host-boot
              mountPath: "/host-boot"
            - name: host-sys
              mountPath: "/host-sys"
            - name: host-usr-lib
              mountPath: "/host-usr/lib"
            - name: host-usr-src
              mountPath: "/host-usr/src"
            - name: host-os-release
              mountPath: "/host-etc/os-release"
            - name: nfd-hooks
              mountPath: "/etc/kubernetes/node-feature-discovery/source.d/"
          securityContext:
            privileged: true
      volumes:
        - name: nfd-hooks
          hostPath:
            path: "/opt/lib/node-feature-discovery/source.d"
        - name: host-sys
          hostPath:
            path: "/sys"
        - name: host-os-release
          hostPath:
            path: "/etc/os-release"
        - name: host-boot
          hostPath:
            path: "/boot"
        - name: host-usr-lib
          hostPath:
            path: "/usr/lib"
        - name: host-usr-src
          hostPath:
            path: "/usr/src"
