-
Notifications
You must be signed in to change notification settings - Fork 2.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
allow use of secure gRPC connections between agent and collector #1311
Conversation
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.
lgtm
Looks like an unrelated test is now failing in CI: |
possibly, I restarted the build to see. |
Confirmed flaky test - #1314 |
@ghouscht what is your action plan with this PR? Are you going to add the equivalent settings to the collector? |
Yes, today I wrote some very basic unit tests for the agent part (just flags and ProxyBuilder). |
Codecov Report
@@ Coverage Diff @@
## master #1311 +/- ##
==========================================
- Coverage 100% 99.97% -0.03%
==========================================
Files 164 164
Lines 7453 7488 +35
==========================================
+ Hits 7453 7486 +33
- Misses 0 1 +1
- Partials 0 1 +1
Continue to review full report at Codecov.
|
Code for the collector part now also finished. Tested it on my local machine and seems to work well. things left TODO:
|
loading certs from a file in /tmp might be a good way to unit test the initialization paths |
Added pkg/testutils/certificate.go, maybe a bit overkill at the moment. But this method could be used too for an e2e/integration test where a cert and key is needed. Do you think there is anything left which needs to be done? E2E test or tests for the initialization paths of the collector in cmd/collector/main.go (currently no tests at all for this part of the code)? |
we do have integration tests running binaries, |
Cleaned up the PR and removed the certificate stuff. |
You'll probably want to add a ssl trusted roots bundle to the jaeger-agent docker image, similar to what already exists in jaeger-collector's Dockerfile: --- a/cmd/agent/Dockerfile
+++ b/cmd/agent/Dockerfile
@@ -1,5 +1,10 @@
+FROM alpine:latest as certs
+RUN apk add --update --no-cache ca-certificates
+
FROM scratch
+COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
+
EXPOSE 5775/udp 6831/udp 6832/udp 5778
COPY agent-linux /go/bin/
-ENTRYPOINT ["/go/bin/agent-linux"]
+ENTRYPOINT ["/go/bin/agent-linux", "--reporter.grpc.tls.ca=/etc/ssl/certs/ca-certificates.crt"] |
@yurishkuro how to proceed now with this PR? |
Signed-off-by: Thomas Gosteli <thomas.gosteli@protonmail.ch>
Signed-off-by: Thomas Gosteli <thomas.gosteli@postfinance.ch>
Looks like an unrelated test is failing again? What about coverage, is it ok like this? |
The coverage should remain at 100%. |
@ghouscht I fixed coverage by adding one more test (#1391). I can get it approved and merged tomorrow, or you can merge it into your branch, and then we can merge this PR. NB: in the future I recommend not committing directly to master in your fork, but creating a branch (as I did in #1391). Had you done that, I would've been able to push these extra commits directly into your branch and update this PR automatically. |
I'm out of the office today. Will merge the changes into my branch tomorrow and squash the commits together. |
merged as #1391 |
Which problem is this PR solving?
Resolves #1310
Short description of the changes
Implementation for a secure gRPC connection between the agent and the collector.