-
Notifications
You must be signed in to change notification settings - Fork 293
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
dnsPolicy should be set to ClusterFirstWithHostNet in pod template with gVisor driver #793
Comments
Fix commit on my fork, NoOverflow@c35f235. Let me know if you want me to open a PR :) |
The setting charts/charts/falco/values.yaml Line 469 in 15f97d5
true allows to use the fqdn and avoid the issue, right?
|
This flag seems to only set the sidekick url in the configuration to the full URL, but it would still need to be able to resolve it using the Kubernetes internal DNS, so no I'm pretty sure it wouldn't avoid it charts/charts/falco/templates/_helpers.tpl Lines 140 to 144 in 15f97d5
(http://falco-falcosidekick:2801 > http://falco-falcosidekick.falco.svc.cluster.local:2801 when it's enabled) |
I see, feel free to propose a PR to add the setting when gvisor is enabled. Thanks |
Hi,
Describe the bug
The dnsPolicy attribute is currently only set to ClusterFirstWithHostNet when the driver kind is
ebpf
and hostNetwork is enabled.charts/charts/falco/templates/pod-template.tpl
Lines 36 to 38 in 15f97d5
This is due to how dnsPolicy behaves when hostNetwork is true (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy)
The "Default" policy uses the DNS resolve configuration from the node, this effectively isolate the pod from resolving the IP of other pods/services on the cluster.
Since the dnsPolicy attribute is not set when the driver is gVisor, but the hostNetwork attribute is. This causes dnsPolicy to fallback to this Default mode.
charts/charts/falco/templates/pod-template.tpl
Lines 60 to 63 in 15f97d5
This is an issue especially when you enable the http output to falcosidekick, because the URL is automatically set to
falco-falcosidekick:2801
and fails to lookup, causing an issue similar to falcosecurity/falco#3142.How to reproduce it
Deploy falco with the gVisor driver, and the falcosidekick pod enabled.
Example values file:
Expected behaviour
dnsPolicy
should be set toClusterFirstWithHostNet
whendriver.kind: gvisor
The text was updated successfully, but these errors were encountered: