apiVersion: v1
kind: ConfigMap
metadata:
  name: rabbitmq-config
  namespace: rabbit
data:
  enabled_plugins: |
    [rabbitmq_federation,rabbitmq_management,rabbitmq_peer_discovery_k8s].
  rabbitmq.conf: |
    loopback_users.guest = false
    listeners.tcp.default = 5672
    cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
    cluster_formation.classic_config.nodes.1 = rabbit@rabbitmq-0.rabbitmq.rabbit.svc.cluster.local
    cluster_formation.classic_config.nodes.2 = rabbit@rabbitmq-1.rabbitmq.rabbit.svc.cluster.local
    cluster_formation.classic_config.nodes.3 = rabbit@rabbitmq-2.rabbitmq.rabbit.svc.cluster.local