Skip to content

Commit

Permalink
Add global affinity and tolerations (#117)
Browse files Browse the repository at this point in the history
* Add global affinity and tolerations

* Bump chart version
  • Loading branch information
guilload authored Dec 27, 2024
1 parent dcc9e6d commit 35dd5e1
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion charts/quickwit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: quickwit
description: Sub-second search & analytics engine on cloud storage.
type: application
version: 0.7.7
version: 0.7.8
appVersion: "v0.8.2"
keywords:
- quickwit
Expand Down
7 changes: 3 additions & 4 deletions charts/quickwit/templates/control-plane-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,13 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.control_plane.affinity }}
{{- with merge .Values.affinity .Values.control_plane.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.control_plane.tolerations }}
{{- $tolerations := append .Values.tolerations .Values.control_plane.tolerations | compact | uniq }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- toYaml $tolerations | nindent 8 }}
{{- if .Values.control_plane.runtimeClassName }}
runtimeClassName: {{ .Values.control_plane.runtimeClassName | quote }}
{{- end }}
7 changes: 3 additions & 4 deletions charts/quickwit/templates/indexer-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,13 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.indexer.affinity }}
{{- with merge .Values.affinity .Values.indexer.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.indexer.tolerations }}
{{- $tolerations := append .Values.tolerations .Values.indexer.tolerations | compact | uniq }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- toYaml $tolerations | nindent 8 }}
{{- if .Values.indexer.runtimeClassName }}
runtimeClassName: {{ .Values.indexer.runtimeClassName | quote }}
{{- end }}
Expand Down
7 changes: 3 additions & 4 deletions charts/quickwit/templates/janitor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,13 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.janitor.affinity }}
{{- with merge .Values.affinity .Values.janitor.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.janitor.tolerations }}
{{- $tolerations := append .Values.tolerations .Values.janitor.tolerations | compact | uniq }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- toYaml $tolerations | nindent 8 }}
{{- if .Values.janitor.runtimeClassName }}
runtimeClassName: {{ .Values.janitor.runtimeClassName | quote }}
{{- end }}
Expand Down
7 changes: 3 additions & 4 deletions charts/quickwit/templates/metastore-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,13 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.metastore.affinity }}
{{- with merge .Values.affinity .Values.metastore.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.metastore.tolerations }}
{{- $tolerations := append .Values.tolerations .Values.metastore.tolerations | compact | uniq }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- toYaml $tolerations | nindent 8 }}
{{- if .Values.metastore.runtimeClassName }}
runtimeClassName: {{ .Values.metastore.runtimeClassName | quote }}
{{- end }}
7 changes: 3 additions & 4 deletions charts/quickwit/templates/searcher-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,13 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.searcher.affinity }}
{{- with merge .Values.affinity .Values.searcher.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.searcher.tolerations }}
{{- $tolerations := append .Values.tolerations .Values.searcher.tolerations | compact | uniq }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- toYaml $tolerations | nindent 8 }}
{{- if .Values.searcher.runtimeClassName }}
runtimeClassName: {{ .Values.searcher.runtimeClassName | quote }}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions charts/quickwit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ configMaps: []
# - name: configmap1
# mountPath: /quickwit/configmaps/

# Global tolerations applied to all deployments
tolerations: []

# Global affinity settings applied to all deployments
affinity: {}

searcher:
replicaCount: 3

Expand Down

0 comments on commit 35dd5e1

Please sign in to comment.