From 3c67ac35ffc0b242a1d22656e8f3cbe6cf36efab Mon Sep 17 00:00:00 2001 From: Rhea Danzey Date: Fri, 20 Sep 2024 13:02:40 -0500 Subject: [PATCH 1/2] Helm Chart - Add configuration for node selector / tolerations / affinity Signed-off-by: Rhea Danzey --- helm/dendrite/Chart.yaml | 2 +- helm/dendrite/templates/deployment.yaml | 12 ++++++++++++ helm/dendrite/templates/jobs.yaml | 12 ++++++++++++ helm/dendrite/values.yaml | 9 +++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/helm/dendrite/Chart.yaml b/helm/dendrite/Chart.yaml index 7893f9bdcd..9613b50455 100644 --- a/helm/dendrite/Chart.yaml +++ b/helm/dendrite/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: dendrite -version: "0.14.5" +version: "0.14.6" appVersion: "0.13.8" description: Dendrite Matrix Homeserver type: application diff --git a/helm/dendrite/templates/deployment.yaml b/helm/dendrite/templates/deployment.yaml index 6496b26921..718f6457b1 100644 --- a/helm/dendrite/templates/deployment.yaml +++ b/helm/dendrite/templates/deployment.yaml @@ -113,4 +113,16 @@ spec: imagePullSecrets: {{- with .Values.imagePullSecrets }} {{ . | toYaml | nindent 6 }} + {{- 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 }} \ No newline at end of file diff --git a/helm/dendrite/templates/jobs.yaml b/helm/dendrite/templates/jobs.yaml index 42582d7490..7f96f26955 100644 --- a/helm/dendrite/templates/jobs.yaml +++ b/helm/dendrite/templates/jobs.yaml @@ -98,6 +98,18 @@ spec: volumes: - name: signing-key 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 completions: 1 backoffLimit: 1 diff --git a/helm/dendrite/values.yaml b/helm/dendrite/values.yaml index f9d82965a2..b68d9c182f 100644 --- a/helm/dendrite/values.yaml +++ b/helm/dendrite/values.yaml @@ -100,6 +100,15 @@ strategy: # -- Maximum number of pods that can be scheduled above the desired number of pods maxSurge: 25% +# -- Node selector configuration +nodeSelector: {} + +# -- Tolerations configuration +tolerations: {} + +# -- Affinity configuration +affinity: {} + dendrite_config: version: 2 global: From 7fcc38947431fff35531e6bc129d215652fb8120 Mon Sep 17 00:00:00 2001 From: Rhea Danzey Date: Fri, 20 Sep 2024 13:31:21 -0500 Subject: [PATCH 2/2] Add configuration to use extra arguments with dendrite command Signed-off-by: Rhea Danzey --- helm/dendrite/templates/deployment.yaml | 3 +++ helm/dendrite/values.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/helm/dendrite/templates/deployment.yaml b/helm/dendrite/templates/deployment.yaml index 718f6457b1..3952f4a7c2 100644 --- a/helm/dendrite/templates/deployment.yaml +++ b/helm/dendrite/templates/deployment.yaml @@ -56,6 +56,9 @@ spec: args: - '--config' - '/etc/dendrite/dendrite.yaml' + {{- with .Values.extraArgs }} + {{- toYaml . | nindent 10 }} + {{- end }} ports: - name: http containerPort: 8008 diff --git a/helm/dendrite/values.yaml b/helm/dendrite/values.yaml index b68d9c182f..02cd1aa135 100644 --- a/helm/dendrite/values.yaml +++ b/helm/dendrite/values.yaml @@ -77,6 +77,9 @@ persistence: # GKE, AWS & OpenStack) storageClass: +# -- Add additional arguments to the dendrite command +extraArgs: [] + # -- Add additional volumes to the Dendrite Pod extraVolumes: [] # ex.