From 23468b8f0521b32a6bef2492d681282c1d4c34ca Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Wed, 18 Oct 2023 10:56:45 +0200 Subject: [PATCH 1/4] move & rename mq templates from repo to comon to be reused --- .../templates/_helpers-activemq.tpl | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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 From 75bb41932fb22470619b69e4917a8c2b708425d3 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Wed, 18 Oct 2023 10:58:58 +0200 Subject: [PATCH 2/4] remove legacy templates --- charts/alfresco-common/templates/_helpers.tpl | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 charts/alfresco-common/templates/_helpers.tpl 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 -}} From ef07824da4ab0669510b5df06e05e83f19bd2905 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Wed, 18 Oct 2023 10:59:36 +0200 Subject: [PATCH 3/4] bump common to 3.0.0-alpha.3 --- charts/alfresco-common/Chart.yaml | 2 +- charts/alfresco-common/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 From 0a68c421cb386cef234dc6e637d6d3c622ca06f0 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Wed, 18 Oct 2023 14:27:51 +0200 Subject: [PATCH 4/4] review comments --- charts/alfresco-common/templates/_helpers-activemq.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/alfresco-common/templates/_helpers-activemq.tpl b/charts/alfresco-common/templates/_helpers-activemq.tpl index 8ffe6840..5ce6b4da 100644 --- a/charts/alfresco-common/templates/_helpers-activemq.tpl +++ b/charts/alfresco-common/templates/_helpers-activemq.tpl @@ -1,10 +1,10 @@ {{/* Validate ActiveMQ has a failover transport URL -Usage: include "alfresco-common.activemq.url.valid" "URL" +Usage: include "alfresco-common.activemq.url.withFailover" "URL" */}} -{{- define "alfresco-common.activemq.url.valid" -}} +{{- define "alfresco-common.activemq.url.withFailover" -}} {{- if hasPrefix "failover:(" . }} {{- . }} {{- else -}} @@ -19,7 +19,7 @@ Usage: include "alfresco-common.activemq.cm" "URL" */}} {{- define "alfresco-common.activemq.cm" -}} - BROKER_URL: {{ template "alfresco-common.activemq.url.valid" . }} + BROKER_URL: {{ template "alfresco-common.activemq.url.withFailover" . }} {{- end -}} {{/*