apiVersion: apps/v1
kind: Deployment
metadata:
  name: gpu-operator
  labels:
    app.kubernetes.io/component: "gpu-operator"
spec:
  replicas: 1
  selector:
    matchLabels:
      name: gpu-operator
      app.kubernetes.io/component: "gpu-operator"
  template:
    metadata:
      labels:
        name: gpu-operator
        app.kubernetes.io/component: "gpu-operator"
    spec:
      serviceAccountName: gpu-operator
      containers:
      - name: gpu-operator
        image: nvcr.io/nvidia/gpu-operator:1.3.0-rc.1
        imagePullPolicy: Always
        command: ["gpu-operator"]
        env:
        - name: WATCH_NAMESPACE
          value: ""
        - name: OPERATOR_NAME
          value: "gpu-operator"
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
          - name: host-os-release
            mountPath: "/host-etc/os-release"
            readOnly: true
        readinessProbe:
          exec:
            command: ["stat", "/tmp/operator-sdk-ready"]
          initialDelaySeconds: 4
          periodSeconds: 10
          failureThreshold: 1
        ports:
        - containerPort: 60000
          name: metrics
      volumes:
        - name: host-os-release
          hostPath:
            path: "/etc/os-release"
