Skip to content

Commit

Permalink
OPSEXP-2435 Add nodeSelector/affinity/tolerations support in mediatio…
Browse files Browse the repository at this point in the history
…n statefulset (#173)
  • Loading branch information
gionn authored Jan 3, 2024
1 parent 1ce5f33 commit 36648f0
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/alfresco-search-enterprise/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-search-enterprise/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 12 additions & 0 deletions charts/alfresco-search-enterprise/templates/reindexing-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 36648f0

Please sign in to comment.