Skip to content

Commit

Permalink
Add node selector tolerations affinity to jobs (#239)
Browse files Browse the repository at this point in the history
* add nodeSelector affinity and tolerations to jobs

* add admintools nodeSelector tolerations and affinity

* bump chart to 0.13.2

* fixed indentation issue
  • Loading branch information
macneib authored Nov 1, 2021
1 parent b437983 commit 4d3fe59
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.13.1
version: 0.13.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
38 changes: 36 additions & 2 deletions templates/server-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,18 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}

{{- with (default $.Values.server.nodeSelector) }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.server.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.server.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
{{- end }}
{{- if .Values.schema.update.enabled }}
Expand Down Expand Up @@ -186,7 +197,18 @@ spec:
{{- end }}
{{- end }}
{{- end }}

{{- with (default $.Values.admintools.nodeSelector) }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.admintools.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.admintools.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
{{- end }}
{{- if or $.Values.elasticsearch.enabled $.Values.elasticsearch.external }}
Expand Down Expand Up @@ -243,5 +265,17 @@ spec:
args:
- 'curl -X PUT --fail --user {{ .Values.elasticsearch.username }}:{{ .Values.elasticsearch.password }} {{ .Values.elasticsearch.scheme }}://{{ .Values.elasticsearch.host }}:{{ .Values.elasticsearch.port }}/_template/temporal_visibility_v1_template -H "Content-Type: application/json" --data-binary "@schema/elasticsearch/visibility/index_template_{{ .Values.elasticsearch.version }}.json" 2>&1;
curl -X PUT --fail --user {{ .Values.elasticsearch.username }}:{{ .Values.elasticsearch.password }} {{ .Values.elasticsearch.scheme }}://{{ .Values.elasticsearch.host }}:{{ .Values.elasticsearch.port }}/{{ .Values.elasticsearch.visibilityIndex }} 2>&1;'
{{- with (default $.Values.admintools.nodeSelector) }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.admintools.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.admintools.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ admintools:
type: ClusterIP
port: 22
annotations: {}
nodeSelector: {}
tolerations: []
affinity: {}

web:
enabled: true
Expand Down

0 comments on commit 4d3fe59

Please sign in to comment.