File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 103103 { {- end } }
104104{ {- end -} }
105105
106+ ########################## RabbitMQ protocol ##########################
107+ { {/*
108+ This template renders the protocol for RabbitMQ.
109+ */} }
110+ { {- define " invenio.rabbitmq.protocol" -} }
111+ { {- if .Values.rabbitmq.enabled } }
112+ { {- " amqp" } }
113+ { {- else } }
114+ { {- required " Missing .Values.rabbitmqExternal.protocol" .Values.rabbitmqExternal.protocol } }
115+ { {- end } }
116+ { {- end -} }
117+
118+ ########################## RabbitMQ vhost ##########################
119+ { {/*
120+ This template renders the vhost for RabbitMQ.
121+ */} }
122+ { {- define " invenio.rabbitmq.vhost" -} }
123+ { {- if .Values.rabbitmq.enabled } }
124+ { {- " " } }
125+ { {- else } }
126+ { {- required " Missing .Values.rabbitmqExternal.vhost" .Values.rabbitmqExternal.vhost } }
127+ { {- end } }
128+ { {- end -} }
129+
106130########################## Celery broker URI ##########################
107131{ {/*
108132 This template renders the URI for connecting to RabbitMQ.
112136 { {- $password := (include " invenio.rabbitmq.password" .) -} }
113137 { {- $port := (include " invenio.rabbitmq.amqpPort" .) -} }
114138 { {- $hostname := (include " invenio.rabbitmq.hostname" .) -} }
115- { {- printf " amqp://%s:%s@%s:%v/" $username $password $hostname $port } }
139+ { {- $protocol := (include " invenio.rabbitmq.protocol" .) -} }
140+ { {- $vhost := (include " invenio.rabbitmq.vhost" .) -} }
141+ { {- printf " %s://%s:%s@%s:%v/%s" $protocol $username $password $hostname $port $vhost } }
116142{ {- end -} }
117143
118144########################### RabbitMQ API URI ###########################
You can’t perform that action at this time.
0 commit comments