---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: node-red-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: node-red-ansible-operator
  template:
    metadata:
      labels:
        name: node-red-ansible-operator
    spec:
      serviceAccountName: node-red-operator
      containers:
        - name: node-red-operator
          # Replace this with the built image name
          image: "registry.connect.redhat.com/ibm-edge/node-red-operator:0.0.2"
          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: "node-red-operator"
            - name: ANSIBLE_GATHERING
              value: explicit
            - name: RELATED_IMAGE_NODERED
              value: registry.connect.redhat.com/ibm-edge/node-red:0.0.2
            - name: RELATED_IMAGE_NODERED_BACKUP
              value: registry.connect.redhat.com/ibm-edge/node-red-backup-restore:v0.0.1
            - name: RELATED_IMAGE_NODERED_RESTORE
              value: registry.connect.redhat.com/ibm-edge/node-red-backup-restore:v0.0.1
      volumes:
        - name: runner
          emptyDir: {}
