kind: ConfigMap
apiVersion: v1
metadata:
  name: rmq-cluster-config
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
data:
    enabled_plugins: |
      [rabbitmq_management,rabbitmq_peer_discovery_k8s,rabbitmq_stomp].
    rabbitmq.conf: |
      loopback_users.guest = false

      ## Clustering
      cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
      cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
      cluster_formation.k8s.address_type = hostname
      #################################################
      # default is rabbitmq-cluster's namespace# 指定namespace
      #################################################
      cluster_formation.k8s.hostname_suffix = .rmq-cluster.default.svc.cluster.local
      cluster_formation.node_cleanup.interval = 10
      cluster_formation.node_cleanup.only_log_warning = true
      cluster_partition_handling = autoheal
      ## queue master locator
      queue_master_locator=min-masters
      listeners.tcp.default=5672
      loopback_users=none
      stomp.default_user=admin
      stomp.default_pass=admin123
      stomp.listeners.tcp.1=0.0.0.0:61613
      stomp.default_vhost=/
