From e8086534c197acc5e83e1767b0e6e4ea7ee1e146 Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Wed, 15 Jan 2025 16:59:59 -0800 Subject: [PATCH] Ensure the instance name is constant across pod restarts --- tests/fixture/tmpnet/yaml/prometheus-agent.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/fixture/tmpnet/yaml/prometheus-agent.yaml b/tests/fixture/tmpnet/yaml/prometheus-agent.yaml index 5f05c3bd3b64..de06da6046ce 100644 --- a/tests/fixture/tmpnet/yaml/prometheus-agent.yaml +++ b/tests/fixture/tmpnet/yaml/prometheus-agent.yaml @@ -71,8 +71,9 @@ data: # TODO(marun) Configure the port via an annotation replacement: $1:9650 target_label: __address__ + # Set the instance label to the pod name to ensure a stable identity across restarts. - source_labels: [__meta_kubernetes_pod_name] - target_label: pod + target_label: instance - source_labels: [__meta_kubernetes_namespace] target_label: namespace - source_labels: [__meta_kubernetes_pod_node_name]