Skip to content

NETOBSERV-1642: Ovs monitoring feature #664

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

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

msherif1234
Copy link
Contributor

@msherif1234 msherif1234 commented May 29, 2024

Description

changes to support ovs monitoring config and console bits

FC config to enable ovs monitoring fearure

agent:
    type: eBPF
    ebpf:   
      privileged: true
      features:
       - "OvsMonitor"

Dependencies

netobserv/netobserv-ebpf-agent#286

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).

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented May 29, 2024

@msherif1234: This pull request references NETOBSERV-1642 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.17.0" version, but no target version was set.

In response to this:

Description

changes to support ovs monitoring config and console bits

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.

  • 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).

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.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented May 29, 2024

@msherif1234: This pull request references NETOBSERV-1642 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.17.0" version, but no target version was set.

In response to this:

Description

changes to support ovs monitoring config and console bits

Dependencies

netobserv/netobserv-ebpf-agent#286

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).

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.

@msherif1234 msherif1234 marked this pull request as draft May 29, 2024 20:25
Comment on lines 1090 to 1140
- name: OvsMonitorMD[0]
type: string
description: OVS monitor metadata for the 1st event
cardinalityWarn: avoid
Copy link
Contributor

@jpinsonneau jpinsonneau May 30, 2024

Choose a reason for hiding this comment

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

You should also add these into columns and filters such as:

columns:
  - id: OvsMonitorMD0
    name: 1st OVS metadata
    tooltip: OVS monitor metadata for the 1st event
    field: OvsMonitorMD[0]
    filter: ovs_metadata_0
    default: true
    width: 5
    feature: ovsMonitor
...
filters:
  - id: ovs_metadata_0
    name: OVS monitor metadata for the 1st event
    component: text
    hint: Specify a single metadata.
...

Copy link
Contributor

Choose a reason for hiding this comment

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

if we want to make somether smarter that concatenate the events, it will require some code changes in the plugin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe there is still a need for plugin work anyway to handle the new feature if that is accurate optimizing the above can be part of that too ? for now I will see how far this takes me

Copy link
Contributor

Choose a reason for hiding this comment

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

updated both agent & operator PRs to allow single field with an array
netobserv/netobserv-ebpf-agent#286 (comment)

LokiCRWriter = "netobserv-writer"
LokiCRBWriter = "netobserv-writer-flp"
LokiCRReader = "netobserv-reader"
MaxOvsMonitorEvents = 4
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure to get the impact of this yet. What would be the advantage to get more / less events metadatas ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for the same flow we can have multiple events md if we wanted to trace different feature for example we wanted to trace ACL, NAT, QoS for example we will see array populated with 4 metadata strings each for one of the above features, while if we trace ACL only for example then only one event md will be populated

Copy link
Contributor

Choose a reason for hiding this comment

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

ok makes sense. So are we going to expose which features to trace in the FlowCollector CR ?

If so we could adapt the console plugin config dynamically and bind each field with its proper name / type etc

@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 May 30, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

Copy link

codecov bot commented May 30, 2024

Codecov Report

Attention: Patch coverage is 7.84314% with 47 lines in your changes missing coverage. Please review.

Project coverage is 66.88%. Comparing base (690bb50) to head (75b75f2).

Files with missing lines Patch % Lines
controllers/ebpf/agent_controller.go 4.87% 36 Missing and 3 partials ⚠️
controllers/flp/flp_pipeline_builder.go 0.00% 5 Missing and 1 partial ⚠️
controllers/consoleplugin/consoleplugin_objects.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #664      +/-   ##
==========================================
- Coverage   67.21%   66.88%   -0.33%     
==========================================
  Files          74       74              
  Lines        8598     8649      +51     
==========================================
+ Hits         5779     5785       +6     
- Misses       2416     2457      +41     
- Partials      403      407       +4     
Flag Coverage Δ
unittests 66.88% <7.84%> (-0.33%) ⬇️

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% <ø> (ø)
pkg/helper/flowcollector.go 83.33% <100.00%> (+0.15%) ⬆️
controllers/consoleplugin/consoleplugin_objects.go 90.40% <0.00%> (-0.44%) ⬇️
controllers/flp/flp_pipeline_builder.go 83.67% <0.00%> (-1.31%) ⬇️
controllers/ebpf/agent_controller.go 53.95% <4.87%> (-5.01%) ⬇️

... and 1 file with indirect coverage changes

@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 May 31, 2024
@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 May 31, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@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 Jun 3, 2024
@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 Jun 3, 2024
Copy link

github-actions bot commented Jun 3, 2024

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jun 4, 2024

@msherif1234: This pull request references NETOBSERV-1642 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.17.0" version, but no target version was set.

In response to this:

Description

changes to support ovs monitoring config and console bits

FC config to enable ovs monitoring fearure

agent:
   type: eBPF
   ebpf:   
     privileged: true
     features:
      - "OvsMonitor"

Dependencies

netobserv/netobserv-ebpf-agent#286

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).

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.

@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 Jun 24, 2024
@msherif1234
Copy link
Contributor Author

/ok-to-test

@msherif1234 msherif1234 marked this pull request as ready for review August 9, 2024 11:12
@msherif1234 msherif1234 changed the title WIP: NETOBSERV-1642: Ovs monitoring feature NETOBSERV-1642: Ovs monitoring feature Aug 9, 2024
@msherif1234
Copy link
Contributor Author

/ok-to-test

@msherif1234 msherif1234 removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Aug 12, 2024
@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 Aug 12, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

// - `FlowRTT`, to track TCP latency. [Unsupported (*)].<br>
// +kubebuilder:validation:Enum:="PacketDrop";"DNSTracking";"FlowRTT"
// - `FlowRTT`, to track TCP latency [Unsupported (*)].<br>
// - `NetworkEventsMonitor`, to track Network events.<br>
Copy link
Member

Choose a reason for hiding this comment

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

just wondering if naming it just NetworkEvents would be sufficient and easier to remember, no ?

@@ -325,6 +327,7 @@ type FlowCollectorEBPF struct {
// If the `spec.agent.ebpf.privileged` parameter is not set, an error is reported.<br>
// - `DNSTracking`: enable the DNS tracking feature.<br>
// - `FlowRTT`: enable flow latency (sRTT) extraction in the eBPF agent from TCP traffic.<br>
// - `NetworkEventsMonitor`: enable the Network events monitoring feature.<br>
Copy link
Member

Choose a reason for hiding this comment

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

like in PacketDrop, we should mention here if Privileged is required
Also, maybe add more details right here because it's not super obvious what are network events. like ".. such as network policy verdicts" ?

@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 Aug 15, 2024
@msherif1234 msherif1234 requested a review from jotak August 16, 2024 21:20
@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 Aug 17, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@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 Sep 4, 2024
@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 4, 2024
Copy link

github-actions bot commented Sep 4, 2024

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@msherif1234
Copy link
Contributor Author

/approve

Copy link

openshift-ci bot commented Sep 5, 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 Sep 5, 2024
@openshift-ci openshift-ci bot added the lgtm label Sep 5, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 8807110 into netobserv:main Sep 5, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved jira/valid-reference 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.

5 participants