From bf43b6fb31a09753886813de51cc5e939ed4b1d0 Mon Sep 17 00:00:00 2001 From: Dmitry Kamenskikh Date: Mon, 19 Jun 2023 15:15:09 +0800 Subject: [PATCH] add nodeSelector, tolerations --- rocketchat/templates/chat-deployment.yaml | 6 ++++++ rocketchat/templates/hook-verify-mongodb-version.yaml | 6 ++++++ rocketchat/templates/microservices-account-deployment.yaml | 6 ++++++ .../templates/microservices-authorization-deployment.yaml | 6 ++++++ .../templates/microservices-ddp-streamer-deployment.yaml | 6 ++++++ rocketchat/templates/microservices-presence-deployment.yaml | 6 ++++++ .../templates/microservices-stream-hub-deployment.yaml | 6 ++++++ rocketchat/values.yaml | 4 ++++ 8 files changed, 46 insertions(+) diff --git a/rocketchat/templates/chat-deployment.yaml b/rocketchat/templates/chat-deployment.yaml index a4022de6..44ffc582 100644 --- a/rocketchat/templates/chat-deployment.yaml +++ b/rocketchat/templates/chat-deployment.yaml @@ -215,3 +215,9 @@ spec: app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: {{ toYaml .Values.tolerations | nindent 8 }} + {{- end }} diff --git a/rocketchat/templates/hook-verify-mongodb-version.yaml b/rocketchat/templates/hook-verify-mongodb-version.yaml index 0eb00252..cdd1e172 100644 --- a/rocketchat/templates/hook-verify-mongodb-version.yaml +++ b/rocketchat/templates/hook-verify-mongodb-version.yaml @@ -44,4 +44,10 @@ spec: items: - key: verifyMongodb.js path: verifyMongodb.js + {{- if .Values.nodeSelector }} + nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: {{ toYaml .Values.tolerations | nindent 8 }} + {{- end }} {{- end }} diff --git a/rocketchat/templates/microservices-account-deployment.yaml b/rocketchat/templates/microservices-account-deployment.yaml index 79fa0ce9..e57c3e04 100644 --- a/rocketchat/templates/microservices-account-deployment.yaml +++ b/rocketchat/templates/microservices-account-deployment.yaml @@ -68,6 +68,12 @@ spec: {{- if .Values.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 6 }} {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: {{ toYaml .Values.tolerations | nindent 8 }} + {{- end }} dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler diff --git a/rocketchat/templates/microservices-authorization-deployment.yaml b/rocketchat/templates/microservices-authorization-deployment.yaml index 1120137d..9896e4e0 100644 --- a/rocketchat/templates/microservices-authorization-deployment.yaml +++ b/rocketchat/templates/microservices-authorization-deployment.yaml @@ -69,6 +69,12 @@ spec: {{- if .Values.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 6 }} {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: {{ toYaml .Values.tolerations | nindent 8 }} + {{- end }} dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler diff --git a/rocketchat/templates/microservices-ddp-streamer-deployment.yaml b/rocketchat/templates/microservices-ddp-streamer-deployment.yaml index 2c091108..193214f5 100644 --- a/rocketchat/templates/microservices-ddp-streamer-deployment.yaml +++ b/rocketchat/templates/microservices-ddp-streamer-deployment.yaml @@ -70,6 +70,12 @@ spec: {{- if .Values.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 6 }} {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: {{ toYaml .Values.tolerations | nindent 8 }} + {{- end }} dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler diff --git a/rocketchat/templates/microservices-presence-deployment.yaml b/rocketchat/templates/microservices-presence-deployment.yaml index 403e7813..d0947caa 100644 --- a/rocketchat/templates/microservices-presence-deployment.yaml +++ b/rocketchat/templates/microservices-presence-deployment.yaml @@ -69,6 +69,12 @@ spec: {{- if .Values.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 6 }} {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: {{ toYaml .Values.tolerations | nindent 8 }} + {{- end }} dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler diff --git a/rocketchat/templates/microservices-stream-hub-deployment.yaml b/rocketchat/templates/microservices-stream-hub-deployment.yaml index ac3b4235..e66759ab 100644 --- a/rocketchat/templates/microservices-stream-hub-deployment.yaml +++ b/rocketchat/templates/microservices-stream-hub-deployment.yaml @@ -79,6 +79,12 @@ spec: {{- if .Values.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 6 }} {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: {{ toYaml .Values.tolerations | nindent 8 }} + {{- end }} dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler diff --git a/rocketchat/values.yaml b/rocketchat/values.yaml index a3461055..53ef4c16 100644 --- a/rocketchat/values.yaml +++ b/rocketchat/values.yaml @@ -80,6 +80,10 @@ affinity: {} # - e2e-az1 # - e2e-az2 +nodeSelector: {} + +tolerations: [] + ## Use an existing secret file with the MongoDB Url and OplogUrl existingMongodbSecret: ""