apiVersion: apps/v1beta2
kind: Deployment
metadata:
  name: machine-api-operator
  namespace: openshift-machine-api
  labels:
    k8s-app: machine-api-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: machine-api-operator
  template:
    metadata:
      labels:
        k8s-app: machine-api-operator
    spec:
      priorityClassName: system-node-critical
      serviceAccountName: machine-api-operator
      containers:
      - name: machine-api-operator
        image: docker.io/openshift/origin-machine-api-operator:v4.0.0
        command:
        - "/machine-api-operator"
        args:
        - "start"
        - "--images-json=/etc/machine-api-operator-config/images/images.json"
        env:
        - name: RELEASE_VERSION
          value: "0.0.1-snapshot"
        - name: COMPONENT_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        resources:
          requests:
            cpu: 10m
            memory: 50Mi
        volumeMounts:
        - name: images
          mountPath: /etc/machine-api-operator-config/images
      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: machine-api-operator-images
