apiVersion: v1
kind: ConfigMap
metadata:
  name: fedora-messaging
data:
  config.toml: |
    amqp_url = "amqps://fedora:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpublic_pubsub"
    callback = "fedora_messaging.example:printer"

    [tls]
{% if env == 'staging' %}
    ca_cert = "/etc/fedora-messaging/stg-cacert.pem"
{% else %}
    ca_cert = "/etc/fedora-messaging/cacert.pem"
{% endif %}
    keyfile = "/etc/fedora-messaging/fedora{{env_suffix}}-key.pem"
    certfile = "/etc/fedora-messaging/fedora{{env_suffix}}-cert.pem"

    [client_properties]
    app = "Mote"
    app_url = "https://github.com/fedora-infra/mote"
    app_contacts_email = ["darknao@fedoraproject.org", "akashdeep.dhar@gmail.com"]

    [exchanges."amq.topic"]
    type = "topic"
    durable = true
    auto_delete = false
    arguments = {}

    [queues.4321048e-0e18-46e4-8722-6651dcdfe953]
    durable = false
    auto_delete = true
    exclusive = true
    arguments = {}

    [[bindings]]
    queue = "4321048e-0e18-46e4-8722-6651dcdfe953"
    exchange = "amq.topic"
    routing_keys = [ "org.fedoraproject.{{env_short}}.meetbot.meeting.complete" ]

    [qos]
    prefetch_size = 0
    prefetch_count = 25

    [log_config]
    version = 1
    disable_existing_loggers = true

    [log_config.formatters.simple]
    format = "[%(levelname)s %(name)s] %(message)s"

    [log_config.handlers.console]
    class = "logging.StreamHandler"
    formatter = "simple"
    stream = "ext://sys.stdout"

    [log_config.loggers.fedora_messaging]
    level = "INFO"
    propagate = false
    handlers = ["console"]

    [log_config.loggers.twisted]
    level = "INFO"
    propagate = false
    handlers = ["console"]

    [log_config.loggers.pika]
    level = "WARNING"
    propagate = false
    handlers = ["console"]

    [log_config.root]
    level = "ERROR"
    handlers = ["console"]
