NETOBSERV-2021: Improve UX#146
Conversation
|
Skipping CI for Draft Pull Request. |
| function setLastFlowFilter() { | ||
| "$YQ_BIN" e --inplace " .spec.template.spec.containers[0].env[] |= select(.name == \"FLOW_FILTER_RULES\").value |=(fromjson | .[-1].$1 = $2 | tostring)" "$3" | ||
| } | ||
|
|
There was a problem hiding this comment.
do u have sample output with mutli rule, I have standalone script fo ut this logic maybe we bring this in and intg with ut ci as logic start to become complex ?
There was a problem hiding this comment.
Sure. I will add examples and tests !
There was a problem hiding this comment.
I have added the following scenarios for now:
basic examples:
netobserv flows --drops # Capture dropped flows on all nodes
netobserv packets --port=8080 # Capture packets on port 8080
netobserv metrics --enable_all # Capture all cluster metrics with pktDrop, dns, rtt and network events features
advanced examples:
Capture drops in background and copy output locally
netobserv flows --background \ # Capture flows using background mode
--max-time=15m \ # for a maximum of 15 minutes
--protocol=TCP --port=8080 \ # either on TCP 8080
or --protocol=UDP # or UDP
netobserv follow # Display the progression of the background capture
netobserv stop # Stop the background capture by deleting eBPF agents
netobserv copy # Copy the background capture output data
netobserv cleanup # Cleanup netobserv CLI by removing the remaining collector pod
Capture packets on specific nodes and port
netobserv packets # Capture packets
--node-selector=netobserv:true \ # on nodes labelled with netobserv=true
--port=80 \ # on port 80 only
--max-bytes=100000000 # for a maximum of 100MB
Please let me know if you feel more would be useful
There was a problem hiding this comment.
can u pls include example with mutli rules ?
There was a problem hiding this comment.
You have one above in the advanced examples 😸
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
==========================================
+ Coverage 22.51% 23.53% +1.01%
==========================================
Files 11 11
Lines 1310 1330 +20
==========================================
+ Hits 295 313 +18
- Misses 999 1000 +1
- Partials 16 17 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
BTW if u added the rules in reverse order this will break filtering , rules has to place in the json array in the same order they are configured. |
The order is kept as I append the whole json from this file: https://github.com/netobserv/network-observability-cli/blob/994f4b4888d67fc72f1a90cd72d4295a50614507/res/flow-filter.json However we should document this behavior as it's can break easily ! |
|
/retest |
1 similar comment
|
/retest |
skrthomas
left a comment
There was a problem hiding this comment.
Just a few nitties 👼 , and otherwise LGTM! Thanks Julien :)
|
/ok-to-test |
|
New image: It will expire after two weeks. To use this build, update your commands using: USER=netobserv VERSION=ac57fb3 make commands |
|
Rebased without changes |
thanks @jpinsonneau , I'll give it a go, hopefully one last one 🤞 |
|
/ok-to-test |
|
New image: It will expire after two weeks. To use this build, update your commands using: USER=netobserv VERSION=1677996 make commands |
|
@jpinsonneau using the image from last commit I still see |
|
@Mehul as discussed here are the changes requested:
oh you meant on the script side ! I don't reproduce that behavior 🤔 |
|
/ok-to-test |
|
New image: It will expire after two weeks. To use this build, update your commands using: USER=netobserv VERSION=b382261 make commands |
|
New image: It will expire after two weeks. To use this build, update your commands using: USER=netobserv VERSION=103f79d make commands |
|
thanks @jpinsonneau , last commit fixes all the aforementioned issues. |
|
/label qe-approved |
|
@jpinsonneau: This pull request references NETOBSERV-2021 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: 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 please again, remember to use "Squash and merge" when not using the openshift bot for merging : there's a lot of unnecessary verbosity in the git history now |
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.