Running agents on all nodes.

Using a node selector can not run the fluent-bit or node-exporter
on the master node. So, This PS changes the scheduling to use
either taint/toleration or the node selector.

Change-Id: I0ca80a6e645b7047469288697387f0f5bf111345
This commit is contained in:
Seungkyu Ahn 2018-07-05 03:43:10 +00:00
parent c0c5199fb2
commit 6b6f277e7d
4 changed files with 20 additions and 0 deletions

View File

@ -91,8 +91,16 @@ spec:
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec:
serviceAccountName: {{ $serviceAccountName }}
{{ if .Values.labels.fluentbit.tolerations }}
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
- key: node-role.kubernetes.io/node
operator: Exists
{{ else }}
nodeSelector:
{{ .Values.labels.fluentbit.node_selector_key }}: {{ .Values.labels.fluentbit.node_selector_value | quote }}
{{ end }}
hostNetwork: true
hostPID: true
dnsPolicy: ClusterFirstWithHostNet

View File

@ -23,8 +23,10 @@ labels:
node_selector_key: openstack-control-plane
node_selector_value: enabled
fluentbit:
#(NOTE:seungkyua): when tolerations is true, nodeSelector will be disabled.
node_selector_key: openstack-control-plane
node_selector_value: enabled
tolerations: false
prometheus_fluentd_exporter:
node_selector_key: openstack-control-plane
node_selector_value: enabled

View File

@ -52,8 +52,16 @@ spec:
namespace: {{ .Values.endpoints.node_metrics.namespace }}
spec:
serviceAccountName: {{ $serviceAccountName }}
{{ if .Values.labels.node_exporter.tolerations }}
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
- key: node-role.kubernetes.io/node
operator: Exists
{{ else }}
nodeSelector:
{{ .Values.labels.node_exporter.node_selector_key }}: {{ .Values.labels.node_exporter.node_selector_value | quote }}
{{ end }}
hostNetwork: true
hostPID: true
initContainers:

View File

@ -29,9 +29,11 @@ images:
- image_repo_sync
labels:
#(NOTE:seungkyua): when tolerations is true, nodeSelector will be disabled.
node_exporter:
node_selector_key: openstack-control-plane
node_selector_value: enabled
tolerations: false
job:
node_selector_key: openstack-control-plane
node_selector_value: enabled