rpi.carlosedp.cluster-monit.../traefik.jsonnet

47 lines
1.0 KiB
Plaintext
Raw Normal View History

2019-02-01 14:43:22 +01:00
local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
2019-02-27 13:28:00 +01:00
{
2019-02-01 14:43:22 +01:00
_config+:: {
namespace: 'monitoring',
2019-02-27 13:28:00 +01:00
// Add custom dashboards
grafanaDashboards+:: {
2019-03-13 22:44:01 +01:00
'traefik-dashboard.json': (import 'grafana-dashboards/traefik-dashboard.json'),
2019-02-27 13:28:00 +01:00
},
2019-02-01 14:43:22 +01:00
},
traefikExporter+:: {
2019-02-01 14:43:22 +01:00
serviceMonitor:
{
apiVersion: 'monitoring.coreos.com/v1',
kind: 'ServiceMonitor',
metadata: {
2019-02-27 13:28:00 +01:00
name: 'traefik-ingress-lb',
namespace: $._config.namespace,
labels: {
'k8s-app': 'traefik-ingress-lb',
},
2019-02-01 14:43:22 +01:00
},
spec: {
2019-02-27 13:28:00 +01:00
jobLabel: 'k8s-app',
selector: {
matchLabels: {
'k8s-app': 'traefik-ingress-lb',
2019-02-01 14:43:22 +01:00
},
2019-02-27 13:28:00 +01:00
},
endpoints: [
{
port: 'admin',
scheme: 'http',
interval: '30s',
2019-02-01 14:43:22 +01:00
},
2019-02-27 13:28:00 +01:00
],
namespaceSelector: {
matchNames: [
'kube-system',
2019-03-13 22:44:01 +01:00
],
2019-02-27 13:28:00 +01:00
},
2019-02-01 14:43:22 +01:00
},
},
},
2019-03-13 22:44:01 +01:00
}