Skip to content
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

connectivity: Extend encryption interface derivation for managed K8s #37675

Open
brb opened this issue Dec 20, 2022 · 4 comments
Open

connectivity: Extend encryption interface derivation for managed K8s #37675

brb opened this issue Dec 20, 2022 · 4 comments
Labels
area/CI Continuous Integration testing issue or flake area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. cilium-cli This PR contains changes related with cilium-cli integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc.

Comments

@brb
Copy link
Member

brb commented Dec 20, 2022

Currently, the encryption test does ip route get $REMOTE_POD_IP to derive an interface which is used to send a request to that pod. However, this might not work on managed K8s (e.g., EKS) in which there might be multiple ifaces depending on a source IP addr (cilium/cilium-cli#1304 (comment)).

@brb brb added the area/CI Continuous Integration testing issue or flake label Dec 20, 2022
Copy link

This issue has been automatically marked as stale because it has not
had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Sep 28, 2024
@brb brb removed the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Sep 30, 2024
Copy link

This issue has been automatically marked as stale because it has not
had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Nov 30, 2024
@brb brb removed the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Dec 2, 2024
Copy link

github-actions bot commented Feb 1, 2025

This issue has been automatically marked as stale because it has not
had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Feb 1, 2025
Copy link

This issue has not seen any activity since it was marked stale.
Closing.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2025
@julianwiedmann julianwiedmann transferred this issue from cilium/cilium-cli Feb 17, 2025
@julianwiedmann julianwiedmann added cilium-cli This PR contains changes related with cilium-cli area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc. and removed stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. labels Feb 17, 2025
smagnani96 added a commit that referenced this issue Feb 17, 2025
This commit adjusts the current logic in `pod-to-pod-encryption-v2` for
retrieving the egress device from client-server pods and vice-versa.
Before the patch, we solely rely on `ip route get dstIP`, using the
returned device as egress. However, we noticed that in aws-cni chaining
mode, such returned device is not actually used. Instead, looking at the
routing tables in the server node, we found that there's a specific table
with a route that uses a different egress device for that particular IP.
The related issue in our previous tests is #37675.

We now fix this for pod-to-pod-encryption-v2, but we might want to adopt
the same logic for v1.

Signed-off-by: Simone Magnani <[email protected]>
smagnani96 added a commit that referenced this issue Feb 17, 2025
This commit adjusts the current logic in `pod-to-pod-encryption-v2` for
retrieving the egress device from client-server pods and vice-versa.
Before the patch, we solely rely on `ip route get dstIP`, using the
returned device as egress. However, we noticed that in aws-cni chaining
mode, such returned device is not actually used. Instead, looking at the
routing tables in the server node, we found that there's a specific table
with a route that uses a different egress device for that particular IP.
The related issue in our previous tests is #37675.

We now fix this for pod-to-pod-encryption-v2, but we might want to adopt
the same logic for v1.

Signed-off-by: Simone Magnani <[email protected]>
smagnani96 added a commit that referenced this issue Feb 18, 2025
This commit adjusts the current logic in `pod-to-pod-encryption-v2` for
retrieving the egress device from client-server pods and vice-versa.
Before the patch, we solely rely on `ip route get dstIP`, using the
returned device as egress. However, we noticed that in aws-cni chaining
mode, such returned device is not actually used. Instead, looking at the
routing tables in the server node, we found that there's a specific table
with a route that uses a different egress device for that particular IP.
The related issue in our previous tests is #37675.

We now fix this for pod-to-pod-encryption-v2, but we might want to adopt
the same logic for v1.

Signed-off-by: Simone Magnani <[email protected]>
smagnani96 added a commit that referenced this issue Feb 18, 2025
This commit adjusts the current logic in `pod-to-pod-encryption-v2` for
retrieving the egress device from client-server pods and vice-versa.
Before the patch, we solely rely on `ip route get dstIP`, using the
returned device as egress. However, we noticed that in aws-cni chaining
mode, such returned device is not actually used. Instead, looking at the
routing tables in the server node, we found that there's a specific table
with a route that uses a different egress device for that particular IP.
The related issue in our previous tests is #37675.

We now fix this for pod-to-pod-encryption-v2, but we might want to adopt
the same logic for v1.

Signed-off-by: Simone Magnani <[email protected]>
smagnani96 added a commit that referenced this issue Feb 18, 2025
This commit adjusts the current logic in `pod-to-pod-encryption-v2` for
retrieving the egress device from client-server pods and vice-versa.
Before the patch, we solely rely on `ip route get dstIP`, using the
returned device as egress. However, we noticed that in aws-cni chaining
mode, such returned device is not actually used. Instead, looking at the
routing tables in the server node, we found that there's a specific table
with a route that uses a different egress device for that particular IP.
The related issue in our previous tests is #37675.

We now fix this for pod-to-pod-encryption-v2, but we might want to adopt
the same logic for v1.

Signed-off-by: Simone Magnani <[email protected]>
smagnani96 added a commit that referenced this issue Feb 19, 2025
This commit adjusts the current logic in `pod-to-pod-encryption-v2` for
retrieving the egress device from client-server pods and vice-versa.
Before the patch, we solely rely on `ip route get dstIP`, using the
returned device as egress. However, we noticed that in aws-cni chaining
mode, such returned device is not actually used. Instead, looking at the
routing tables in the server node, we found that there's a specific table
with a route that uses a different egress device for that particular IP.

Therefore, the final command to be issued should be:
`ip route get {dstIP} from {srcIP} iif cilium_host`.
The interface specified does not matter since, if present, the route
matching srcIP is not making use of the interface field to match.

The related issue in our previous tests is #37675.

We now fix this for pod-to-pod-encryption-v2, but we might want to adopt
the same logic for v1.

Signed-off-by: Simone Magnani <[email protected]>
smagnani96 added a commit that referenced this issue Feb 19, 2025
This commit adjusts the current logic in `pod-to-pod-encryption-v2` for
retrieving the egress device from client-server pods and vice-versa.
Before the patch, we solely rely on `ip route get dstIP`, using the
returned device as egress. However, we noticed that in aws-cni chaining
mode, such returned device is not actually used. Instead, looking at the
routing tables in the server node, we found that there's a specific table
with a route that uses a different egress device for that particular IP.

Therefore, the final command to be issued should be:
`ip route get {dstIP} from {srcIP} iif cilium_host`.
The interface specified does not matter since, if present, the route
matching srcIP is not making use of the interface field to match.

The related issue in our previous tests is #37675.

We now fix this for pod-to-pod-encryption-v2, but we might want to adopt
the same logic for v1.

Signed-off-by: Simone Magnani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. cilium-cli This PR contains changes related with cilium-cli integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc.
Projects
None yet
Development

No branches or pull requests

2 participants