apiVersion: apps/v1
kind: Deployment
metadata:
  name: machine-config-operator
  namespace: openshift-machine-config-operator
  labels:
    k8s-app: machine-config-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: machine-config-operator
  template:
    metadata:
      labels:
        k8s-app: machine-config-operator
    spec:
      containers:
      - name: machine-config-operator
        image: docker.io/openshift/origin-machine-config-operator:v4.0.0
        args:
        - "start"
        - "--images-json=/etc/mco/images/images.json"
        resources:
          requests:
            cpu: 20m
            memory: 50Mi
        env:
          - name: RELEASE_VERSION
            value: "0.0.1-snapshot"
        volumeMounts:
        - name: root-ca
          mountPath: /etc/ssl/kubernetes/ca.crt
        - name: etcd-ca
          mountPath: /etc/ssl/etcd/ca.crt
        - name: images
          mountPath: /etc/mco/images
      nodeSelector:
        node-role.kubernetes.io/master: ""
      priorityClassName: "system-cluster-critical"
      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-config-operator-images
      - name: etcd-ca
        hostPath:
          path: /etc/ssl/etcd/ca.crt
      - name: root-ca
        hostPath:
          path: /etc/kubernetes/ca.crt
