File tree 1 file changed +14
-14
lines changed
charts/k8s-monitoring/charts/feature-pod-logs/tests
1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,20 @@ tests:
58
58
target_label = "job"
59
59
}
60
60
61
+ // make all labels on the pod available to the pipeline as labels,
62
+ // they are omitted before write to loki via stage.label_keep unless explicitly set
63
+ rule {
64
+ action = "labelmap"
65
+ regex = "__meta_kubernetes_pod_label_(.+)"
66
+ }
67
+
68
+ // make all annotations on the pod available to the pipeline as labels,
69
+ // they are omitted before write to loki via stage.label_keep unless explicitly set
70
+ rule {
71
+ action = "labelmap"
72
+ regex = "__meta_kubernetes_pod_annotation_(.+)"
73
+ }
74
+
61
75
// explicitly set service_name. if not set, loki will automatically try to populate a default.
62
76
// see https://grafana.com/docs/loki/latest/get-started/labels/#default-labels-for-all-users
63
77
//
@@ -79,20 +93,6 @@ tests:
79
93
replacement = "$1"
80
94
target_label = "service_name"
81
95
}
82
-
83
- // make all labels on the pod available to the pipeline as labels,
84
- // they are omitted before write to loki via stage.label_keep unless explicitly set
85
- rule {
86
- action = "labelmap"
87
- regex = "__meta_kubernetes_pod_label_(.+)"
88
- }
89
-
90
- // make all annotations on the pod available to the pipeline as labels,
91
- // they are omitted before write to loki via stage.label_keep unless explicitly set
92
- rule {
93
- action = "labelmap"
94
- regex = "__meta_kubernetes_pod_annotation_(.+)"
95
- }
96
96
}
97
97
98
98
discovery.kubernetes "pods" {
You can’t perform that action at this time.
0 commit comments