Skip to content

Commit 95b8a01

Browse files
authored
Merge pull request #185 from xenit-eu/LIASCW-47
[LIASCW-47]: added elastic option
2 parents 567e0e4 + 2c0a630 commit 95b8a01

File tree

6 files changed

+73
-5
lines changed

6 files changed

+73
-5
lines changed

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,13 +1318,63 @@ ingress:
13181318
* Description: If you use an image that is not public. then you can create dockerconfigjson secrets on your cluster and
13191319
reference them here.
13201320

1321+
### Elastic
1322+
1323+
#### `elastic.enabled`
1324+
1325+
* Required: false
1326+
* Default: `false`
1327+
* Description: Enable or disable elastic search subsystem
1328+
> [!IMPORTANT]
1329+
> Alfresco can only use one search subsystem at a time, if you still have SOLR enabled (which you -shouldn't- when enabling this option),
1330+
> The helm chart will fail with an error message
1331+
1332+
#### `elastic.host`
1333+
1334+
* Required: false
1335+
* Default: `elasticsearch`
1336+
* Description: Host (service) name of elastic.
1337+
1338+
#### `elastic.port`
1339+
1340+
* Required: false
1341+
* Default: `9200`
1342+
* Description: Port of the elastic service.
1343+
1344+
#### `elastic.createIndexIfNotExists`
1345+
1346+
* Required: false
1347+
* Default: `true`
1348+
* Description: When enabled, and if the elastic index does not exist, it will be created automatically.
1349+
1350+
#### `elastic.elasticsearch.indexName`
1351+
1352+
* Required: false
1353+
* Default: `"alfresco-{{ .Release.Namespace }}`
1354+
* Description: This is the setting for the elastic index name. The default name is dynamic, it is based on your namespace name.
1355+
* This prevents potential issues when using a shared elastic environment.
1356+
> [!NOTE]
1357+
> The global value `global.elasticsearch.indexName` takes precedence when set.
1358+
1359+
#### `global.elasticsearch.indexName`
1360+
1361+
* Required: false
1362+
* Default: `"alfresco-{{ .Release.Namespace }}"`
1363+
* Description: This is a global setting for the elastic index name. The default name is dynamic, it is based on your namespace name.
1364+
* This prevents potential issues when using a shared elastic environment.
1365+
> [!NOTE]
1366+
> This setting will take precedence over elastic.elasticsearch.indexName when set
1367+
13211368
### SOLR
13221369

13231370
#### `solr.enabled`
13241371

13251372
* Required: false
13261373
* Default: `true`
13271374
* Description: Enable or disable the Solr
1375+
> [!IMPORTANT]
1376+
> Alfresco can only use one search subsystem at a time, if you have ELASTIC enabled (which you -shouldn't- when enabling this option),
1377+
> The helm chart will fail with an error message
13281378

13291379
#### `solr.replicas`
13301380

helm_commands/helm_template.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
helm template --namespace test-namespace template-test ./xenit-alfresco/ --values ./xenit-alfresco/values.yaml --set ingress.host=template-test ${@}

xenit-alfresco/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.8.11
18+
version: 0.8.14
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

xenit-alfresco/templates/acs/acs-config.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{{- if and .Values.elastic.enabled .Values.solr.enabled }}
2+
{{ fail "Both SOLR and elastic search systems are enabled, you can only have 1 (or none) enabled." }}
3+
{{- end }}
14
# Defines the properties required by the content repository
25
apiVersion: v1
36
kind: ConfigMap
@@ -9,9 +12,6 @@ metadata:
912
data:
1013
DB_URL: {{ quote .Values.acs.dbUrl }}
1114
DB_DRIVER: {{ quote .Values.acs.dbDriver }}
12-
{{- if .Values.solr.enabled }}
13-
GLOBAL_solr.port: '30300'
14-
{{- end }}
1515
{{- if .Values.share.enabled }}
1616
SHARE_HOST: {{ quote .Values.ingress.host }}
1717
SHARE_PORT: {{ quote .Values.acs.sharePort }}
@@ -45,7 +45,16 @@ data:
4545
GLOBAL_transform.service.enabled: 'false'
4646
{{- end }}
4747
GLOBAL_aos.baseUrlOverwrite: '{{ .Values.ingress.syncServiceHost }}://{{ .Values.ingress.host }}/alfresco/aos'
48-
{{- if not .Values.solr.enabled }}
48+
{{- if .Values.solr.enabled }}
49+
GLOBAL_index.subsystem.name: "solr6"
50+
GLOBAL_solr.port: '30300'
51+
{{- else if .Values.elastic.enabled }}
52+
GLOBAL_index.subsystem.name: "elasticsearch"
53+
GLOBAL_elasticsearch.host: {{ .Values.elastic.host | quote }}
54+
GLOBAL_elasticsearch.port: {{ .Values.elastic.port | quote }}
55+
GLOBAL_elasticsearch.indexName: {{ coalesce (((.Values.global).elasticsearch).indexName) (((.Values.elastic).elasticsearch).indexName) (printf "alfresco-%s" .Release.Namespace ) | quote }}
56+
GLOBAL_elasticsearch.createIndexIfNotExists: {{ .Values.elastic.createIndexIfNotExists | quote }}
57+
{{- else }}
4958
GLOBAL_index.subsystem.name: "noindex"
5059
{{- end }}
5160
{{- if ((((.Values.acs).email).inbound).port) }}

xenit-alfresco/templates/acs/acs-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ spec:
2727
metadata:
2828
labels:
2929
app: acs
30+
{{- if .Values.elastic.enabled }}
31+
elasticsearch-client: true
32+
{{- end }}
3033
annotations:
3134
checksum/acs-config: {{ include (print $.Template.BasePath "/acs/acs-config.yaml") . | sha256sum }}
3235
checksum/db-secret: {{ include (print $.Template.BasePath "/db-secret.yaml") . | sha256sum }}

xenit-alfresco/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ solr:
188188
successThreshold: 1
189189
timeoutSeconds: 10
190190

191+
elastic:
192+
enabled: false
193+
host: "elasticsearch"
194+
port: '9200'
195+
createIndexIfNotExists: true
191196
transformServices:
192197
enabled: true
193198
sharedFileStore:

0 commit comments

Comments
 (0)