Skip to content

Commit

Permalink
feat: add tshark new options to knuu tshark instance
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba-esk committed Jun 21, 2024
1 parent 9fdacd2 commit 4f6de7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions e2e/tshark/tshark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ func TestTshark(t *testing.T) {
require.NoError(t, err, "error getting S3 (minio) configs")

var (
filename = target.K8sName() + instance.TsharkCaptureFileExtension
filename = target.K8sName() + instance.TsharkCaptureFileExtension + ".tar.gz" // compressed file extension
keyPrefix = "tshark/" + scope
fileKey = filepath.Join(keyPrefix, filename)
)

err = target.EnableTsharkCollector(
instance.TsharkCollectorConfig{
VolumeSize: "10Gi",
VolumeSize: "4Gi",
S3AccessKey: minioConf.AccessKeyID,
S3SecretKey: minioConf.SecretAccessKey,
S3Region: s3Location,
Expand All @@ -72,19 +72,14 @@ func TestTshark(t *testing.T) {
S3KeyPrefix: keyPrefix,
S3Endpoint: minioConf.Endpoint,
UploadInterval: 1 * time.Second, // for sake of the test we keep this short
CompressFiles: true,
},
)
require.NoError(t, err, "error enabling tshark collector")

err = target.Commit()
require.NoError(t, err, "error committing instance")

t.Cleanup(func() {
if err := kn.CleanUp(ctx); err != nil {
t.Logf("error cleaning up knuu: %v", err)
}
})

// Test logic

t.Log("starting target instance")
Expand Down
2 changes: 1 addition & 1 deletion pkg/instance/tshark.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

const (
tsharkCollectorName = "tshark-collector"
tsharkCollectorImage = "ghcr.io/celestiaorg/tshark-s3:latest"
tsharkCollectorImage = "ghcr.io/celestiaorg/tshark-s3:pr-17"
tsharkCollectorCPU = "100m"
tsharkCollectorMemory = "250Mi"
tsharkCollectorVolumePath = "/tshark"
Expand Down

0 comments on commit 4f6de7a

Please sign in to comment.