apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app: nvidia-node-status-exporter
  name: nvidia-node-status-exporter
  namespace: "FILLED BY THE OPERATOR"
  annotations:
    openshift.io/scc: nvidia-node-status-exporter
spec:
  selector:
    matchLabels:
      app: nvidia-node-status-exporter
  template:
    metadata:
      labels:
        app: nvidia-node-status-exporter
    spec:
      nodeSelector:
        nvidia.com/gpu.deploy.node-status-exporter: "true"
      serviceAccount: nvidia-node-status-exporter
      containers:
      - image: "FILLED BY THE OPERATOR"
        imagePullPolicy: Always
        name: nvidia-node-status-exporter
        command: [nvidia-validator]
        env:
        - name: COMPONENT
          value: metrics
        - name: METRICS_PORT
          value: "8000"
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        ports:
        - name: node-status
          containerPort: 8000
        securityContext:
          privileged: true
        volumeMounts:
          - name: run-nvidia
            mountPath: "/run/nvidia"
            mountPropagation: HostToContainer
      volumes:
      - name: run-nvidia
        hostPath:
          path: /run/nvidia
          type: Directory
