apiVersion: apps/v1
kind: Deployment
metadata:
  name: machine-api-controllers
  namespace: openshift-config-managed
  labels:
    api: clusterapi
    k8s-app: controller
    tectonic-operators.coreos.com/managed-by: machine-api-operator
spec:
  selector:
    matchLabels:
      api: clusterapi
      k8s-app: controller
  replicas: 1
  template:
    metadata:
      labels:
        api: clusterapi
        k8s-app: controller
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      nodeSelector:
        node-role.kubernetes.io/master: ""
      serviceAccountName: machine-api-manager
      serviceAccount: machine-api-manager
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/master
        - key: CriticalAddonsOnly
          operator: Exists
        - effect: NoExecute
          key: node.alpha.kubernetes.io/notReady
          operator: Exists
        - effect: NoExecute
          key: node.alpha.kubernetes.io/unreachable
          operator: Exists
      containers:
        - name: machine-controller
          image: openshift/origin-alibabacloud-machine-controllers:v4.0.0
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
          command:
            - /machine-controller-manager
          args:
            - --logtostderr=true
            - --v=3
        - name: nodelink-controller
          image: openshift/origin-machine-api-operator:latest
          command:
            - /nodelink-controller
          args:
            - --logtostderr=true
            - --v=3
          resources:
            requests:
              cpu: 100m
              memory: 20Mi
            limits:
              cpu: 100m
              memory: 30Mi
