Skip to content

NETOBSERV-2198: IPsec support #1085

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 2 commits into from
Apr 4, 2025
Merged

NETOBSERV-2198: IPsec support #1085

merged 2 commits into from
Apr 4, 2025

Conversation

msherif1234
Copy link
Contributor

@msherif1234 msherif1234 commented Jan 31, 2025

Description

Dependencies

netobserv/netobserv-ebpf-agent#538

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

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 2.77778% with 70 lines in your changes missing coverage. Please review.

Project coverage is 62.23%. Comparing base (1c941f7) to head (a8bee07).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
controllers/ebpf/bpfmanager-controller.go 0.00% 59 Missing ⚠️
controllers/ebpf/agent_controller.go 0.00% 7 Missing and 1 partial ⚠️
controllers/consoleplugin/consoleplugin_objects.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1085      +/-   ##
==========================================
- Coverage   62.69%   62.23%   -0.47%     
==========================================
  Files          76       76              
  Lines       11613    11683      +70     
==========================================
- Hits         7281     7271      -10     
- Misses       3867     3943      +76     
- Partials      465      469       +4     
Flag Coverage Δ
unittests 62.23% <2.77%> (-0.47%) ⬇️

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 82.49% <100.00%> (+0.11%) ⬆️
controllers/consoleplugin/consoleplugin_objects.go 84.40% <0.00%> (-1.19%) ⬇️
controllers/ebpf/agent_controller.go 45.43% <0.00%> (-0.53%) ⬇️
controllers/ebpf/bpfmanager-controller.go 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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 Jan 31, 2025
@msherif1234 msherif1234 removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jan 31, 2025
@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 Jan 31, 2025
@msherif1234 msherif1234 removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jan 31, 2025
@msherif1234 msherif1234 force-pushed the ipsec branch 3 times, most recently from 1425eb0 to c970f00 Compare February 1, 2025 12:53
@@ -166,6 +167,7 @@ const (
PacketTranslation AgentFeature = "PacketTranslation"
EbpfManager AgentFeature = "EbpfManager"
UDNMapping AgentFeature = "UDNMapping"
IPSEC AgentFeature = "IPSEC"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
IPSEC AgentFeature = "IPSEC"
IPSEC AgentFeature = "IPSec"

Copy link
Contributor

Choose a reason for hiding this comment

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

or

Suggested change
IPSEC AgentFeature = "IPSEC"
IPSEC AgentFeature = "IPsec"

@@ -1415,6 +1425,9 @@ fields:
- name: K8S_ClusterName
type: string
description: Cluster name or identifier
- name: EncryptedFlow
type: boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think we will be able to get more info that that in the future ?

It would be interesting to use another type here if so

Copy link
Member

@jotak jotak Apr 2, 2025

Choose a reason for hiding this comment

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

in fact, I think we could simplify that from the user perspective, with just a single field "IPsec" that could be "true" / "false" / "error: (code)", wdyt?
can be a follow-up

@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 Feb 12, 2025
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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-f7e644e
  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 Feb 13, 2025
@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 Feb 13, 2025
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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-c7100ef
  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 Feb 13, 2025
@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 Feb 13, 2025
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@jotak jotak changed the title NETOBSERV-1668: IPsec support NETOBSERV-2198: IPsec support Apr 1, 2025
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Apr 1, 2025

@msherif1234: This pull request references NETOBSERV-2198 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.

In response to this:

Description

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.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Apr 1, 2025

@msherif1234: This pull request references NETOBSERV-2198 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.

In response to this:

Description

Dependencies

netobserv/netobserv-ebpf-agent#538

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
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 Apr 2, 2025
@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 Apr 2, 2025
Copy link

github-actions bot commented Apr 2, 2025

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@@ -657,6 +657,20 @@ columns:
default: false
width: 15
feature: packetTranslation
- id: IPSec
name: Is IPSec operation successful?
Copy link
Member

Choose a reason for hiding this comment

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

What about just "IPsec encryption" ?

Copy link
Contributor Author

@msherif1234 msherif1234 Apr 3, 2025

Choose a reason for hiding this comment

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

u mean use the above for name ? I used operation as it can work for both encryption or decryption

@msherif1234 msherif1234 requested a review from jotak April 3, 2025 10:43
@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 Apr 3, 2025
@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 Apr 3, 2025
Copy link

github-actions bot commented Apr 3, 2025

New images:

  • quay.io/netobserv/network-observability-operator:34d04d6
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-34d04d6
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-sha-34d04d6

They will expire after two weeks.

To deploy this build:

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

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

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-sha-34d04d6
  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 Apr 3, 2025
@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 Apr 3, 2025
Copy link

github-actions bot commented Apr 3, 2025

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@msherif1234
Copy link
Contributor Author

sample config with ebpfMgr and features enabled w/o need privilege

spec:
  agent:
    ebpf:
      cacheActiveTimeout: 5s
      cacheMaxFlows: 100000
      excludeInterfaces:
      - lo
      features:
      - PacketDrop
      - DNSTracking
      - FlowRTT
      - PacketTranslation
      - EbpfManager
      - IPSec

image

$ oc exec -i -n bpfman bpfman-daemon-8fxw6 -c bpfman -- ./bpfman list programs
 Program ID  Application  Type        Function Name    Links                                        
 279                      tcx         tcx_ingress_flo  (58) 1295471270, 1345453941, 1441632460, ... 
 280                      tcx         tcx_egress_flow  (58) 107771511, 1178908131, 1185178417, ...  
 281                      fentry      tcp_rcv_fentry   (1) 425324457                                
 282                      tracepoint  kfree_skb        (1) 3915688123                               
 285                      kprobe      track_nat_manip  (1) 4169115594                               
 286                      kprobe      xfrm_input_kpro  (1) 3401614146                               
 287                      kprobe      xfrm_input_kret  (1) 233370034                                
 288                      kprobe      xfrm_output_kpr  (1) 1173173061                               
 289                      kprobe      xfrm_output_kre  (1) 3548456298                    

Copy link

openshift-ci bot commented Apr 3, 2025

@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/images 9e329b4 link true /test images

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 Apr 4, 2025

/lgtm
/approve

I created https://issues.redhat.com/browse/NETOBSERV-2207 for follow-ups. I think we can improve the UX

@openshift-ci openshift-ci bot added the lgtm label Apr 4, 2025
Copy link

openshift-ci bot commented Apr 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jotak

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 Apr 4, 2025
@jotak jotak added approved and removed approved labels Apr 4, 2025
@jotak jotak merged commit 318a89b into netobserv:main Apr 4, 2025
15 of 17 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.

4 participants