Skip to content

Feat: add maximum version to EC2 and Lightsail SD#8175

Merged
simonpasquier merged 9 commits intoprometheus-operator:mainfrom
nutmos:feat/disable-ec2-lightsail-sd-prom-3.8
Dec 18, 2025
Merged

Feat: add maximum version to EC2 and Lightsail SD#8175
simonpasquier merged 9 commits intoprometheus-operator:mainfrom
nutmos:feat/disable-ec2-lightsail-sd-prom-3.8

Conversation

@nutmos
Copy link
Contributor

@nutmos nutmos commented Dec 13, 2025

Description

Since version 3.8.0, EC2 and Lightsail SDs are combined into AWS SD.

This PR adds logic to remove EC2 and Lightsail SDs when running on Prometheus >= 3.8.0.

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Verification

E2E Test Cases

Changelog entry

- Remove EC2 and Lightsail Service Discovery when running on Prometheus 3.8.0 or newer version.

@nutmos nutmos requested a review from a team as a code owner December 13, 2025 03:17
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should rather reject the ScrapeConfigs in pkg/prometheus/resource_selector.go

@nutmos nutmos requested a review from simonpasquier December 18, 2025 12:54
@nutmos
Copy link
Contributor Author

nutmos commented Dec 18, 2025

@simonpasquier Updated, please review

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Is there any way that we can convert EC2/Lightsail SD configs to the new AWS SD config?

@simonpasquier simonpasquier merged commit 0016522 into prometheus-operator:main Dec 18, 2025
22 checks passed
@nutmos
Copy link
Contributor Author

nutmos commented Dec 18, 2025

@simonpasquier Let me try to explore it. Almost all configs are the same. I'll open a new PR to try it out.

@clux
Copy link

clux commented Jan 21, 2026

fyi i have raised an issue about this in #8305 because i think this version gating might be premature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants