Skip to content

Commit

Permalink
OPSEXP-2529: activiti-5113 workaround for elasticsearch support in ac…
Browse files Browse the repository at this point in the history
…tiviti app (#270)
  • Loading branch information
alxgomz authored Apr 11, 2024
1 parent 2cfce81 commit 06eae43
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/alfresco-activiti-admin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: A Helm chart for Alfresco Activiti
name: alfresco-activiti-admin
version: 0.1.0-alpha.2
version: 0.1.0-alpha.3
appVersion: 24.1.0
dependencies:
- name: alfresco-common
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-activiti-admin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# alfresco-activiti-admin

![Version: 0.1.0-alpha.2](https://img.shields.io/badge/Version-0.1.0--alpha.2-informational?style=flat-square) ![AppVersion: 24.1.0](https://img.shields.io/badge/AppVersion-24.1.0-informational?style=flat-square)
![Version: 0.1.0-alpha.3](https://img.shields.io/badge/Version-0.1.0--alpha.3-informational?style=flat-square) ![AppVersion: 24.1.0](https://img.shields.io/badge/AppVersion-24.1.0-informational?style=flat-square)

A Helm chart for Alfresco Activiti

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{{- define "alfresco-activiti-admin.rest.baseUrl" -}}
{{/*
Workaround broken sed replacement in docker image entrypoint scripts - ACTIVITI-5113
Usage: include "alfresco-activiti-admin.activiti-5113.rest " $
*/}}

{{- define "alfresco-activiti-admin.activiti-5113.rest" -}}
{{- $restScheme := include "alfresco-common.url.scheme" .Values.environment.ACTIVITI_ADMIN_REST_APP_HOST }}
{{- $restHost := include "alfresco-common.url.host" .Values.environment.ACTIVITI_ADMIN_REST_APP_HOST }}
{{- $urlRoot := index .Values "workaround" "ACTIVITI-5113" | ternary "\\/\\/" "//"}}
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-activiti-admin/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data:
{{- if .Values.environment }}
{{- range $key, $val := .Values.environment }}
{{- if eq $key "ACTIVITI_ADMIN_REST_APP_HOST" }}
{{- $key | nindent 4 }}: {{ template "alfresco-activiti-admin.rest.baseUrl" $ }}
{{- $key | nindent 4 }}: {{ template "alfresco-activiti-admin.activiti-5113.rest" $ }}
{{- else }}
{{- $key | nindent 4 }}: {{ tpl $val $ | quote }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-activiti/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: A Helm chart for Alfresco Activiti
name: alfresco-activiti
version: 0.1.0-alpha.1
version: 0.1.0-alpha.2
appVersion: 24.1.0
dependencies:
- name: alfresco-common
Expand Down
3 changes: 2 additions & 1 deletion charts/alfresco-activiti/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# alfresco-activiti

![Version: 0.1.0-alpha.1](https://img.shields.io/badge/Version-0.1.0--alpha.1-informational?style=flat-square) ![AppVersion: 24.1.0](https://img.shields.io/badge/AppVersion-24.1.0-informational?style=flat-square)
![Version: 0.1.0-alpha.2](https://img.shields.io/badge/Version-0.1.0--alpha.2-informational?style=flat-square) ![AppVersion: 24.1.0](https://img.shields.io/badge/AppVersion-24.1.0-informational?style=flat-square)

A Helm chart for Alfresco Activiti

Expand Down Expand Up @@ -88,3 +88,4 @@ A Helm chart for Alfresco Activiti
| tolerations | list | `[]` | |
| volumeMounts | list | `[]` | |
| volumes | list | `[]` | |
| workaround.ACTIVITI-5113 | bool | `true` | Workaround for [ACTIVITI-5113]https://hyland.atlassian.net/browse/ACTIVITI-5113) |
2 changes: 1 addition & 1 deletion charts/alfresco-activiti/ci/default-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ database:
password: *dbpass
environment:
ACTIVITI_CORS_ALLOWED_ORIGINS: "http://localhost"
JAVA_OPTS: "-Dapp.review-workflows.enabled=true"
ACTIVITI_REVIEW_WORKFLOWS_ENABLED: "true"
tags:
ci: true
13 changes: 13 additions & 0 deletions charts/alfresco-activiti/templates/_helpers-workarounds.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{/*
Workaround broken sed replacement in docker image entrypoint scripts - ACTIVITI-5113
Usage: include "alfresco-activiti.activiti-5113.elasticsearch" $
*/}}
{{- define "alfresco-activiti.activiti-5113.elasticsearch" -}}
{{- $esScheme := include "alfresco-common.url.scheme" .Values.environment.ACTIVITI_ES_REST_CLIENT_ADDRESS }}
{{- $esHost := include "alfresco-common.url.host" .Values.environment.ACTIVITI_ES_REST_CLIENT_ADDRESS }}
{{- $urlRoot := index .Values "workaround" "ACTIVITI-5113" | ternary "\\/\\/" "//"}}
{{- printf "%s:%s%s" $esScheme $urlRoot $esHost }}
{{- end -}}
10 changes: 7 additions & 3 deletions charts/alfresco-activiti/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ metadata:
{{- include "alfresco-activiti.labels" . | nindent 4 }}
data:
{{- if .Values.environment }}
{{- range $key, $val := .Values.environment }}
{{ $key }}: {{ tpl $val $ | quote }}
{{- end }}
{{- range $key, $val := .Values.environment }}
{{- if eq $key "ACTIVITI_ES_REST_CLIENT_ADDRESS" }}
{{- $key | nindent 4 }}: {{ template "alfresco-activiti.activiti-5113.elasticsearch" $ }}
{{- else }}
{{- $key | nindent 4 }}: {{ tpl $val $ | quote }}
{{- end }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/alfresco-activiti/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ database:
license:
secretName:

workaround:
# -- Workaround for
# [ACTIVITI-5113]https://hyland.atlassian.net/browse/ACTIVITI-5113)
ACTIVITI-5113: true

tags:
# -- A chart tag used for Hyland's CI purpose. Do not set it to true.
ci: false

0 comments on commit 06eae43

Please sign in to comment.