Skip to content

Conversation

@echlebek
Copy link
Contributor

@echlebek echlebek commented Oct 15, 2025

This commit sets GODEBUG=netdns=go in deployments, jobs and statefulsets, selecting the netgo DNS resolver instead of the cgo resolver that is made available by the operating system. Previously, we relied on the collector to be built with only the netgo resolver. However, future releases of the collector will include both DNS resolvers, and a known issue in k8s collection requires the use of the netgo resolver.

This commit sets GODEBUG=netdns=go in Chart.yaml, selecting the netgo
DNS resolver instead of the cgo resolver that is made available by the
operating system. Previously, we relied on the collector to be built
with only the netgo resolver. However, future releases of the collector
will include both DNS resolvers, and a known issue in k8s collection
requires the use of the netgo resolver.

Signed-off-by: Eric Chlebek <[email protected]>
@echlebek echlebek requested a review from a team as a code owner October 15, 2025 19:51
Signed-off-by: Eric Chlebek <[email protected]>
Sets GODEBUG=netdns=go everywhere Go programs are making use of the
network, in jobs, deployments and statefulsets.

Signed-off-by: Eric Chlebek <[email protected]>
Signed-off-by: Eric Chlebek <[email protected]>
@echlebek echlebek changed the title chore: set GODEBUG=netdns=go in Chart.yaml chore: set GODEBUG=netdns=go in most environments Oct 28, 2025
@echlebek
Copy link
Contributor Author

I need to fix up the goldenfiles for all these objects, but the unexpected inclusion from the test's POV does prove that the changes are effectful.

@ccressent
Copy link

Are you not missing at least the daemonset pods? i.e. I was expecting this section to be touched too. There might be others.

Since the equivalent effect used to be part of the Sumologic collector build process, why not add this environment variable to the Sumologic collector Docker images? That way you know you won't be missing a spot in any of the k8s manifests and you will also fix it for the images themselves, not just their use within a k8s environment.

Also, keep in mind that the images used in those Daemonsets, Statefulsets, ... are configurable in the chart's values. They default to using the. Sumologic collector images we release, but in principle one could set them to something else that might not want your enforced variable. To me, this points to setting the variable in the container image itself being a better approach instead of "blindly" in the k8s manifest. A single ENV instruction in the relevant Dockerfiles should do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants