-
Notifications
You must be signed in to change notification settings - Fork 389
feat: add tls block in common/net/config to use in http/grpc block #4082
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
base: main
Are you sure you want to change the base?
feat: add tls block in common/net/config to use in http/grpc block #4082
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.
Hi @fgouteroux , thank you for the PR! Could you please edit the docs for those components to include the new config arguments? It'd be good to also add tests which start those components with TLS enabled and test sending data to them.
One note in addition to paulin's request - we'll also need an entry in the changelog. If you don't have capacity to put the finishing touches on the PR w/ docs & changelog, let us know and we'll try to allocate some capacity to update them. |
@ptodev @dehaansa I try to update doc but I'm not sure I do it well. As this PR update After a quick search into component calling
I would appreciate a review about this in order to be sure that it doesn't break anything. Thanks |
But I think it's more simple to keep in loki-server-http.md as the
Please guide me on what you expect, I will follow your suggestions. |
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.
Nice work, left a couple of suggestions just so we keep it consistent with other components.
I think we can also update converter code too support these new arguments. The one I found was promtail converter. Currently we are rejecting configs that include tls config https://github.com/grafana/alloy/blob/main/internal/converter/internal/common/weaveworks_server.go#L55-L66.
I can update these after the pr is merged if you don't want to or don't have the time to do it
If you can do it, it will be better, I'm in holidays soon. thx. |
@kalleep I applied your suggestions, let me know if missing something. |
It might be simpler, but not consistent with the rest of our docs. We separate
|
@dehaansa doc updated to use block. I also rename |
@fgouteroux There are some doc structure issues with your proposed changes that will cause some issues with the published content. It's a bit difficult to explain in a suggestion box here in the web UI. Do you mind if I check out your fork and make the changes myself and push back to the PR? |
@clayton-cornell yes no worries |
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.
Sorry forgot to submit my review
if h.TLSConfig != nil { | ||
h.TLSConfig.Into(&c.HTTPTLSConfig) | ||
} | ||
if h.TLSConfig.MinVersion != c.MinVersion { | ||
c.MinVersion = h.TLSConfig.MinVersion | ||
} | ||
if h.TLSConfig.CipherSuites != c.CipherSuites { | ||
c.CipherSuites = h.TLSConfig.CipherSuites | ||
} |
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.
if h.TLSConfig != nil { | |
h.TLSConfig.Into(&c.HTTPTLSConfig) | |
} | |
if h.TLSConfig.MinVersion != c.MinVersion { | |
c.MinVersion = h.TLSConfig.MinVersion | |
} | |
if h.TLSConfig.CipherSuites != c.CipherSuites { | |
c.CipherSuites = h.TLSConfig.CipherSuites | |
} | |
if h.TLSConfig != nil { | |
h.TLSConfig.Into(&c.HTTPTLSConfig) | |
if h.TLSConfig.MinVersion != c.MinVersion { | |
c.MinVersion = h.TLSConfig.MinVersion | |
} | |
if h.TLSConfig.CipherSuites != c.CipherSuites { | |
c.CipherSuites = h.TLSConfig.CipherSuites | |
} | |
} |
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.
This will fix the panic you see in tests
@fgouteroux I've reworked the doc structure a bit. We have to be really careful if we include headings in shared content because we can't always guarantee that the heading levels will be right. It's simpler in the long run to keep shared content as a single block of content at a single heading level. So, with rework the topics should look like this for topics that just have HTTP: and this for topics with both gRPC and HTTP: ![]() |
PR Description
Add the
tls
inhttp
andgrpc
block:Which issue(s) this PR fixes
Fixes #1082
Notes to the Reviewer
PR Checklist