apiVersion: v1
kind: ConfigMap
metadata:
  name: qdrouterd-config
  labels:
    app: iot-demo
data:
  qdrouterd.conf: |
    router {
        mode: standalone
        id: Router.A
    }

    listener {
        host: 0.0.0.0
        port: amqp
        authenticatePeer: no
        saslMechanisms: ANONYMOUS
    }

    listener {
        host: 0.0.0.0
        port: amqps
        authenticatePeer: no
        saslMechanisms: ANONYMOUS
        sslProfile: router-ssl-profile
        requireSsl: yes
    }

    address {
        prefix: closest
        distribution: closest
    }

    address {
        prefix: multicast
        distribution: multicast
    }

    address {
        prefix: unicast
        distribution: closest
    }

    address {
        prefix: exclusive
        distribution: closest
    }

    address {
        prefix: broadcast
        distribution: multicast
    }

    sslProfile {
        name: router-ssl-profile
        caCertFile: /etc/qdrouterd-certs/ca.crt
        certFile: /etc/qdrouterd-certs/tls.crt
        privateKeyFile: /etc/qdrouterd-certs/tls.key
    }