apiVersion: apps/v1
kind: Deployment
metadata:
  name: eddi-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: eddi-operator
  template:
    metadata:
      labels:
        name: eddi-operator
    spec:
      serviceAccountName: eddi-operator
      containers:
        - name: ansible
          command:
          - /usr/local/bin/ao-logs
          - /tmp/ansible-operator/runner
          - stdout
          # Replace this with the built image name
          image: registry.connect.redhat.com/labsai/eddi-operator:latest
          imagePullPolicy: Always
          volumeMounts:
          - mountPath: /tmp/ansible-operator/runner
            name: runner
            readOnly: true
        - name: operator
          # Replace this with the built image name
          image: registry.connect.redhat.com/labsai/eddi-operator:latest
          imagePullPolicy: Always
          volumeMounts:
          - mountPath: /tmp/ansible-operator/runner
            name: runner
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "eddi-operator"
            - name: RELATED_IMAGE_DB
              value: "registry.connect.redhat.com/labsai/eddi:latest"
      volumes:
        - name: runner
          emptyDir: {}
