From 2ee772ff8edb1c2daa9159e1b79d65558db2e1b3 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Thu, 17 Mar 2022 16:06:32 -0700 Subject: [PATCH] Add support for specifying nodeSelectors and tolerations to rancher-alerting/rancher-alerting-drivers --- .../charts/templates/hardened.yaml | 6 ++++++ .../rancher-alerting-drivers/charts/values.yaml | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml b/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml index eaaa70187..8b20a2003 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml +++ b/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml @@ -17,7 +17,13 @@ spec: runAsUser: 1000 restartPolicy: Never nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} +{{- if .Values.nodeSelector }} +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} +{{- if .Values.tolerations }} +{{ toYaml .Values.tolerations | indent 8 }} +{{- end }} containers: - name: {{ include "drivers.fullname" . }}-patch-sa image: "{{ include "system_default_registry" . }}{{ .Values.global.kubectl.repository }}:{{ .Values.global.kubectl.tag }}" diff --git a/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml b/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml index 00ae3bc62..48b77ef94 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml +++ b/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml @@ -18,3 +18,10 @@ prom2teams: sachet: enabled: false + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} +## List of node taints to tolerate (requires Kubernetes >= 1.6) +tolerations: []