-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix: add a rule for allowDNS to allow node-local-dns with its label for LRP use case #20086
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
fix: add a rule for allowDNS to allow node-local-dns with its label for LRP use case #20086
Conversation
a9a20a6
to
fc0300b
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.
One comment as per below, basically, I think it's better to have general connectivity check example. Anything related to a specific deployment could be mentioned in docs.
If we decide to go with changing *.cue files, please run make -C examples/kubernetes/connectivity-check all
to make sure generated files are in sync.
https://docs.cilium.io/en/v1.11/gettingstarted/local-redirect-policy/#node-local-dns-cache
toCIDR: [ | ||
169.254.25.10/32 | ||
] |
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 CIDR changed depend on diff environment/cluster? having something specific to particular environment might not be a good example.
Also, is this required as you already have matchLabels above for node-local-dns ?
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.
what do you think about having below rule ? It's not ideal but should be generic enough. As mentioned above, having hard-code CIDR might help in some cases, but not for all cases, and in the long term it might not be easy to maintain.
- toEntities:
- world
toPorts:
- ports:
- port: "53"
protocol: UDP
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.
Thanks for the reply. In the first place, I wasn't sure that we should use world
since the CIDR is an IP on the host. I expected that the cilium could know that IP is a host IP. However, your suggestion will cover all the cases and it will be generic enough to fix the problem. So, users wouldn't be misled anymore. I have tested in our environment. It works perfectly.
NAME READY STATUS RESTARTS AGE
echo-a-5769c68dd8-hr88p 1/1 Running 0 2m47s
echo-b-6dd649f7f6-c4bl2 1/1 Running 0 2m47s
echo-b-host-687668f6fd-w6qz7 1/1 Running 0 2m47s
host-to-b-multi-node-clusterip-557fc49b9-6knb8 1/1 Running 0 2m46s
host-to-b-multi-node-headless-6c74ddd66c-zkmxg 1/1 Running 0 2m46s
pod-to-a-7cccd8457c-dtwcd 1/1 Running 0 2m47s
pod-to-a-allowed-cnp-bbc844c6f-v6p6p 1/1 Running 0 2m47s
pod-to-a-denied-cnp-869fd9d7ff-hb2vd 1/1 Running 0 2m47s
pod-to-b-intra-node-nodeport-b48c5ccc7-ctmsg 1/1 Running 0 2m46s
pod-to-b-multi-node-clusterip-f8647fd67-hpxzt 1/1 Running 0 2m46s
pod-to-b-multi-node-headless-6b49bc6d55-gdzpm 1/1 Running 0 2m46s
pod-to-b-multi-node-nodeport-855b49f8c5-2vv5k 1/1 Running 0 2m46s
pod-to-external-1111-69c7775457-w9xjg 1/1 Running 0 2m47s
pod-to-external-fqdn-allow-google-cnp-699854bbff-7csz2 1/1 Running 0 2m47s
I think the same as you. Adding the When a Pod does a DNS request, it will send to this 169.254.25.10 IP. Cilium labels this request as Consequently, without this CIDR, the tests will fail for this situation. |
This pull request has been automatically marked as stale because it |
ping |
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.
Sorry for late replay, I have 2 comments as per below.
toCIDR: [ | ||
169.254.25.10/32 | ||
] |
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.
what do you think about having below rule ? It's not ideal but should be generic enough. As mentioned above, having hard-code CIDR might help in some cases, but not for all cases, and in the long term it might not be easy to maintain.
- toEntities:
- world
toPorts:
- ports:
- port: "53"
protocol: UDP
fc0300b
to
35dd1e1
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.
Hi @eminaktas Sorry, I missed your ping on #20055. Can you please create a dedicated PR to work with LRP based node-local-dns deployment where you just need to add the k8s-app: node-local-dns
label to the connectivity test policies. Please ping me on that PR, and I'll review it. Thanks!
Also, are you interested in making similar label related changes to the cilium-cli connectivity tests - https://github.com/cilium/cilium-cli/blob/master/connectivity/manifests/client-egress-to-fqdns-one-one-one-one.yaml?
35dd1e1
to
b754172
Compare
b754172
to
e786111
Compare
I just separated the PRs. This #20086 covers the LRP use case and the other PR #20683 covers the host network case. I'll check the cilium-cli today. |
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.
Thanks! Looks good. I've posted a minor comment. Should be ready for merge once you've addressed it.
Can you also update the commit description release note to something like - "Update connectivity tests for clusters running node-local dns caches with Local Redirect Policy."
e786111
to
cb0d013
Compare
Thanks! All done! |
cb0d013
to
c7b956e
Compare
Conformance test failures seem related -
Can you run |
c7b956e
to
392b9c0
Compare
Thanks for the info. Done |
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.
Sorry for late reply, this didn't show up in my filter unless there is a re-request for review.
Thanks 💯
also can you help to correct the commit message to make CI happy ?
|
Signed-off-by: eminaktas <eminaktas34@gmail.com>
392b9c0
to
233e3a6
Compare
Travis is broken on master so the failure is expected. Changes are only in the connectivity tests so marking the PR as ready for merge. |
Fixes: #20055
Signed-off-by: eminaktas eminaktas34@gmail.com