Skip to content
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 otlp grpc and http to be enabled with TLS on monolithic #977

Merged

Conversation

rubenvp8510
Copy link
Collaborator

@rubenvp8510 rubenvp8510 commented Jul 10, 2024

Fixes #976

@rubenvp8510 rubenvp8510 changed the title Allow otlp grpc and http to be enabled with TLS Allow otlp grpc and http to be enabled with TLS on monolithic Jul 10, 2024
@rubenvp8510 rubenvp8510 force-pushed the fix_tls_monolithic_both_enabled branch 2 times, most recently from ec7b1cb to 990f535 Compare July 10, 2024 17:13
@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 90.62500% with 3 lines in your changes missing coverage. Please review.

Project coverage is 73.23%. Comparing base (75de22c) to head (0e4a8c4).

Files Patch % Lines
internal/manifests/manifestutils/tls.go 90.90% 1 Missing and 1 partial ⚠️
internal/manifests/monolithic/statefulset.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #977   +/-   ##
=======================================
  Coverage   73.22%   73.23%           
=======================================
  Files         105      105           
  Lines        6503     6512    +9     
=======================================
+ Hits         4762     4769    +7     
- Misses       1450     1451    +1     
- Partials      291      292    +1     
Flag Coverage Δ
unittests 73.23% <90.62%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rubenvp8510 rubenvp8510 force-pushed the fix_tls_monolithic_both_enabled branch 4 times, most recently from 8b3b70b to 7bb9fd5 Compare July 11, 2024 06:56
@rubenvp8510 rubenvp8510 force-pushed the fix_tls_monolithic_both_enabled branch from 7bb9fd5 to 33abac3 Compare July 11, 2024 13:31
Comment on lines 31 to 32
hasVolume := containsVolume(pod, caConfigMap)
if !hasVolume {
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about?

Suggested change
hasVolume := containsVolume(pod, caConfigMap)
if !hasVolume {
if !containsVolume(pod, caConfigMap) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's fine. I can do the change

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed! thanks for the review!

// ReceiverHTTPTLSCADir is the path that is mounted from the configmap for TLS for receiver.
ReceiverHTTPTLSCADir = "/var/run/ca-receiver/http"
// ReceiverHTTPTLSCertDir returns the mount path of the receivers certificates (for ingesting traces).
ReceiverHTTPTLSCertDir = TLSDir + "/receiver/http"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wht don't we use path.Join here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can but I don't think we need it, this are constants, we don't need to deal with double slashes, empty strings etc..

@rubenvp8510 rubenvp8510 force-pushed the fix_tls_monolithic_both_enabled branch from 95eb3c1 to 0e4a8c4 Compare July 11, 2024 21:52
@pavolloffay pavolloffay merged commit 89d1bb7 into grafana:main Jul 12, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid statefulset when monolithic is deployed with receiver TLS enable both protocols
4 participants