mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-31 19:31:23 +02:00
remove version label from node-exporter selectors
This commit is contained in:
parent
cf7bb8706c
commit
0d907098ae
@ -69,6 +69,11 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
local containerEnv = container.envType;
|
||||
|
||||
local podLabels = $._config.nodeExporter.labels;
|
||||
local selectorLabels = {
|
||||
[labelName]: $._config.nodeExporter.labels[labelName]
|
||||
for labelName in std.objectFields($._config.nodeExporter.labels)
|
||||
if !std.setMember(labelName, ['app.kubernetes.io/version'])
|
||||
};
|
||||
|
||||
local existsToleration = toleration.new() +
|
||||
toleration.withOperator('Exists');
|
||||
@ -133,7 +138,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
daemonset.mixin.metadata.withName('node-exporter') +
|
||||
daemonset.mixin.metadata.withNamespace($._config.namespace) +
|
||||
daemonset.mixin.metadata.withLabels(podLabels) +
|
||||
daemonset.mixin.spec.selector.withMatchLabels(podLabels) +
|
||||
daemonset.mixin.spec.selector.withMatchLabels(selectorLabels) +
|
||||
daemonset.mixin.spec.template.metadata.withLabels(podLabels) +
|
||||
daemonset.mixin.spec.template.spec.withTolerations([existsToleration]) +
|
||||
daemonset.mixin.spec.template.spec.withNodeSelector({ 'kubernetes.io/os': 'linux' }) +
|
||||
|
Loading…
x
Reference in New Issue
Block a user