Skip to content

Refactor EC2 Service discovery#6744

Merged
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
mviswanathsai:sc-refactor--ec2sd
Aug 14, 2024
Merged

Refactor EC2 Service discovery#6744
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
mviswanathsai:sc-refactor--ec2sd

Conversation

@mviswanathsai
Copy link
Contributor

Description

This PR refactors any inconsistencies in the EC2 service discovery. This PR also adds HTTP client configuration (Auth, OAuth2, BasicAuth, EnableHTTP, AllowRedirects) fields that have been part of EC2 SD since Prometheus v2.41.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

Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.

Add HTTP client configuration support to EC2 Service Discovery

@mviswanathsai mviswanathsai requested a review from a team as a code owner July 9, 2024 10:20
@mviswanathsai
Copy link
Contributor Author

PTAL @slashpai

@mviswanathsai mviswanathsai requested a review from slashpai July 10, 2024 09:08
@mviswanathsai mviswanathsai force-pushed the sc-refactor--ec2sd branch 3 times, most recently from ecdc786 to 227fdfa Compare August 1, 2024 14:30
@mviswanathsai
Copy link
Contributor Author

error: fmt command failed: parsing githubPullsIssues Regex: pulls API request failed. status code: 403

@simonpasquier is this possibly a consequence of #6789?

@simonpasquier
Copy link
Contributor

That's another issue to be solved unfortunately.

Copy link
Contributor

Choose a reason for hiding this comment

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

thoughts for later: if we keep adding validation tests for ScrapeConfig (which is def. good!), it might be more readable to split into sub-test functions for each SD.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. Let me make a PR right after this gets merged to make that change.

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!

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