Refactor HTTP Service Discovery#6800
Conversation
|
Not sure why |
httpsd was one of the first SD added to scrapeconfig IIRC it must have added required fields at that moment, thanks for adding rest |
|
I will re-base once the EC2 PR is merged and add CRD validation tests for HTTPSDConfigs. |
|
I will re-base as soon as we are happy with the changes and the PR for subtests is merged! |
57b6339 to
4553b7c
Compare
4553b7c to
6e2b2d1
Compare
|
Another merge conflict appeared :) |
6e2b2d1 to
c30c3ad
Compare
|
Conflicts resolved. PTAL @simonpasquier |
simonpasquier
left a comment
There was a problem hiding this comment.
LGTM, a few nits only.
test/e2e/scrapeconfig_test.go
Outdated
| scrapeConfigSpec: monitoringv1alpha1.ScrapeConfigSpec{ | ||
| HTTPSDConfigs: []monitoringv1alpha1.HTTPSDConfig{ | ||
| { | ||
| URL: "http://valid-url", |
There was a problem hiding this comment.
(nit) a good habit is to use reserved top-level domains for tests and documentation (the existing code base doesn't apply this recommendation though!).
| URL: "http://valid-url", | |
| URL: "http://valid.test", |
There was a problem hiding this comment.
Hmm... maybe we can just log an issue for that, it would make a good first-issue IMO.
6d6a90c to
5e9a3c9
Compare
|
Can't quite understand the unit-tests failing. |
|
The test case seems right to me Can't see why we get logs from |
|
At the |
5e9a3c9 to
2697e50
Compare
Description
This PR refactors the HTTP Service Discovery, adds new test cases for unit tests.
PR also adds
OAuth2,FollowRedirectsandEnableHTTP2fields to the HTTP service discovery.Generic API validation e2e tests are yet to be added.
Closes #6798
Type of change
What type of changes does your code introduce to the Prometheus operator? Put an
xin 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.