From b9e864a456f8a0b1b0260e28cb7b9e11c0093549 Mon Sep 17 00:00:00 2001 From: Sungil Im Date: Thu, 10 Jan 2019 05:46:53 -0500 Subject: [PATCH] Running agents on all nodes. Using a node selector can not run the prometheus-process-exporter on the master node. So, This PS changes the scheduling to use either taint/toleration or the node selector. Change-Id: Ie84b2d2e0354fa927c1010c18392667dad171483 --- prometheus-process-exporter/templates/daemonset.yaml | 4 ++++ prometheus-process-exporter/values.yaml | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/prometheus-process-exporter/templates/daemonset.yaml b/prometheus-process-exporter/templates/daemonset.yaml index 55a34c418..d1132fc10 100644 --- a/prometheus-process-exporter/templates/daemonset.yaml +++ b/prometheus-process-exporter/templates/daemonset.yaml @@ -52,8 +52,12 @@ spec: {{ tuple $envAll "process_exporter" "metrics" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }} +{{ if .Values.pod.tolerations.process_exporter.enabled }} +{{ tuple $envAll "process_exporter" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ else }} nodeSelector: {{ .Values.labels.process_exporter.node_selector_key }}: {{ .Values.labels.process_exporter.node_selector_value }} +{{ end }} hostNetwork: true hostPID: true initContainers: diff --git a/prometheus-process-exporter/values.yaml b/prometheus-process-exporter/values.yaml index 090870a67..78c0ae2fc 100644 --- a/prometheus-process-exporter/values.yaml +++ b/prometheus-process-exporter/values.yaml @@ -79,6 +79,14 @@ pod: limits: memory: "1024Mi" cpu: "2000m" + tolerations: + process_exporter: + enabled: false + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + - key: node-role.kubernetes.io/node + operator: Exists dependencies: dynamic: