Match both K8s and K3s Traefik services

This commit is contained in:
Carlos de Paula 2019-08-22 19:01:42 -03:00
parent cee63c15f5
commit 9d254345ad

View File

@ -15,22 +15,22 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
apiVersion: 'monitoring.coreos.com/v1', apiVersion: 'monitoring.coreos.com/v1',
kind: 'ServiceMonitor', kind: 'ServiceMonitor',
metadata: { metadata: {
name: 'traefik-ingress-lb', name: 'traefik',
namespace: $._config.namespace, namespace: $._config.namespace,
labels: { labels: {
'k8s-app': 'traefik-ingress-lb', 'app': 'traefik',
}, },
}, },
spec: { spec: {
jobLabel: 'k8s-app', jobLabel: 'traefik-exporter',
selector: { selector: {
matchLabels: { matchLabels: {
'k8s-app': 'traefik-ingress-lb', 'app': 'traefik',
}, },
}, },
endpoints: [ endpoints: [
{ {
port: 'admin', port: 'metrics',
scheme: 'http', scheme: 'http',
interval: '30s', interval: '30s',
}, },