Skip to content

Commit

Permalink
Merge pull request #984 from amazeeio/broker-headless
Browse files Browse the repository at this point in the history
rabbitmq: use headless for all service names
  • Loading branch information
Schnitzel authored Mar 22, 2019
2 parents bc94673 + 4537521 commit e599ced
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ objects:
metadata:
name: ${SERVICE_NAME}
spec:
serviceName: ${SERVICE_NAME}
serviceName: ${SERVICE_NAME}-headless
replicas: 3
selector:
matchLabels:
Expand Down
4 changes: 2 additions & 2 deletions images/rabbitmq-cluster/cluster-rabbit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ if [ -z "$POD_NAMESPACE" ]; then
fi

# clustering uses full hostnames, generate those
echo NODENAME=rabbit@${HOSTNAME}.${SERVICE_NAME}.${POD_NAMESPACE}.svc.cluster.local > /etc/rabbitmq/rabbitmq-env.conf
echo cluster_formation.k8s.hostname_suffix=.${SERVICE_NAME}.${POD_NAMESPACE}.svc.cluster.local >> /etc/rabbitmq/rabbitmq.conf
echo NODENAME=rabbit@${HOSTNAME}.${SERVICE_NAME}-headless.${POD_NAMESPACE}.svc.cluster.local > /etc/rabbitmq/rabbitmq-env.conf
echo cluster_formation.k8s.hostname_suffix=.${SERVICE_NAME}-headless.${POD_NAMESPACE}.svc.cluster.local >> /etc/rabbitmq/rabbitmq.conf
echo cluster_formation.k8s.service_name=${SERVICE_NAME}-headless >> /etc/rabbitmq/rabbitmq.conf

# start the server
Expand Down

0 comments on commit e599ced

Please sign in to comment.