---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: gpu-operator
  labels:
    app.kubernetes.io/component: gpu-operator
    app: gpu-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gpu-operator
  strategy: {}
  template:
    metadata:
      labels:
        app: gpu-operator
    spec:
      priorityClassName: system-node-critical
      serviceAccountName: gpu-operator
      containers:
      - name: gpu-operator
        image: nvcr.io/nvidia/gpu-operator:1.7.0
        args:
          - --leader-elect
        command:
          - gpu-operator
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 15
          periodSeconds: 20
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 5
          periodSeconds: 10
        resources:
          limits:
            cpu: 300m
            memory: 100Mi
          requests:
            cpu: 200m
            memory: 50Mi
        securityContext:
          allowPrivilegeEscalation: false
        volumeMounts:
          - mountPath: /host-etc/os-release
            name: host-os-release
            readOnly: true
        env:
          - name: OPERATOR_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
        ports:
          - name: metrics
            containerPort: 8080
      terminationGracePeriodSeconds: 10
      volumes:
        - hostPath:
            path: /etc/os-release
          name: host-os-release
