Skip to content

Commit

Permalink
Ensure the instance name is constant across pod restarts
Browse files Browse the repository at this point in the history
  • Loading branch information
maru-ava committed Jan 16, 2025
1 parent 513a7c4 commit e808653
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/fixture/tmpnet/yaml/prometheus-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit e808653

Please sign in to comment.