Policy: Fix rule origin for ordered policies#44178
Merged
jrajahalme merged 3 commits intocilium:mainfrom Feb 5, 2026
Merged
Conversation
Member
Author
|
/test |
a08141d to
0f78bac
Compare
Verify RuleOrigin values of computed policies against the expected ones in policy unit tests. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
Higher precedence rules override lower precedence ones, but we still merged the rule origin metadata regardless. Move rule origin merging to L4Filter.mergePortProto() so that the rule priority overrides can considered also for rule origin updates. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
PerSelectorPolicy is not just for L7 rules any more, it is high time to reflect this in the local variable names used. 'newPerSelectorPolicy' would be a a bit long, so use just 'newPolicy' and 'existingPolicy' with comments that make it obvious that these are PerSelectorPolicies. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
0f78bac to
664f87a
Compare
Member
Author
|
Fixed Go import order |
Member
Author
|
/test |
1 task
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix RuleOrigin merging for L4Filter's skipped due to priority override.
Add RuleOrigin verification to policy unit tests, rename local variables for clarity.