Skip to content

Commit 48f5370

Browse files
committed
🤦
1 parent 060b309 commit 48f5370

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

charts/k8s-monitoring/charts/feature-pod-logs/tests/default_test.yaml

+14-14
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ tests:
5858
target_label = "job"
5959
}
6060
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+
6175
// explicitly set service_name. if not set, loki will automatically try to populate a default.
6276
// see https://grafana.com/docs/loki/latest/get-started/labels/#default-labels-for-all-users
6377
//
@@ -79,20 +93,6 @@ tests:
7993
replacement = "$1"
8094
target_label = "service_name"
8195
}
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-
}
9696
}
9797
9898
discovery.kubernetes "pods" {

0 commit comments

Comments
 (0)