-
Notifications
You must be signed in to change notification settings - Fork 35
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
apply tshark ip filter and compression options to the tshark insatnce #452
apply tshark ip filter and compression options to the tshark insatnce #452
Conversation
WalkthroughRecent updates to the code include modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TestTshark
participant TsharkCollectorConfig
User ->> TestTshark: Trigger Test
TestTshark -->> TestTshark: Set filename with .tar.gz
TestTshark -->> TsharkCollectorConfig: Update VolumeSize to 4Gi, Set CompressFiles to true
TestTshark -x TsharkCollectorConfig: Removed CleanUp logic
TestTshark ->> User: Test Completed Successfully
User ->> TsharkCollectorConfig: Create Instance
TsharkCollectorConfig -->> TsharkCollectorConfig: Add IpFilter & CompressFiles fields
TsharkCollectorConfig ->> User: Instance Created
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- e2e/tshark/tshark_test.go (2 hunks)
- pkg/instance/instance.go (1 hunks)
- pkg/instance/tshark.go (3 hunks)
Additional comments not posted (6)
pkg/instance/tshark.go (3)
26-27
: New environment variables for compression and IP filtering.The introduction of
COMPRESS_FILES
andIP_FILTER
as environment variables allows for dynamic configuration of these features at runtime. It's crucial to ensure that these variables are properly handled in all scenarios where the tshark collector is used.
65-66
: Environment variable assignments for new features.The assignment of the
COMPRESS_FILES
andIP_FILTER
environment variables ensures that the tshark collector's behavior can be controlled based on the user's configuration. This is a good use of configuration to control functionality dynamically.
10-10
: Updated tshark collector image version.This change updates the tshark collector image to version
pr-17
. Ensure that this version supports all the newly introduced features and is fully compatible with the existing system.e2e/tshark/tshark_test.go (2)
59-59
: Updated filename to reflect compression.The filename now includes a ".tar.gz" extension, indicating that the files will be compressed. This change is consistent with the new
CompressFiles
feature and should be tested to ensure that the compression is performed as expected.
Line range hint
66-75
: Configuration of the tshark collector with new features.The
TsharkCollectorConfig
is correctly updated to include new fields likeCompressFiles
and a reducedVolumeSize
. It's important to verify that these settings are effective in a real environment, especially the impact of the reduced volume size on data capture capabilities.pkg/instance/instance.go (1)
95-101
: New fields added to TsharkCollectorConfig for enhanced functionality.The addition of
IpFilter
andCompressFiles
fields in theTsharkCollectorConfig
struct aligns with the PR's objective to extend filtering and compression features to the tshark instance. These fields are well-documented, which is good for maintainability.
- IpFilter: Ensures traffic can be filtered based on IP, enhancing targeted data capture.
- CompressFiles: Allows for compression of pcap files before uploading to S3, potentially reducing storage and transfer costs.
Ensure that the corresponding logic to handle these configurations is implemented wherever the
TsharkCollectorConfig
is utilized.
Since the two options for filtering a particular IP address and enable file compression are added to
tshark-uploader
, this PR proposes a change to add them to thetshark
instance inknuu
so the users can configure it based on their needs.Summary by CodeRabbit
New Features
Improvements
TsharkCollectorConfig
from "10Gi" to "4Gi".tsharkCollectorImage
to versionpr-17
for improved performance and stability.Configuration Updates
COMPRESS_FILES
andIP_FILTER
.