Remove EC2-compat label stamping from ServiceMonitor after EC2 scrape decommission

Open
#122 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, kubernetes

Research direction

After EC2 scraping is decommissioned and dashboards have migrated, start in internal/controller/nodedeployment/monitoring.go at endpointSpec. Run TestGenerateServiceMonitor_OnlyEC2CompatWhenNothingDerivable and TestGenerateServiceMonitor_EC2CompatLabels, then update them after removing the two compat metricRelabelings entries and their TODO comment. Done means the generated ServiceMonitor no longer stamps instance_name or public_dns.

Written by the indexing model from the issue text.

Description

Context

To let our grafana dashboards show a unified view across EC2-scraped and k8s-scraped sei nodes during the migration, the controller-emitted ServiceMonitor currently stamps two legacy EC2 labels onto every k8s-scraped sample:

  • instance_name ← copy of the pod label
  • public_dns ← copy of the pod label

See internal/controller/nodedeployment/monitoring.go (endpointSpec). These were added in #122 to unblock the v6-5 soak on k8s while EC2 scrapes remain live.

Cleanup trigger

Once EC2 scraping for sei-chain nodes is fully decommissioned:

  1. Migrate dashboards off instance_name / public_dns to pod (or whatever k8s-native identity label we settle on).
  2. Delete the two compat metricRelabelings entries and their TODO comment in endpointSpec.
  3. Update TestGenerateServiceMonitor_OnlyEC2CompatWhenNothingDerivable and TestGenerateServiceMonitor_EC2CompatLabels accordingly.

The stamping is semantically dishonest (public_dns on a pod is not a DNS name), so we do want to clean it up rather than leave it permanently.

Dominant language
Go
Stars
1
Forks
2
Avg merge
2h 29m
Merged PRs (30d)
56

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sei-protocol/sei-k8s-controller

All issues in sei-protocol/sei-k8s-controller

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.