Helm-Toolkit: adds import additional rabbitmq configuration

It adds an ability to specify the auxiliary configuraiton for rabbitmq
like policies, permissions loading json formatted data

Change-Id: I85240a50fb64a4d74454768034fe3bdcf25f3019
Signed-off-by: Ruslan Khanbikov <rk760n@att.com>
This commit is contained in:
Ruslan Khanbikov 2018-07-04 20:47:01 -07:00
parent 5d622a806e
commit 5ae782ff52
2 changed files with 12 additions and 0 deletions

View File

@ -64,6 +64,10 @@ spec:
secretKeyRef:
name: {{ index $envAll.Values.secrets.oslo_messaging $serviceName }}
key: RABBITMQ_CONNECTION
{{- if $envAll.Values.conf.rabbitmq }}
- name: RABBITMQ_AUXILIARY_CONFIGURATION
value: {{ toJson $envAll.Values.conf.rabbitmq | quote }}
{{- end }}
volumes:
- name: rabbit-init-sh
configMap:

View File

@ -75,4 +75,12 @@ rabbitmqadmin_cli \
configure=".*" \
write=".*" \
read=".*"
if [ ! -z "$RABBITMQ_AUXILIARY_CONFIGURATION" ]
then
echo "Applying additional configuration"
echo "${RABBITMQ_AUXILIARY_CONFIGURATION}" > /tmp/rmq_definitions.json
rabbitmqadmin_cli import /tmp/rmq_definitions.json
fi
{{- end }}