apiVersion: apps/v1
kind: Deployment
metadata:
  name: device-query
  namespace: jetson-device-query
spec:
  replicas: 1
  selector:
    matchLabels:
      app: device-query
  template:
    metadata:
      name: device-query
      labels:
        app: device-query
    spec:
      hostname: device-query
      containers:
        - name: device-query
          image: max-one.local:5001/jetson/nano/device-query
          volumeMounts:
            - mountPath: /dev/nvhost-ctrl
              name: nvhost-ctrl
            - mountPath: /dev/nvhost-ctrl-gpu
              name: nvhost-ctrl-gpu
            - mountPath: /dev/nvhost-prof-gpu
              name: nvhost-prof-gpu
            - mountPath: /dev/nvmap
              name: nvmap
            - mountPath: /dev/nvhost-gpu
              name: nvhost-gpu
            - mountPath: /dev/nvhost-as-gpu
              name: nvhost-as-gpu
          securityContext:
            privileged: true
      volumes:
        - name: nvhost-ctrl
          hostPath:
            path: /dev/nvhost-ctrl
        - name: nvhost-ctrl-gpu
          hostPath:
            path: /dev/nvhost-ctrl-gpu
        - name: nvhost-prof-gpu
          hostPath:
            path: /dev/nvhost-prof-gpu
        - name: nvmap
          hostPath:
            path: /dev/nvmap
        - name: nvhost-gpu
          hostPath:
            path: /dev/nvhost-gpu
        - name: nvhost-as-gpu
          hostPath:
            path: /dev/nvhost-as-gpu
      nodeSelector:
        jetson_model: "nano"
