diff --git a/charts/alfresco-common/templates/_helpers-activemq.tpl b/charts/alfresco-common/templates/_helpers-activemq.tpl index a1949891..8ffe6840 100644 --- a/charts/alfresco-common/templates/_helpers-activemq.tpl +++ b/charts/alfresco-common/templates/_helpers-activemq.tpl @@ -1,3 +1,27 @@ +{{/* +Validate ActiveMQ has a failover transport URL + +Usage: include "alfresco-common.activemq.url.valid" "URL" + +*/}} +{{- define "alfresco-common.activemq.url.valid" -}} +{{- if hasPrefix "failover:(" . }} + {{- . }} +{{- else -}} + {{- printf "failover:(%s)" . }} +{{- end }} +{{- end -}} + +{{/* +Render ActiveMQ broker configmap + +Usage: include "alfresco-common.activemq.cm" "URL" + +*/}} +{{- define "alfresco-common.activemq.cm" -}} + BROKER_URL: {{ template "alfresco-common.activemq.url.valid" . }} +{{- end -}} + {{/* Provide generic ActiveMQ env vars