-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the httpsprovider component #6683
Add the httpsprovider component #6683
Conversation
Codecov ReportBase: 90.38% // Head: 90.38% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #6683 +/- ##
=======================================
Coverage 90.38% 90.38%
=======================================
Files 243 245 +2
Lines 14575 14638 +63
=======================================
+ Hits 13173 13230 +57
- Misses 1133 1139 +6
Partials 269 269
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having read through the code a bit, I would prefer the optional settings to be configurable via flags like:
otelcol --tls-ca-cert-path=file://infra/testinfra:named=testenv
--tls-ca-cert-path=file://infra/prodinfra:named=prodenv
--config=https://internal.infra.io/config:tls-bundle=testenv
However, I am not sure how feasible that might be.
From the SIG, let's have a first PR with an https provider without any configurable parameters and move the discussion on how to configure a confmap provider to an issue. |
04bc6e3
to
9d3e66a
Compare
29723df
to
9d804d8
Compare
86c1fcd
to
9ba23b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one very small comment otherwise LGTM
confmap/provider/internal/configurablehttpprovider/provider_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple minor doc comments. Not a big fan of configurablehttpprovider
as a package name, but it's internal and easy to change so not blocking here.
ca7e6be
to
f01173e
Compare
@codeboten, @bogdandrutu and @dmitryax, is there anything that I can do to get this merged? |
Add the httpsprovider component that allows the collector to fetch configuration from a web server using the https protocol. Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
Improve unit tests to check for error while parsing test URL. Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
f01173e
to
0adcd04
Compare
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Description: Add the httpsprovider component that allows the collector to load configuration from HTTP servers using the HTTPS protocol.
This PR is based on this work junhaoyu-aws#4
A bit of refactoring was made and an internal configurablehttpprovider was created. This component is used by both the httpsprovider and the httpprovider. The only difference is the configuration of the transport layer.
Testing: Unit tests using httptest and self signed certificates were added.
Documentation: A readme was added for the httpsprovider component.