-
Notifications
You must be signed in to change notification settings - Fork 367
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
add except to ipBlock #6428
Comments
@jsalatiel we discussed this at our community meeting this week, and the consensus was that it would be good to add this feature to the Antrea native policy API. See https://github.com/antrea-io/antrea/wiki/Community-Meetings#june-17-2024. |
@Dyanngg I am assigning the issue to you, but feel free to re-assign if needed |
That's amazing! |
Fixes #6428 This PR adds an "except" field for all ipBlocks in Antrea-native policies and groups. Users can exclude certain CIDRs from the ipBlock.cidr in all resources that support ipBlocks, including AntreaClusterNetworkPolicy, AntreaNetworkPolicy, ClusterGroup and Group. Group membership and IP association query logic are also updated to accommodate this change. Documentation will follow in a separate PR. Signed-off-by: Dyanngg <dingyang@vmware.com>
Fixes antrea-io#6428 This PR adds an "except" field for all ipBlocks in Antrea-native policies and groups. Users can exclude certain CIDRs from the ipBlock.cidr in all resources that support ipBlocks, including AntreaClusterNetworkPolicy, AntreaNetworkPolicy, ClusterGroup and Group. Group membership and IP association query logic are also updated to accommodate this change. Documentation will follow in a separate PR. Signed-off-by: Dyanngg <dingyang@vmware.com>
Hi everyone, I understand that the "except" is not part of the IPBlock in antrea per
It would be a nice feature to add that. Create a higher priority rule is not always a feasible or looks clean for those debugging problems.
Let's take this example:
Premise:
Now let's say that we want a easy way to provide internet for pods. By internet I mean ports 80 and 443 to:
something like:
With that pods can go to outside, but won't have access to private ips on port 80 and 443.
To implement that, currently I need to do something like:
If I add that in the SecurityOps or NetworkOps, that "Pass" will effectively block the developers from letting the pods talk to the internet and also access any other internal service on port 80/443 by creating ANP in application tier. The only way that can somehow work is to create that Cluster policy as the lowest priority possible in Application Tier. But again, that looks more like a NetworkOps "rule" than a Application rule.
If we could have except in IPBlock, that rule could be easily created as:
and that rule would interfere with no other rule and it would be "self-contained".
Somehow related:
#6424
The text was updated successfully, but these errors were encountered: