accept formatting changes made by jsonnetfmt
This commit is contained in:
@@ -4,19 +4,19 @@
|
||||
|
||||
versions+:: {
|
||||
blackboxExporter: 'v0.18.0',
|
||||
configmapReloader: 'v0.4.0'
|
||||
configmapReloader: 'v0.4.0',
|
||||
},
|
||||
|
||||
imageRepos+:: {
|
||||
blackboxExporter: 'quay.io/prometheus/blackbox-exporter',
|
||||
configmapReloader: 'jimmidyson/configmap-reload'
|
||||
configmapReloader: 'jimmidyson/configmap-reload',
|
||||
},
|
||||
|
||||
resources+:: {
|
||||
'blackbox-exporter': {
|
||||
requests: { cpu: '10m', memory: '20Mi' },
|
||||
limits: { cpu: '20m', memory: '40Mi' },
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
blackboxExporter: {
|
||||
@@ -25,41 +25,41 @@
|
||||
matchLabels: {
|
||||
'app.kubernetes.io/name': 'blackbox-exporter',
|
||||
},
|
||||
assignLabels: self.matchLabels + {
|
||||
'app.kubernetes.io/version': $._config.versions.blackboxExporter
|
||||
assignLabels: self.matchLabels {
|
||||
'app.kubernetes.io/version': $._config.versions.blackboxExporter,
|
||||
},
|
||||
modules: {
|
||||
http_2xx: {
|
||||
prober: 'http'
|
||||
prober: 'http',
|
||||
},
|
||||
http_post_2xx: {
|
||||
prober: 'http',
|
||||
http: {
|
||||
method: 'POST'
|
||||
}
|
||||
method: 'POST',
|
||||
},
|
||||
},
|
||||
tcp_connect: {
|
||||
prober: 'tcp'
|
||||
prober: 'tcp',
|
||||
},
|
||||
pop3s_banner: {
|
||||
prober: 'tcp',
|
||||
tcp: {
|
||||
query_response: [
|
||||
{ expect: '^+OK' }
|
||||
{ expect: '^+OK' },
|
||||
],
|
||||
tls: true,
|
||||
tls_config: {
|
||||
insecure_skip_verify: false
|
||||
}
|
||||
}
|
||||
insecure_skip_verify: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
ssh_banner: {
|
||||
prober: 'tcp',
|
||||
tcp: {
|
||||
query_response: [
|
||||
{ expect: '^SSH-2.0-' }
|
||||
]
|
||||
}
|
||||
{ expect: '^SSH-2.0-' },
|
||||
],
|
||||
},
|
||||
},
|
||||
irc_banner: {
|
||||
prober: 'tcp',
|
||||
@@ -68,15 +68,15 @@
|
||||
{ send: 'NICK prober' },
|
||||
{ send: 'USER prober prober prober :prober' },
|
||||
{ expect: 'PING :([^ ]+)', send: 'PONG ${1}' },
|
||||
{ expect: '^:[^ ]+ 001' }
|
||||
]
|
||||
}
|
||||
{ expect: '^:[^ ]+ 001' },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
privileged:
|
||||
local icmpModules = [self.modules[m] for m in std.objectFields(self.modules) if self.modules[m].prober == 'icmp'];
|
||||
std.length(icmpModules) > 0
|
||||
}
|
||||
std.length(icmpModules) > 0,
|
||||
},
|
||||
},
|
||||
|
||||
blackboxExporter+::
|
||||
@@ -87,11 +87,11 @@
|
||||
kind: 'ConfigMap',
|
||||
metadata: {
|
||||
name: 'blackbox-exporter-configuration',
|
||||
namespace: $._config.namespace
|
||||
namespace: $._config.namespace,
|
||||
},
|
||||
data: {
|
||||
'config.yml': std.manifestYamlDoc({ modules: bb.modules })
|
||||
}
|
||||
'config.yml': std.manifestYamlDoc({ modules: bb.modules }),
|
||||
},
|
||||
},
|
||||
|
||||
serviceAccount: {
|
||||
@@ -127,31 +127,31 @@
|
||||
}],
|
||||
resources: {
|
||||
requests: $._config.resources['blackbox-exporter'].requests,
|
||||
limits: $._config.resources['blackbox-exporter'].limits
|
||||
limits: $._config.resources['blackbox-exporter'].limits,
|
||||
},
|
||||
securityContext: if bb.privileged then {
|
||||
runAsNonRoot: false,
|
||||
capabilities: { drop: [ 'ALL' ], add: [ 'NET_RAW'] }
|
||||
capabilities: { drop: ['ALL'], add: ['NET_RAW'] },
|
||||
} else {
|
||||
runAsNonRoot: true,
|
||||
runAsUser: 65534
|
||||
runAsUser: 65534,
|
||||
},
|
||||
volumeMounts: [{
|
||||
mountPath: '/etc/blackbox_exporter/',
|
||||
name: 'config',
|
||||
readOnly: true
|
||||
}]
|
||||
readOnly: true,
|
||||
}],
|
||||
},
|
||||
{
|
||||
name: 'module-configmap-reloader',
|
||||
image: $._config.imageRepos.configmapReloader + ':' + $._config.versions.configmapReloader,
|
||||
args: [
|
||||
'--webhook-url=http://localhost:' + bb.port + '/-/reload',
|
||||
'--volume-dir=/etc/blackbox_exporter/'
|
||||
'--volume-dir=/etc/blackbox_exporter/',
|
||||
],
|
||||
resources: {
|
||||
requests: $._config.resources['blackbox-exporter'].requests,
|
||||
limits: $._config.resources['blackbox-exporter'].limits
|
||||
limits: $._config.resources['blackbox-exporter'].limits,
|
||||
},
|
||||
securityContext: { runAsNonRoot: true, runAsUser: 65534 },
|
||||
terminationMessagePath: '/dev/termination-log',
|
||||
@@ -159,19 +159,19 @@
|
||||
volumeMounts: [{
|
||||
mountPath: '/etc/blackbox_exporter/',
|
||||
name: 'config',
|
||||
readOnly: true
|
||||
}]
|
||||
}
|
||||
readOnly: true,
|
||||
}],
|
||||
},
|
||||
],
|
||||
nodeSelector: { 'kubernetes.io/os': 'linux' },
|
||||
serviceAccountName: 'blackbox-exporter',
|
||||
volumes: [{
|
||||
name: 'config',
|
||||
configMap: { name: 'blackbox-exporter-configuration' }
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
configMap: { name: 'blackbox-exporter-configuration' },
|
||||
}],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
service: {
|
||||
@@ -185,7 +185,7 @@
|
||||
spec: {
|
||||
ports: [{ name: 'http', port: bb.port, targetPort: 'http' }],
|
||||
selector: bb.matchLabels,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
serviceMonitor:
|
||||
@@ -195,18 +195,18 @@
|
||||
metadata: {
|
||||
name: 'blackbox-exporter',
|
||||
namespace: $._config.namespace,
|
||||
labels: bb.assignLabels
|
||||
labels: bb.assignLabels,
|
||||
},
|
||||
spec: {
|
||||
endpoints: [ {
|
||||
endpoints: [{
|
||||
interval: '30s',
|
||||
path: '/metrics',
|
||||
port: 'http'
|
||||
} ],
|
||||
port: 'http',
|
||||
}],
|
||||
selector: {
|
||||
matchLabels: bb.matchLabels
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
matchLabels: bb.matchLabels,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user