From 1ba7c271df1e67b70773075d1d3240415fb2f1d6 Mon Sep 17 00:00:00 2001 From: Jawon Choo Date: Fri, 12 May 2017 10:42:57 +0900 Subject: [PATCH] add node type option to rabbitmq clustering Currently, rabbitmq clustering is using the autocluster plugin, and NODE_TYPE is set to disc in default. so every nodes join cluster as disc node. However, since there is a need for disc + ram clustering for the performance. if change node_type from disc to ram, clustering configured as [disc + ram + ram]. Change-Id: Ie83689b0554f0f993bdffac666f0f56db8082992 --- rabbitmq/templates/etc/_rabbitmq-env.conf.tpl | 1 + rabbitmq/templates/etc/_rabbitmq.config.tpl | 1 + rabbitmq/values.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/rabbitmq/templates/etc/_rabbitmq-env.conf.tpl b/rabbitmq/templates/etc/_rabbitmq-env.conf.tpl index 43b5af75da..8ec2b98c64 100644 --- a/rabbitmq/templates/etc/_rabbitmq-env.conf.tpl +++ b/rabbitmq/templates/etc/_rabbitmq-env.conf.tpl @@ -19,3 +19,4 @@ AUTOCLUSTER_DELAY={{ .Values.autocluster.delay }} RABBITMQ_USE_LONGNAME=true AUTOCLUSTER_LOG_LEVEL={{ .Values.autocluster.log_level }} NODENAME="rabbit@${RABBITMQ_POD_IP}" +RABBITMQ_NODE_TYPE={{ .Values.autocluster.node_type }} diff --git a/rabbitmq/templates/etc/_rabbitmq.config.tpl b/rabbitmq/templates/etc/_rabbitmq.config.tpl index c80b088c77..271b1a72e1 100644 --- a/rabbitmq/templates/etc/_rabbitmq.config.tpl +++ b/rabbitmq/templates/etc/_rabbitmq.config.tpl @@ -36,6 +36,7 @@ ,{etcd_scheme, http} ,{etcd_host, {{ .Values.endpoints.etcd.hosts.default }}} ,{etcd_port, {{ .Values.endpoints.etcd.port }}} + ,{node_type, {{ .Values.autocluster.node_type }} } ]} ]. % EOF diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml index 09b3f93699..a6f157c429 100644 --- a/rabbitmq/values.yaml +++ b/rabbitmq/values.yaml @@ -69,6 +69,7 @@ endpoints: autocluster: log_level: info delay: 15 + node_type: disc probes_delay: 180 probes_timeout: 10