---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: migration-operator
  namespace: openshift-migration
  labels:
    app: migration-operator
spec:
  selector:
    matchLabels:
      app: migration-operator
  template:
    metadata:
      labels:
        app: migration-operator
    spec:
      serviceAccountName: migration-operator
      containers:
      - name: ansible
        command:
        - /usr/local/bin/ao-logs
        - /tmp/ansible-operator/runner
        - stdout
        image: quay.io/ocpmigrate/mig-operator:stable
        imagePullPolicy: Always
        volumeMounts:
        - mountPath: /tmp/ansible-operator/runner
          name: runner
          readOnly: true
      - name: operator
        image: quay.io/ocpmigrate/mig-operator:stable
        imagePullPolicy: Always
        volumeMounts:
        - mountPath: /tmp/ansible-operator/runner
          name: runner
        env:
        - name: OPERATOR_NAME
          value: migration-operator
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: WATCH_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: REGISTRY
          value: quay.io
        - name: PROJECT
          value: ocpmigrate
        - name: MIG_CONTROLLER_REPO
          value: mig-controller
        - name: MIG_UI_REPO
          value: mig-ui
        - name: VELERO_REPO
          value: velero
        - name: VELERO_PLUGIN_REPO
          value: migration-plugin
        - name: VELERO_RESTIC_RESTORE_HELPER_REPO
          value: velero-restic-restore-helper
        - name: MIGRATION_TAG
          value: stable
        - name: VELERO_TAG
          value: stable
      volumes:
        - name: runner
          emptyDir: {}
