mirror of
https://github.com/carlosedp/cluster-monitoring.git
synced 2024-11-20 19:07:17 +01:00
Match both K8s and K3s Traefik services
This commit is contained in:
parent
cee63c15f5
commit
9d254345ad
@ -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',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user