Skip to content
Snippets Groups Projects
Unverified Commit 272ff23c authored by paulfantom's avatar paulfantom
Browse files

make node_exporter pods tolerate every taint

parent 33523d04
No related branches found
No related tags found
No related merge requests found
...@@ -66,14 +66,8 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; ...@@ -66,14 +66,8 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
local podLabels = { app: 'node-exporter' }; local podLabels = { app: 'node-exporter' };
local noExecuteToleration = toleration.new() + local existsToleration = toleration.new() +
toleration.withOperator('Exists') + toleration.withOperator('Exists')
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');
local procVolumeMount = containerVolumeMount.new(procVolumeName, '/host/proc'); local procVolumeMount = containerVolumeMount.new(procVolumeName, '/host/proc');
...@@ -136,7 +130,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; ...@@ -136,7 +130,7 @@ local k = import 'ksonnet/ksonnet.beta.4/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([noExecuteToleration, noScheduleToleration]) + daemonset.mixin.spec.template.spec.withTolerations([existsToleration]) +
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]) +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment