diff --git a/charts/alfresco-common/Chart.yaml b/charts/alfresco-common/Chart.yaml index 7d0bf0f6..c27c2947 100644 --- a/charts/alfresco-common/Chart.yaml +++ b/charts/alfresco-common/Chart.yaml @@ -5,7 +5,7 @@ description: | A helper subchart to avoid duplication in alfresco charts and set common external dependencies type: library -version: 3.0.0-alpha.2 +version: 3.0.0-alpha.3 dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts diff --git a/charts/alfresco-common/README.md b/charts/alfresco-common/README.md index 6fb803d0..47a3604b 100644 --- a/charts/alfresco-common/README.md +++ b/charts/alfresco-common/README.md @@ -1,6 +1,6 @@ # alfresco-common -![Version: 3.0.0-alpha.2](https://img.shields.io/badge/Version-3.0.0--alpha.2-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) +![Version: 3.0.0-alpha.3](https://img.shields.io/badge/Version-3.0.0--alpha.3-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) A helper subchart to avoid duplication in alfresco charts and set common external dependencies diff --git a/charts/alfresco-common/templates/_helpers-activemq.tpl b/charts/alfresco-common/templates/_helpers-activemq.tpl index a1949891..5ce6b4da 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.withFailover" "URL" + +*/}} +{{- define "alfresco-common.activemq.url.withFailover" -}} +{{- 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.withFailover" . }} +{{- end -}} + {{/* Provide generic ActiveMQ env vars diff --git a/charts/alfresco-common/templates/_helpers.tpl b/charts/alfresco-common/templates/_helpers.tpl deleted file mode 100644 index 7ae7d584..00000000 --- a/charts/alfresco-common/templates/_helpers.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "content-services.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-cs") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "alfresco.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}}