apiVersion: apps/v1
kind: Deployment
metadata:
  name: cluster-baremetal-operator
  namespace: openshift-machine-api
  labels:
    k8s-app: cluster-baremetal-operator
  annotations:
    exclude.release.openshift.io/internal-openshift-hosted: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: cluster-baremetal-operator
  template:
    metadata:
      annotations:
        target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
      labels:
        k8s-app: cluster-baremetal-operator
    spec:
      priorityClassName: system-node-critical
      serviceAccountName: cluster-baremetal-operator
      containers:
      - name: cluster-baremetal-operator
        image: registry.svc.ci.openshift.org/openshift:cluster-baremetal-operator
        command:
        - "/usr/bin/cluster-baremetal-operator"
        env:
        - name: RELEASE_VERSION
          value: "0.0.1-snapshot"
        - name: COMPONENT_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: METRICS_PORT
          value: "8080"
        resources:
          requests:
            cpu: 10m
            memory: 50Mi
        volumeMounts:
        - name: images
          mountPath: /etc/cluster-baremetal-operator/images
          readOnly: true
      nodeSelector:
        node-role.kubernetes.io/master: ""
      restartPolicy: Always
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      tolerations:
      - key: "node-role.kubernetes.io/master"
        operator: "Exists"
        effect: "NoSchedule"
      - key: "node.kubernetes.io/unreachable"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
      - key: "node.kubernetes.io/not-ready"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
      volumes:
      - name: images
        configMap:
          name: cluster-baremetal-operator-images
