NETOBSERV-2048: Add webhook check to prevent CIDR duplication when configure multi rules filtering#965
Conversation
|
@msherif1234: This pull request references NETOBSERV-2005 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
…les filtering Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
|
/ok-to-test |
|
New images:
They will expire after two weeks. To deploy this build: # Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:038e10c make deploy
# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-038e10cOr as a Catalog Source: apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: netobserv-dev
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-038e10c
displayName: NetObserv development catalog
publisher: Me
updateStrategy:
registryPoll:
interval: 1m |
|
/label qe-approved |
|
@msherif1234: This pull request references NETOBSERV-2005 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Verified wh does not allows creation of filters with duplicate CIDR |
| for i := range fc.Spec.Agent.EBPF.FlowFilter.FlowFilterRules { | ||
| errs = append(errs, validateFilter(&fc.Spec.Agent.EBPF.FlowFilter.FlowFilterRules[i])...) | ||
| rule := fc.Spec.Agent.EBPF.FlowFilter.FlowFilterRules[i] | ||
| if found := m[rule.CIDR]; found { |
There was a problem hiding this comment.
This checks for an exact match. Do you need to check for overlapping IPs such as:
10.0.0.0/24
10.0.0.1/32
There was a problem hiding this comment.
no overlapping can be intentional we discussed that and we agreed to leave this to the user cc'd @jotak
There was a problem hiding this comment.
yes, a typical example would be to set a global ALLOW on 0.0.0.0/0 and then add exceptions
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: msherif1234 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@msherif1234: This pull request references NETOBSERV-2048 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest |
|
/test all |
|
@msherif1234: This pull request references NETOBSERV-2048 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Description
prevent users from using duplicate CIDR when configure multi filter rules
Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.