Skip to content
Snippets Groups Projects
Commit 182e2654 authored by woodsaj's avatar woodsaj
Browse files

dont add pods twice if they have app and name labels

issue #313
parent 6362534d
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,10 @@ data:
regex: ^$
source_labels:
- __meta_kubernetes_pod_label_app
- action: drop
regex: .+
source_labels:
- __meta_kubernetes_pod_label_name
- action: replace
replacement: $1
separator: /
......
......@@ -129,6 +129,14 @@ k {
regex: '^$',
},
// Drop pods with a 'name' and an 'app' label. They will have already been added by
// the scrape_config that matches on the 'name' label
{
source_labels: ['__meta_kubernetes_pod_label_name'],
action: 'drop',
regex: '.+',
},
// Rename jobs to be <namespace>/<app, from pod app label>
{
source_labels: ['__meta_kubernetes_namespace', '__meta_kubernetes_pod_label_app'],
......
......@@ -65,6 +65,10 @@ data:
regex: ^$
source_labels:
- __meta_kubernetes_pod_label_app
- action: drop
regex: .+
source_labels:
- __meta_kubernetes_pod_label_name
- action: replace
replacement: $1
separator: /
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment