-
Notifications
You must be signed in to change notification settings - Fork 5
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
don't rely on ebpf event for dns resolution #153
Conversation
PR Analysis
PR Feedback
How to useInstructions
|
Summary:
|
pkg/dnsmanager/dns_manager.go
Outdated
dm.addressToDomainMap.Set(address, dnsEvent.DNSName) | ||
if dnsEvent.NumAnswers > 0 { | ||
// FIXME use dnsEvent.Nameserver to resolve the DNS name | ||
addresses, err := net.LookupIP(dnsEvent.DNSName) |
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.
we want to specifically use the ig dns resolution...
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.
I know but in my cluster we also don't get DNS addresses with the gadget, so Maurizio said it's also the compressed vs uncompressed issues for which Amit opened an issue. I don't think we can rely on IG for that
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.
why did we update the ig version?
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.
For a fix on arm processors... But are you sure it works with the older IG?
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 uncompressed issue doesn't bother us since it's only inside the cluster
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.
yes I am sure. I will try to figure out what happened on the last version
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.
We should still have a workaround when there's no address
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.
when there is no address the dns field will be empty
@@ -54,7 +54,7 @@ func generateNetworkNeighborsNameFromWlid(parentWlid string) string { | |||
|
|||
func generateNetworkNeighborsLabels(workload k8sinterface.IWorkload) map[string]string { | |||
return map[string]string{ | |||
instanceidhandlerV1.ApiVersionMetadataKey: workload.GetApiVersion(), | |||
//instanceidhandlerV1.ApiVersionMetadataKey: workload.GetApiVersion(), FIXME invalid label, move to annotations |
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 this a fix for all our crds?
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.
This should be a discussion between David and Eran
Summary:
|
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
@Daniel-GrunbergerCA I think this is ready to review, you can try the image quay.io/matthiasb_1/node-agent:fanotify |
Summary:
|
type:
bug_fix, refactoring
description:
This PR primarily focuses on refactoring the DNS resolution process and enhancing configuration handling. The main changes include:
net.LookupIP
function to resolve DNS names.CreateDNSManager
function no longer requires context, config, k8sClient, storageClient, and clusterName parameters. It's now a parameterless function.CreateRelevancyManagerMock
function now returns a relevancyManager object.EnableNetworkTracing
configuration option has been added to theTestLoadConfig
function in theconfig_test.go
file.containercollection.WithContainerFanotifyEbpf
instead ofcontainercollection.WithRuncFanotify
.dnsEventCallback
function incontainer_watcher_private.go
now also accepts events of typeDEBUG
.ApiVersionMetadataKey
label has been removed from thegenerateNetworkNeighborsLabels
function innetwork_neighbors.go
and the corresponding tests.config.json
file has been updated withfullPathTracingEnabled
andnetworkServiceEnabled
options.main_files_walkthrough:
files:
main.go
: TheCreateRelevancyManagerMock
function now returns a relevancyManager object. TheCreateDNSManager
function has been updated to not require any parameters.pkg/config/config_test.go
: TheEnableNetworkTracing
configuration option has been added to theTestLoadConfig
function.pkg/containerwatcher/v1/container_watcher_private.go
: The container collection options have been updated to usecontainercollection.WithContainerFanotifyEbpf
instead ofcontainercollection.WithRuncFanotify
.pkg/dnsmanager/dns_manager.go
: TheCreateDNSManager
function no longer requires context, config, k8sClient, storageClient, and clusterName parameters. It's now a parameterless function. The DNS resolution process has been updated to use the standardnet.LookupIP
function.pkg/networkmanager/network_neighbors.go
: TheApiVersionMetadataKey
label has been removed from thegenerateNetworkNeighborsLabels
function.configuration/config.json
: Theconfig.json
file has been updated withfullPathTracingEnabled
andnetworkServiceEnabled
options.