apiVersion: v1
kind: ConfigMap
metadata:
  name: cerk-configs
data:
  init.json: |
    {
      "scheduler": "THREADING_SCHEDULER",
      "router": "ROUTER_BROADCAST",
      "config_loader": "CONFIG_LOADER_FILE",
      "ports": {
        "ampq": "PORT_AMQP",
        "mqtt": "PORT_MQTT_MOSQUITTO",
        "dummy-logger-output": "PORT_PRINTER",
        "health": "PORT_HEALTH_CHECK_HTTP"
      }
    }
  config.json: |
    {
      "routing_rules": [
        "dummy-logger-output",
        "mqtt"
      ],
      "ports": {
        "ampq": {
          "uri": "amqp://rabbitmq:5672/%2f",
          "consume_channels": [
            {
              "name": "input",
              "ensure_queue": true,
              "bind_to_exchange": "input",
              "delivery_guarantee": 2
            }
          ]
        },
        "mqtt": {
          "host": "tcp://mosquitto:1883",
          "send_topic": "out"
        },
        "dummy-logger-output": null,
        "health": {
          "ports_to_check": ["ampq"]
        }
      }
    }
  no-guarantee.json: |
    {
      "routing_rules": [
        "dummy-logger-output",
        "mqtt"
      ],
      "ports": {
        "ampq": {
          "uri": "amqp://rabbitmq:5672/%2f",
          "consume_channels": [
            {
              "name": "input",
              "ensure_queue": true,
              "bind_to_exchange": "input",
              "delivery_guarantee": 0
            }
          ]
        },
        "mqtt": {
          "host": "tcp://mosquitto:1883",
          "send_topic": "out"
        },
        "dummy-logger-output": null,
        "health": {
          "ports_to_check": ["ampq"]
        }
      }
    }
