Helm Chart - Add configuration for node selector / tolerations / affi… (#3433)

For some experimentation I'm doing, I need to pin Dendrite to a specific
node pool. This should be available configuration within the chart
ideally, and this should do it in theory.

### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [x] I have added Go unit tests or [Complement integration
tests](https://github.com/matrix-org/complement) for this PR _or_ I have
justified why this PR doesn't need tests
* [x] Pull request includes a [sign off below using a legally
identifiable
name](https://matrix-org.github.io/dendrite/development/contributing#sign-off)
_or_ I have already signed off privately

Signed-off-by: `Rhea Danzey <rdanzey@element.io>`

---------

Signed-off-by: Rhea Danzey <rdanzey@element.io>
This commit is contained in:
Rhea Danzey 2024-09-20 13:56:27 -05:00 committed by GitHub
parent c914f062e6
commit 07e59d0ba9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 40 additions and 1 deletions

View file

@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: dendrite name: dendrite
version: "0.14.5" version: "0.14.6"
appVersion: "0.13.8" appVersion: "0.13.8"
description: Dendrite Matrix Homeserver description: Dendrite Matrix Homeserver
type: application type: application

View file

@ -56,6 +56,9 @@ spec:
args: args:
- '--config' - '--config'
- '/etc/dendrite/dendrite.yaml' - '/etc/dendrite/dendrite.yaml'
{{- with .Values.extraArgs }}
{{- toYaml . | nindent 10 }}
{{- end }}
ports: ports:
- name: http - name: http
containerPort: 8008 containerPort: 8008
@ -114,3 +117,15 @@ spec:
{{- with .Values.imagePullSecrets }} {{- with .Values.imagePullSecrets }}
{{ . | toYaml | nindent 6 }} {{ . | toYaml | nindent 6 }}
{{- end }} {{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -98,6 +98,18 @@ spec:
volumes: volumes:
- name: signing-key - name: signing-key
emptyDir: {} emptyDir: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
parallelism: 1 parallelism: 1
completions: 1 completions: 1
backoffLimit: 1 backoffLimit: 1

View file

@ -77,6 +77,9 @@ persistence:
# GKE, AWS & OpenStack) # GKE, AWS & OpenStack)
storageClass: storageClass:
# -- Add additional arguments to the dendrite command
extraArgs: []
# -- Add additional volumes to the Dendrite Pod # -- Add additional volumes to the Dendrite Pod
extraVolumes: [] extraVolumes: []
# ex. # ex.
@ -100,6 +103,15 @@ strategy:
# -- Maximum number of pods that can be scheduled above the desired number of pods # -- Maximum number of pods that can be scheduled above the desired number of pods
maxSurge: 25% maxSurge: 25%
# -- Node selector configuration
nodeSelector: {}
# -- Tolerations configuration
tolerations: {}
# -- Affinity configuration
affinity: {}
dendrite_config: dendrite_config:
version: 2 version: 2
global: global: