Bug Description
Hey team, I have Go-based applications and e2e suites, and encountering an issue where DNS resolution for in-cluster k8s services works perfectly when running my application normally, but fails during test execution.
When I run the application to reach a k8s service using its in-cluster DNS record (like <svc_name>.<ns>.svc.cluster.local), it works as expected. However, when running tests via go test, I receive no such host errors, in GoLand plugin. I am able to make the test work if i run mirrord exec -f ".mirrord/mirrord.json" -- go test ./some/files/... However, if i try to debug the tests with GoLand plugin - it fails to reach the host.
I would like to clarify if this is a known limitation of how mirrord interacts with the Go test runner, or if there is a configuration adjustment needed to support this use case.
My mirrord.json looks as follows:
{
"target": "targetless",
"feature": {
"network": {
"dns": true,
"outgoing": {
"tcp": true,
"udp": true
}
},
"fs": "localwithoverrides",
"env": {
"exclude": "KUBERNETES_PORT;KUBERNETES_PORT_*;KUBERNETES_PORT_*_*;KUBERNETES_SERVICE_HOST;KUBERNETES_SERVICE_PORT;KUBERNETES_SERVICE_PORT_*"
}
}
}
Steps to Reproduce
- Copy the mirrord.json file
- Spin up
kind cluster
- deploy sample apps (like nginx)
- Write a simple Go test to see if the nginx is reachable by its DNS record (nginx.nginx-ns.svc) while debugging tests in GoLand
Backtrace
mirrord layer logs
mirrord intproxy logs
mirrord agent logs
mirrord config
mirrord CLI version
No response
mirrord-agent version
No response
mirrord-operator version (if relevant)
No response
plugin kind and version (if relevant)
No response
Your operating system and version
macOS 15.6
Local process
go test
Local process version
No response
Additional Info
No response
Bug Description
Hey team, I have Go-based applications and e2e suites, and encountering an issue where DNS resolution for in-cluster k8s services works perfectly when running my application normally, but fails during test execution.
When I run the application to reach a k8s service using its in-cluster DNS record (like
<svc_name>.<ns>.svc.cluster.local), it works as expected. However, when running tests viago test, I receiveno such hosterrors, in GoLand plugin. I am able to make the test work if i runmirrord exec -f ".mirrord/mirrord.json" -- go test ./some/files/...However, if i try to debug the tests with GoLand plugin - it fails to reach the host.I would like to clarify if this is a known limitation of how mirrord interacts with the Go test runner, or if there is a configuration adjustment needed to support this use case.
My mirrord.json looks as follows:
{ "target": "targetless", "feature": { "network": { "dns": true, "outgoing": { "tcp": true, "udp": true } }, "fs": "localwithoverrides", "env": { "exclude": "KUBERNETES_PORT;KUBERNETES_PORT_*;KUBERNETES_PORT_*_*;KUBERNETES_SERVICE_HOST;KUBERNETES_SERVICE_PORT;KUBERNETES_SERVICE_PORT_*" } } }Steps to Reproduce
kindclusterBacktrace
mirrord layer logs
mirrord intproxy logs
mirrord agent logs
mirrord config
mirrord CLI version
No response
mirrord-agent version
No response
mirrord-operator version (if relevant)
No response
plugin kind and version (if relevant)
No response
Your operating system and version
macOS 15.6
Local process
go test
Local process version
No response
Additional Info
No response