mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-26 17:01:50 +02:00
kube-prometheus: node-exporter tolerates any node
This commit is contained in:
parent
7f8bd68e03
commit
f0438e7f80
@ -66,9 +66,13 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
|
|||||||
|
|
||||||
local podLabels = { app: 'node-exporter' };
|
local podLabels = { app: 'node-exporter' };
|
||||||
|
|
||||||
local masterToleration = toleration.new() +
|
local noExecuteToleration = toleration.new() +
|
||||||
toleration.withEffect('NoSchedule') +
|
toleration.withOperator('Exists') +
|
||||||
toleration.withKey('node-role.kubernetes.io/master');
|
toleration.withEffect('NoExecute');
|
||||||
|
|
||||||
|
local noScheduleToleration = toleration.new() +
|
||||||
|
toleration.withOperator('Exists') +
|
||||||
|
toleration.withEffect('NoSchedule');
|
||||||
|
|
||||||
local procVolumeName = 'proc';
|
local procVolumeName = 'proc';
|
||||||
local procVolume = volume.fromHostPath(procVolumeName, '/proc');
|
local procVolume = volume.fromHostPath(procVolumeName, '/proc');
|
||||||
@ -132,7 +136,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
|
|||||||
daemonset.mixin.metadata.withLabels(podLabels) +
|
daemonset.mixin.metadata.withLabels(podLabels) +
|
||||||
daemonset.mixin.spec.selector.withMatchLabels(podLabels) +
|
daemonset.mixin.spec.selector.withMatchLabels(podLabels) +
|
||||||
daemonset.mixin.spec.template.metadata.withLabels(podLabels) +
|
daemonset.mixin.spec.template.metadata.withLabels(podLabels) +
|
||||||
daemonset.mixin.spec.template.spec.withTolerations([masterToleration]) +
|
daemonset.mixin.spec.template.spec.withTolerations([noExecuteToleration, noScheduleToleration]) +
|
||||||
daemonset.mixin.spec.template.spec.withNodeSelector({ 'beta.kubernetes.io/os': 'linux' }) +
|
daemonset.mixin.spec.template.spec.withNodeSelector({ 'beta.kubernetes.io/os': 'linux' }) +
|
||||||
daemonset.mixin.spec.template.spec.withContainers(c) +
|
daemonset.mixin.spec.template.spec.withContainers(c) +
|
||||||
daemonset.mixin.spec.template.spec.withVolumes([procVolume, sysVolume, rootVolume]) +
|
daemonset.mixin.spec.template.spec.withVolumes([procVolume, sysVolume, rootVolume]) +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user