-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat: [sc-110727] troubleshoot: collector/analyzer for wildcard dns #1606
Conversation
namespace := "default" | ||
command := []string{"/bin/sh", "-c", ` | ||
set -x | ||
command := []string{"/bin/sh", "-c", fmt.Sprintf(` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you switched from nslookup
to dig
? People will need find an image that has dig
installed which is an additional hurdle to jump. Images such as busybox
and alpine
package nslookup
. Embedded Cluster uses busybox which, if not overridden, will be present in the airgap bundle
It might be slightly more code, but you can attempt dig
and if the binary is not present, try nslookup
. The collector will be more robust this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nslookup
command in busybox is not working correctly
E.g.
k run -it --rm debug --image busybox -- /bin/sh
If you don't see a command prompt, try pressing enter.
/ #
/ # nslookup kubernetes.default
Server: 10.43.0.10
Address: 10.43.0.10:53
** server can't find kubernetes.default: NXDOMAIN
I've changed to dig
simply because of the base image has dig
installed, we only want to resolve an address, and the dig +short
is easier to parse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add this as a comment in the code for future context on the technical choice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
many thanks @banjoh! I'll update the docs accordingly as well.
edb554c
to
36c03da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Story details: https://app.shortcut.com/replicated/story/110727
Demo: https://asciinema.org/a/C9TJdETq9Hn21jefJaxSnWyga
Updates in existing DNS collector
dig
instead ofnslookup
image
configurable, default toregistry.k8s.io/e2e-test-images/jessie-dnsutils:1.3
nonResolveable
config for non-resolvable domain, defaulted tonon-existent-domain
Current JSON output that can be used with others analyzer such as JSON analyzer
Sample YAML spec