Allow nodeExporter address to be configured

This commit is contained in:
Kristoffer Dalby
2020-06-21 08:28:48 +01:00
parent 6f488250fd
commit 6b4bc0bb26

View File

@@ -15,6 +15,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
},
nodeExporter+:: {
listenAddress: '127.0.0.1',
port: 9100,
labels: {
'app.kubernetes.io/name': 'node-exporter',
@@ -95,7 +96,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
local nodeExporter =
container.new('node-exporter', $._config.imageRepos.nodeExporter + ':' + $._config.versions.nodeExporter) +
container.withArgs([
'--web.listen-address=127.0.0.1:' + $._config.nodeExporter.port,
'--web.listen-address=' + std.join(':', [$._config.nodeExporter.listenAddress, $._config.nodeExporter.port]),
'--path.procfs=/host/proc',
'--path.sysfs=/host/sys',
'--path.rootfs=/host/root',