From 4c73a648a315118231d2700a46d4b6845010eba4 Mon Sep 17 00:00:00 2001 From: juan131 Date: Mon, 15 Apr 2019 09:59:01 +0200 Subject: [PATCH 1/2] [stable/rabbitmq] Add parameters to limit the number of scheduler threads. Signed-off-by: juan131 --- stable/rabbitmq/Chart.yaml | 2 +- stable/rabbitmq/README.md | 2 ++ stable/rabbitmq/templates/statefulset.yaml | 4 ++++ stable/rabbitmq/values-production.yaml | 6 ++++++ stable/rabbitmq/values.yaml | 6 ++++++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/stable/rabbitmq/Chart.yaml b/stable/rabbitmq/Chart.yaml index 11436b5eb224..b34acfe3b96d 100644 --- a/stable/rabbitmq/Chart.yaml +++ b/stable/rabbitmq/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: rabbitmq -version: 5.1.0 +version: 5.2.0 appVersion: 3.7.14 description: Open source message broker software that implements the Advanced Message Queuing Protocol (AMQP) keywords: diff --git a/stable/rabbitmq/README.md b/stable/rabbitmq/README.md index 53217dff7099..7efa57274131 100644 --- a/stable/rabbitmq/README.md +++ b/stable/rabbitmq/README.md @@ -67,6 +67,8 @@ The following table lists the configurable parameters of the RabbitMQ chart and | `rabbitmq.clustering.k8s_domain` | Customize internal k8s cluster domain | `cluster.local` | | `rabbitmq.logs` | Value for the RABBITMQ_LOGS environment variable | `-` | | `rabbitmq.ulimitNofiles` | Max File Descriptor limit | `65536` | +| `rabbitmq.maxAvailableSchedulers | RabbitMQ maximum available scheduler threads | `2` | +| `rabbitmq.onlineSchedulers | RabbitMQ online scheduler threads | `1` | | `rabbitmq.configuration` | Required cluster configuration | See values.yaml | | `rabbitmq.extraConfiguration` | Extra configuration to add to rabbitmq.conf | See values.yaml | | `service.type` | Kubernetes Service type | `ClusterIP` | diff --git a/stable/rabbitmq/templates/statefulset.yaml b/stable/rabbitmq/templates/statefulset.yaml index ed3ca604cf9c..173dd6db6d7a 100644 --- a/stable/rabbitmq/templates/statefulset.yaml +++ b/stable/rabbitmq/templates/statefulset.yaml @@ -185,6 +185,10 @@ spec: value: {{ .Values.rabbitmq.logs | quote }} - name: RABBITMQ_ULIMIT_NOFILES value: {{ .Values.rabbitmq.ulimitNofiles | quote }} + {{- if and .Values.rabbitmq.maxAvailableSchedulers }} + - name: RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS + value: {{ printf "+S %s:%s" (toString .Values.rabbitmq.maxAvailableSchedulers) (toString .Values.rabbitmq.onlineSchedulers) -}} + {{- end }} - name: RABBITMQ_USE_LONGNAME value: "true" - name: RABBITMQ_ERL_COOKIE diff --git a/stable/rabbitmq/values-production.yaml b/stable/rabbitmq/values-production.yaml index 4e9d29783997..3a0460e24194 100644 --- a/stable/rabbitmq/values-production.yaml +++ b/stable/rabbitmq/values-production.yaml @@ -70,6 +70,12 @@ rabbitmq: ## ulimitNofiles: '65536' + ## RabbitMQ maximum available scheduler threads and online scheduler threads + ## ref: https://hamidreza-s.github.io/erlang/scheduling/real-time/preemptive/migration/2016/02/09/erlang-scheduler-details.html#scheduler-threads + ## + maxAvailableSchedulers: 2 + onlineSchedulers: 1 + ## Plugins to enable plugins: "rabbitmq_management rabbitmq_peer_discovery_k8s" diff --git a/stable/rabbitmq/values.yaml b/stable/rabbitmq/values.yaml index 7f9cbda80f37..2184b11326c8 100644 --- a/stable/rabbitmq/values.yaml +++ b/stable/rabbitmq/values.yaml @@ -70,6 +70,12 @@ rabbitmq: ## ulimitNofiles: '65536' + ## RabbitMQ maximum available scheduler threads and online scheduler threads + ## ref: https://hamidreza-s.github.io/erlang/scheduling/real-time/preemptive/migration/2016/02/09/erlang-scheduler-details.html#scheduler-threads + ## + maxAvailableSchedulers: 2 + onlineSchedulers: 1 + ## Plugins to enable plugins: "rabbitmq_management rabbitmq_peer_discovery_k8s" From 2d01985e0155a62f6f315fd30cb1fd65a5144a55 Mon Sep 17 00:00:00 2001 From: juan131 Date: Mon, 15 Apr 2019 10:30:40 +0200 Subject: [PATCH 2/2] Fix indentation Signed-off-by: juan131 --- stable/rabbitmq/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/rabbitmq/templates/statefulset.yaml b/stable/rabbitmq/templates/statefulset.yaml index 173dd6db6d7a..3e7349026a1d 100644 --- a/stable/rabbitmq/templates/statefulset.yaml +++ b/stable/rabbitmq/templates/statefulset.yaml @@ -188,7 +188,7 @@ spec: {{- if and .Values.rabbitmq.maxAvailableSchedulers }} - name: RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS value: {{ printf "+S %s:%s" (toString .Values.rabbitmq.maxAvailableSchedulers) (toString .Values.rabbitmq.onlineSchedulers) -}} - {{- end }} + {{- end }} - name: RABBITMQ_USE_LONGNAME value: "true" - name: RABBITMQ_ERL_COOKIE