Skip to content

Commit

Permalink
OPSEXP-2298: provide common templates to build activemq configmap (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz authored Oct 18, 2023
1 parent 874cf59 commit aab2403
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/alfresco-common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-common/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
24 changes: 24 additions & 0 deletions charts/alfresco-common/templates/_helpers-activemq.tpl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 0 additions & 9 deletions charts/alfresco-common/templates/_helpers.tpl

This file was deleted.

0 comments on commit aab2403

Please sign in to comment.