Use 0.0.0.0 as otlp receiver default address
Component(s)
collector
Is your feature request related to a problem? Please describe.
The 0.104.0 collector release enables component.UseLocalHostAsDefaultHost by default. Since this would be a breaking change for the users, the operator in 0.104.0 reverts this change by updating fields like :4317 or empty fields to 0.0.0.0:4317.
Describe the solution you'd like
Maybe it does make sense to use the collector default localhost in sidecar scenarios and the $POD_IP for all the other modes.
Update
Add upgrade routine and default webhook entry for the following components(source https://github.com/open-telemetry/opentelemetry-collector/issues/8510#issuecomment-1735292387):
- [ ] otlp receiver
- [ ] healtcheck extension
- [ ] awsproxy extension
- [ ] jmx receiver
- [ ] loki receiver
- [ ] jaeger receiver
- [ ] zipkin receiver
- [ ] awsxray receiver
- [ ] influxdb receiver
- [ ] awsfirehose receiver
- [ ] opencensus receiver
- [ ] skywalking receiver
Next:
- [ ] Double check if we miss some components
- [ ] Add upgrade routine to remove
component.UseLocalHostAsDefaultHostfeature-gate. - [ ] Remove
component.UseLocalHostAsDefaultHostfrom defaulting webhook
Describe alternatives you've considered
Keep it like it is today or disable the component.UseLocalHostAsDefaultHost featuregate. (Which will be removed in the future).
Additional context
https://github.com/open-telemetry/opentelemetry-operator/pull/3119#discussion_r1674716212
cc @jaronoff97 @pavolloffay @swiatekm
$POD_IP makes more sense than 0:0:0:0 but I don't know if there is a big difference for deployment/SS pods, but maybe it matters more in e.g. daemonset .
For services running in kubernetes, the norm is to bind to the 0 address. Binding to pod_ip may be slightly more secure since it is a smaller surface area, but it could result in unexpected behavior, such as when using kubectl port-forward. As a user I would prefer binding to the 0 address by default for convention / convenience.
Something you want to work on @led0nk? :)
Yes, please
Does it make sense to hide this behaviour behind a feature gate on the operator that we enable once we disable the component.UseLocalHostAsDefaultHost feature gate on the collector?
cc @pavolloffay @swiatekm @jaronoff97
would this featuregate be enabled by default and eventually removed?
It should be enabled by default once component.UseLocalHostAsDefaultHost is removed on the collector side.