Skip to content
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

NETOBSERV-1910: Add packet drop filtering API #790

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

msherif1234
Copy link
Contributor

Description

Add pkt drop filtering capability

Dependencies

netobserv/netobserv-ebpf-agent#419

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.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
    • If so, make sure the JIRA epic is labelled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
    • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
    • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
    • Standard QE validation, with pre-merge tests unless stated otherwise.
    • Regression tests only (e.g. refactoring with no user-facing change).
    • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Sep 26, 2024
Copy link

New images:

  • quay.io/netobserv/network-observability-operator:bc80d3d
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-bc80d3d
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-bc80d3d

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:bc80d3d make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-bc80d3d

Or 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-bc80d3d
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 66.38%. Comparing base (0de6d49) to head (7edaf2c).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...pis/flowcollector/v1beta1/zz_generated.deepcopy.go 0.00% 4 Missing ⚠️
...pis/flowcollector/v1beta2/zz_generated.deepcopy.go 0.00% 4 Missing ⚠️
...s/flowcollector/v1beta1/zz_generated.conversion.go 0.00% 2 Missing ⚠️
controllers/ebpf/agent_controller.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #790      +/-   ##
==========================================
- Coverage   66.55%   66.38%   -0.18%     
==========================================
  Files          74       74              
  Lines        8693     8705      +12     
==========================================
- Hits         5786     5779       -7     
- Misses       2499     2515      +16     
- Partials      408      411       +3     
Flag Coverage Δ
unittests 66.38% <0.00%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
apis/flowcollector/v1beta1/flowcollector_types.go 100.00% <ø> (ø)
apis/flowcollector/v1beta2/flowcollector_types.go 100.00% <ø> (ø)
...s/flowcollector/v1beta1/zz_generated.conversion.go 39.08% <0.00%> (-0.10%) ⬇️
controllers/ebpf/agent_controller.go 52.29% <0.00%> (-0.23%) ⬇️
...pis/flowcollector/v1beta1/zz_generated.deepcopy.go 0.00% <0.00%> (ø)
...pis/flowcollector/v1beta2/zz_generated.deepcopy.go 41.60% <0.00%> (-0.21%) ⬇️

... and 4 files with indirect coverage changes

Copy link
Member

@jotak jotak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -249,6 +249,10 @@ type EBPFFlowFilter struct {
// ICMPCode defines the ICMP code to filter flows by.
// +optional
ICMPCode *int `json:"icmpCode,omitempty"`

// `pktDrop`, to filter flows with packet drops
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// `pktDrop`, to filter flows with packet drops
// `pktDrops`, to filter flows with packet drops

@@ -273,6 +273,10 @@ type EBPFFlowFilter struct {
// `icmpType`, for ICMP traffic, defines the ICMP type to filter flows by.
// +optional
ICMPType *int `json:"icmpType,omitempty"`

// `pktDrop`, to filter flows with packet drops
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// `pktDrop`, to filter flows with packet drops
// `pktDrops`, to filter flows with packet drops

Copy link
Member

@jotak jotak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually there's a typo

@openshift-ci openshift-ci bot removed the lgtm label Sep 30, 2024
Signed-off-by: Mohamed Mahmoud <[email protected]>
@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Oct 1, 2024
@msherif1234 msherif1234 requested a review from jotak October 1, 2024 14:05
@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Oct 4, 2024
Copy link

github-actions bot commented Oct 4, 2024

New images:

  • quay.io/netobserv/network-observability-operator:5e0b266
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-5e0b266
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-5e0b266

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:5e0b266 make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-5e0b266

Or 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-5e0b266
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@msherif1234
Copy link
Contributor Author

/test all

@openshift-ci openshift-ci bot added the lgtm label Oct 8, 2024
@msherif1234
Copy link
Contributor Author

/approve

Copy link

openshift-ci bot commented Oct 8, 2024

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Oct 8, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 994b2b9 into netobserv:main Oct 8, 2024
16 checks passed
@msherif1234 msherif1234 changed the title Add packet drop filtering API NETOBSERV-1910: Add packet drop filtering API Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test To set manually when a PR is safe to test. Triggers image build on PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants