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.
Type
bug_fix, tests
Description
This PR addresses the issue of IP duplication in the network policy. The main changes include:
PR changes walkthrough
1 files
networkpolicy.go
pkg/apis/softwarecomposition/networkpolicy/networkpolicy.go
The changes in this file mainly focus on fixing the IP
duplication issue in the network policy. This is achieved by
implementing a hashing function to create unique identifiers
for each rule and policy reference. These hashes are then
used to prevent duplication in both ingress and egress
rules. The changes also include the addition of new imports
to support the hashing function.
1 files
networkpolicy_test.go
pkg/apis/softwarecomposition/networkpolicy/networkpolicy_test.go
The changes in this file include the addition of a new test
case to verify the correct functioning of the IP duplication
fix. The test case checks if the policy is enriched when
multiple IPs are present in known servers.
User description
Sorry, we do not accept changes directly against this repository. Please see
CONTRIBUTING.md for information on where and how to contribute instead.