open-telemetry / opentelemetry-helm-charts

OpenTelemetry Helm Charts
https://opentelemetry.io
Apache License 2.0
389 stars 468 forks source link

[opentelemetry-operator] Opentelemetry agent network is not well configured when mode is daemonSet #949

Open fabMrc opened 10 months ago

fabMrc commented 10 months ago

HI

When using Operator and apply a Opentelemetry collector using mode=daemonSet, hostNetwork=true and dnsPolicy is ClusterFirst. It does not allow correct dns resolution for all service and pod inside the cluster. For example loki.svc.cluster.local can not be resolved because using this network configuration, it relies on the underlying resolv.conf host and it does not be able to resolve a internal cluster recordset dns. when using hostNetwork true the dnsPolicy must be ClusterFirstWhenHostNet. Currently it is the operator that control the network configuration and set any pod attributes according to mode property value

jinja2 commented 10 months ago

Looks like the operator generates the daemonset manifest and it is not part of the chart itself. I see the operator does set the policy to ClusterFirstWithHostNet for hostNetwork = true when creating the daemonset manifest. I would suggest opening an issue in operator repo with your findings.

fabMrc commented 10 months ago

yes of course thank you

Follow up : https://github.com/open-telemetry/opentelemetry-operator/issues/2357