From 9b74d6d6f2bd37b8a288478f38abea4f9a9b8399 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Wed, 20 Dec 2023 15:38:26 +0100 Subject: [PATCH 1/3] Add nodeSelector, affinity, tolerations support in mediation statefulset --- charts/alfresco-search-enterprise/Chart.yaml | 2 +- .../templates/statefulset-mediation.yaml | 12 ++++++++++++ .../tests/statefulset-mediation_test.yaml | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 charts/alfresco-search-enterprise/tests/statefulset-mediation_test.yaml diff --git a/charts/alfresco-search-enterprise/Chart.yaml b/charts/alfresco-search-enterprise/Chart.yaml index e79652fe..95852deb 100644 --- a/charts/alfresco-search-enterprise/Chart.yaml +++ b/charts/alfresco-search-enterprise/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: alfresco-search-enterprise description: A Helm chart for deploying Alfresco Elasticsearch connector type: application -version: 3.1.0-alpha.1 +version: 3.1.0-alpha.2 appVersion: 4.0.0.1 dependencies: - name: alfresco-common diff --git a/charts/alfresco-search-enterprise/templates/statefulset-mediation.yaml b/charts/alfresco-search-enterprise/templates/statefulset-mediation.yaml index 59604991..365869fe 100644 --- a/charts/alfresco-search-enterprise/templates/statefulset-mediation.yaml +++ b/charts/alfresco-search-enterprise/templates/statefulset-mediation.yaml @@ -58,3 +58,15 @@ spec: path: /actuator/health port: http resources: {{- toYaml .Values.resources | nindent 12 }} + {{- with $.Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $.Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $.Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/alfresco-search-enterprise/tests/statefulset-mediation_test.yaml b/charts/alfresco-search-enterprise/tests/statefulset-mediation_test.yaml new file mode 100644 index 00000000..913648bc --- /dev/null +++ b/charts/alfresco-search-enterprise/tests/statefulset-mediation_test.yaml @@ -0,0 +1,14 @@ +--- +suite: test liveindexing template rendering +templates: + - statefulset-mediation.yaml +tests: + - it: render nodeSelector properly + set: + nodeSelector: + node_label: node_value + asserts: + - equal: + path: spec.template.spec.nodeSelector.node_label + value: node_value + template: statefulset-mediation.yaml From 5ed645e86db8cd498b0c00282f976af13414e99a Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 2 Jan 2024 09:49:18 +0100 Subject: [PATCH 2/3] Add nodeSelector, affinity, tolerations support in reindex job --- .../templates/reindexing-job.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/charts/alfresco-search-enterprise/templates/reindexing-job.yaml b/charts/alfresco-search-enterprise/templates/reindexing-job.yaml index 59209bfe..cb778496 100644 --- a/charts/alfresco-search-enterprise/templates/reindexing-job.yaml +++ b/charts/alfresco-search-enterprise/templates/reindexing-job.yaml @@ -94,4 +94,16 @@ spec: echo 'Alfresco is ready, delay reindexing to give a chance to fully initialise.' sleep 30 echo 'Reindexing started!' + {{- with $.Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $.Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $.Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} {{ end }} From a8db15c3f5f8fa88daeac14946dab9204f408bf3 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 2 Jan 2024 09:50:54 +0100 Subject: [PATCH 3/3] bump readme --- charts/alfresco-search-enterprise/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/alfresco-search-enterprise/README.md b/charts/alfresco-search-enterprise/README.md index 92535502..b6c24752 100644 --- a/charts/alfresco-search-enterprise/README.md +++ b/charts/alfresco-search-enterprise/README.md @@ -1,6 +1,6 @@ # alfresco-search-enterprise -![Version: 3.1.0-alpha.1](https://img.shields.io/badge/Version-3.1.0--alpha.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.0.0.1](https://img.shields.io/badge/AppVersion-4.0.0.1-informational?style=flat-square) +![Version: 3.1.0-alpha.2](https://img.shields.io/badge/Version-3.1.0--alpha.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.0.0.1](https://img.shields.io/badge/AppVersion-4.0.0.1-informational?style=flat-square) A Helm chart for deploying Alfresco Elasticsearch connector