-
Notifications
You must be signed in to change notification settings - Fork 3.4k
policy: expand "world" entity selector to select all address families #29958
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, we had a single label, `reserved:world`, applied to all CIDR (non-cluster) identities. With cilium#22625, this is no longer the case; CIDR identities get either `reserved:world-ipv4` or `reserved:world-ipv6` labels **in dual stack clusters**. This PR updates the `toEntities: world` selector to select *all* world entities, as it worked previously. It does so by expanding the set of selectors underlying the `world` entity. No other magic in the SelectorCache or policy engine is required. Fixes: cilium#29666 Fixes: a94fa56 Signed-off-by: Casey Callendrello <cdc@isovalent.com>
/test |
nathanjsweet
approved these changes
Dec 18, 2023
the ipsec upgrade test is still failing, because it downgrades to v1.15 which still has this bug. |
nbusseneau
approved these changes
Dec 18, 2023
This PR is green, except ci-ipsec-upgrade, which is not going to pass until this PR is backported. Marking as ready-to-merge. |
1 task
2 tasks
nathanjsweet
added a commit
that referenced
this pull request
May 9, 2025
With /pull/29958 The World entity automatically encompasses the world-ipv4 and world-ipv6 labels. These automatically are inserted because of their association with the world label regardless of whether Cilium is in dualstack mode or not. This code is a no-op and can be removed. The distillery tests continued success shows that this code removal does not matter (see `Test_EnsureDeniesPrecedeAllows`, for world label <-> identity test examples). Signed-off-by: Nate Sweet <nathanjsweet@pm.me>
nathanjsweet
added a commit
that referenced
this pull request
May 9, 2025
With #29958 The "world" entity-label automatically encompasses the "world-ipv4" and "world-ipv6" labels. These are automatically inserted into mapstate because of their association with the world label, regardless of whether Cilium is in dual-stack mode. This code is a no-op and can be removed. The distillery tests continued success shows that this code removal does not matter (see `Test_EnsureDeniesPrecedeAllows`, for world label <-> identity test examples). Signed-off-by: Nate Sweet <nathanjsweet@pm.me>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects/v1.15
This issue affects v1.15 branch
backport-done/1.15
The backport for Cilium 1.15.x for this PR is done.
kind/bug
This is a bug in the Cilium logic.
kind/regression
This functionality worked fine before, but was broken in a newer release of Cilium.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/misc
This PR makes changes that have no direct user impact.
sig/policy
Impacts whether traffic is allowed or denied based on user-defined policies.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, we had a single label,
reserved:world
, applied to all CIDR (non-cluster) identities. With #22625, this is no longer the case; CIDR identities get eitherreserved:world-ipv4
orreserved:world-ipv6
labels in dual stack clusters.This PR updates the
toEntities: world
selector to select all world labels, as it worked previously. It does so by expanding the set of selectors underlying theworld
entity. No other magic in the SelectorCache or policy engine is required.Fixes: #29666
Fixes: a94fa56