Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSEXP-2298: provide common templates to build activemq configmap #131

Merged
merged 4 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.valid" "URL"

*/}}
{{- define "alfresco-common.activemq.url.valid" -}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to have a name which reflect the current behaviour - remember that changing the implementation without changing the template name is risky

something like 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.valid" . }}
{{- end -}}

{{/*
Provide generic ActiveMQ env vars

Expand Down
9 changes: 0 additions & 9 deletions charts/alfresco-common/templates/_helpers.tpl

This file was deleted.