apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubemq-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kubemq-operator
  template:
    metadata:
      labels:
        app: kubemq-operator
    spec:
      serviceAccountName: kubemq-operator
      containers:
        - name: kubemq-operator
          image: docker.io/kubemq/kubemq-operator:latest
          command:
            - kubemq-operator
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
            - containerPort: 8090
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: SOURCE
              value: "helm"
            - name: DEBUG_MODE
              value: "false"
            - name: RELATED_IMAGE_KUBEMQ_CLUSTER
              value: "docker.io/kubemq/kubemq:latest"
            - name: RELATED_IMAGE_PROMETHEUS
              value: "prom/prometheus:latest"
            - name: RELATED_IMAGE_GRAFANA
              value: "grafana/grafana:latest"
            - name: KUBEMQ_VIEW_DASHBOARD_SOURCE
              value: "https://raw.githubusercontent.com/kubemq-io/kubemq-dashboard/master/dashboard.json"
            - name: OPERATOR_NAME
              value: "kubemq-operator"
            - name: KUBEMQ_LICENSE_MODE
              value: "COMMUNITY"
            - name: CONNECTOR_TARGETS_IMAGE
              value: "kubemq/kubemq-targets:latest"
            - name: CONNECTOR_SOURCES_IMAGE
              value: "kubemq/kubemq-sources:latest"
            - name: CONNECTOR_BRIDGES_IMAGE
              value: "kubemq/kubemq-bridges:latest"
            - name: CONNECTOR_TASKS_IMAGE
              value: "kubemq/kubemq-tasks:latest"
