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

Use 0.0.0.0 as otlp receiver default address #3147

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

frzifus
Copy link
Member

@frzifus frzifus commented Jul 18, 2024

Description:

  • Adds a feature gate operator.collector.UseLocalHostAsDefaultHost that, when enabled, binds unspecified receiver listener addresses to all interfaces
  • Contains impl. for OTLP Receiver

Link to tracking Issue(s):

Testing:

Documentation:

@frzifus
Copy link
Member Author

frzifus commented Jul 18, 2024

Something like this @jaronoff97.

@frzifus frzifus force-pushed the enable_localhost_fg_otlp_#3126 branch from fce3654 to 58c3095 Compare July 18, 2024 13:47
@frzifus frzifus force-pushed the enable_localhost_fg_otlp_#3126 branch from 58c3095 to e8a218e Compare July 18, 2024 13:49

// defaultOTLPAddress binds configured otlp receivers to 0.0.0.0 if nothing else
// is explicitly defined.
func defaultOTLPAddress(otelcol *OpenTelemetryCollector) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is kinda similar to the logic i have for the parsers, im wondering if we could reuse that in the defaulting webhook? like we could have the parsers return the default config and set that in the default webhook?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that makes sense. In case we agree on the general idea, I will spend some time to build it into that. 😃

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah i think the general idea makes sense to me, i think doing it in the parsers with the introduction of a new method should be pretty clean

Copy link
Member Author

Choose a reason for hiding this comment

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

@jaronoff97 you may want to have a look on the part changed in internal/components.

Its just a draft. What I like is that the component parser becomes a bit more flexible. What I do not like is that components.WithPortMapping has no effect on the default. From my point of view that could lead to confusion.

On the other hand I do not want to glue some magic defaulting into the ComponentPortParser which only has the intention to parse ports.

Any recommendations?

@frzifus frzifus changed the title featuregate: binds unspecified receiver listener addresses to all interfaces Use 0.0.0.0 as otlp receiver default address Jul 19, 2024
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.

2 participants