---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: amd-gpu
    app.kubernetes.io/instance: amd-gpu-operator
    app.kubernetes.io/name: gpu-operator-charts
    app.kubernetes.io/part-of: amd-gpu
    app.kubernetes.io/version: v1.3.0
    control-plane: controller-manager
  name: amd-gpu-operator-gpu-operator-charts-controller-manager
  namespace: kube-amd-gpu
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: amd-gpu
      app.kubernetes.io/instance: amd-gpu-operator
      app.kubernetes.io/name: gpu-operator-charts
      app.kubernetes.io/part-of: amd-gpu
      control-plane: controller-manager
  template:
    metadata:
      annotations:
        kubectl.kubernetes.io/default-container: manager
      labels:
        app.kubernetes.io/component: amd-gpu
        app.kubernetes.io/instance: amd-gpu-operator
        app.kubernetes.io/name: gpu-operator-charts
        app.kubernetes.io/part-of: amd-gpu
        control-plane: controller-manager
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - preference:
                matchExpressions:
                  - key: node-role.kubernetes.io/control-plane
                    operator: Exists
              weight: 1
      containers:
        - args:
            - --config=controller_manager_config.yaml
          env:
            - name: OPERATOR_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: KUBERNETES_CLUSTER_DOMAIN
              value: cluster.local
            - name: SIM_ENABLE
              value: "false"
          image: docker.io/rocm/gpu-operator@sha256:58ac66493b185891c228ccf7c88c88973ace8ec5b59716cc6ddffd3a428c3cef # Original tag: v1.3.0
          imagePullPolicy: Always
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8081
            initialDelaySeconds: 15
            periodSeconds: 20
          name: manager
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8081
            initialDelaySeconds: 5
            periodSeconds: 10
          resources:
            limits:
              cpu: 1000m
              memory: 1Gi
            requests:
              cpu: 100m
              memory: 256Mi
          securityContext:
            allowPrivilegeEscalation: false
          volumeMounts:
            - mountPath: /controller_manager_config.yaml
              name: manager-config
              subPath: controller_manager_config.yaml
      nodeSelector: {}
      securityContext:
        runAsNonRoot: true
      serviceAccountName: amd-gpu-operator-gpu-operator-charts-controller-manager
      terminationGracePeriodSeconds: 10
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/master
          operator: Equal
          value: ""
        - effect: NoSchedule
          key: node-role.kubernetes.io/control-plane
          operator: Equal
          value: ""
      volumes:
        - configMap:
            name: amd-gpu-operator-gpu-operator-charts-manager-config
          name: manager-config