fix: [NPM] niche multi-value pod selector bug #1384
Merged
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.
Fixes a niche bug in NPM v2, where netpol behavior becomes inaccurate if 2+ network policies have the exact same multi-value pod selector, and one of those policies is deleted.
Currently, can mitigate by re-adding one of the existing policies with that pod selector.
Fix
NestedLabelOfPodipsets must have a different ipset name for each policy.Example
Using this network policy
and the agnhost pods from here. You'll need to label a node with the
vm=0.The ./connect-agnhosts.sh script can be found here.