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

SDN-5393: intg netobserv operator with bpfman to manage ebpf programs #829

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

msherif1234
Copy link
Contributor

@msherif1234 msherif1234 commented Oct 29, 2024

Description

Intg NOO with bpfman to manage ebpf programs life cycle

sample config

agent:
    type: eBPF
    ebpf:      
      privileged: true
      features:
        - "EbpfManager"
      interfaces: ["ens5", "br-ex"]

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 labeled 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 Oct 29, 2024

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

In response to this:

Description

Intg NOO with bpfman to manage ebpf programs life cycle

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 labeled 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 changed the title SDN-5393: intg netobserv operator with bpfman to manage ebpf programs WIP: SDN-5393: intg netobserv operator with bpfman to manage ebpf programs Oct 29, 2024
@msherif1234 msherif1234 force-pushed the bpfman-intg branch 2 times, most recently from 29003ea to b6ab8b9 Compare October 29, 2024 17:32
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 6.77291% with 234 lines in your changes missing coverage. Please review.

Project coverage is 62.75%. Comparing base (924e3d2) to head (b83e769).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
controllers/ebpf/bpfmanager-controller.go 0.00% 190 Missing ⚠️
controllers/ebpf/agent_controller.go 11.36% 34 Missing and 5 partials ⚠️
...lector/v1beta2/flowcollector_validation_webhook.go 0.00% 2 Missing and 1 partial ⚠️
main.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #829      +/-   ##
==========================================
- Coverage   63.93%   62.75%   -1.18%     
==========================================
  Files          76       77       +1     
  Lines       11030    11266     +236     
==========================================
+ Hits         7052     7070      +18     
- Misses       3536     3753     +217     
- Partials      442      443       +1     
Flag Coverage Δ
unittests 62.75% <6.77%> (-1.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% <ø> (ø)
controllers/consoleplugin/consoleplugin_objects.go 87.52% <100.00%> (ø)
controllers/flowcollector_controller.go 73.27% <100.00%> (ø)
controllers/flp/flp_common_objects.go 92.07% <100.00%> (ø)
controllers/flp/flp_controller.go 64.00% <100.00%> (ø)
controllers/reconcilers/common.go 75.00% <100.00%> (ø)
pkg/helper/flowcollector.go 82.13% <100.00%> (+0.12%) ⬆️
pkg/manager/config.go 0.00% <ø> (ø)
pkg/manager/manager.go 58.18% <ø> (ø)
... and 4 more

... and 4 files with indirect coverage changes

@msherif1234 msherif1234 marked this pull request as draft October 30, 2024 12:58
@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 30, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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-22f16c7
  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 Oct 30, 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 Oct 30, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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-4fddf88
  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 Oct 30, 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 Oct 30, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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-e758c5c
  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 Oct 30, 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 Oct 30, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 30, 2024

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

In response to this:

Description

Intg NOO with bpfman to manage ebpf programs life cycle

sample config

agent:
   type: eBPF
   ebpf:
     advanced:
       scheduling:
         nodeSelector:
                node-role.kubernetes.io/worker: ""
     privileged: true
     features:
       - "EbpfManager"
     interfaces: ["ens5", "br-ex"]

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 labeled 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 Oct 30, 2024
@@ -355,6 +376,32 @@ func (c *AgentController) desired(ctx context.Context, coll *flowslatest.FlowCol

}

if helper.IsAgentFeatureEnabled(&coll.Spec.Agent.EBPF, flowslatest.EbpfManager) {
if !coll.Spec.Agent.EBPF.Privileged {
rlog.Error(fmt.Errorf("invalid configuration"), "To enable BPF Manager feature privileged mode needs to be enabled")
Copy link
Member

Choose a reason for hiding this comment

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


const (
netobservApp = "netobserv"
netobservBCImage = "quay.io/netobserv/ebpf-bytecode:latest"
Copy link
Member

Choose a reason for hiding this comment

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

can you make that picked up from the command line argument, same as the other images (cf in main.go flag.StringVar(&config.EBPFAgentImage, "ebpf-agent-image", "quay.io/netobserv/netobserv-ebpf-agent:main", "The image of the eBPF agent")

@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 Dec 11, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

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.

thanks @msherif1234 , lgtm

@openshift-ci openshift-ci bot added lgtm and removed lgtm labels Dec 11, 2024
@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 Dec 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 Dec 12, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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-9d79f9e
  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 Dec 12, 2024
Copy link

openshift-ci bot commented Dec 12, 2024

@msherif1234: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-operator a3ddea4 link false /test e2e-operator

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@jotak
Copy link
Member

jotak commented Dec 13, 2024

/lgtm

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

/approve

Copy link

openshift-ci bot commented Dec 13, 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

@msherif1234 msherif1234 merged commit 5ba1b46 into netobserv:main Dec 13, 2024
7 of 11 checks passed
@msherif1234 msherif1234 deleted the bpfman-intg branch December 13, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants