diff --git a/Dockerfile b/Dockerfile index c19b1805f..a3864f126 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,8 +48,6 @@ WORKDIR /app COPY --from=builder ["/app/agent-build/mizuagent", "."] COPY --from=site-build ["/app/ui-build/build", "site"] -COPY agent/start.sh . - # gin-gonic runs in debug mode without this ENV GIN_MODE=release diff --git a/agent/start.sh b/agent/start.sh deleted file mode 100755 index 4b04b6d47..000000000 --- a/agent/start.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./mizuagent -i any -hardump -targets ${TAPPED_ADDRESSES} diff --git a/cli/kubernetes/provider.go b/cli/kubernetes/provider.go index fcbb78502..221895ad4 100644 --- a/cli/kubernetes/provider.go +++ b/cli/kubernetes/provider.go @@ -577,7 +577,6 @@ func (provider *Provider) ApplyMizuTapperDaemonSet(ctx context.Context, namespac "./mizuagent", "-i", "any", "--tap", - "--hardump", "--api-server-address", fmt.Sprintf("ws://%s/wsTapper", apiServerPodIp), } if tapOutgoing { diff --git a/tap/passive_tapper.go b/tap/passive_tapper.go index 79274029f..ae745caa3 100644 --- a/tap/passive_tapper.go +++ b/tap/passive_tapper.go @@ -84,7 +84,6 @@ var staleTimeoutSeconds = flag.Int("staletimout", 120, "Max time in seconds to k var memprofile = flag.String("memprofile", "", "Write memory profile") // output -var dumpToHar = flag.Bool("hardump", false, "Dump traffic to har files") var HarOutputDir = flag.String("hardir", "", "Directory in which to store output har files") var harEntriesPerFile = flag.Int("harentriesperfile", 200, "Number of max number of har entries to store in each file") @@ -186,19 +185,12 @@ func (c *Context) GetCaptureInfo() gopacket.CaptureInfo { func StartPassiveTapper(opts *TapOpts) (<-chan *OutputChannelItem, <-chan *OutboundLink) { hostMode = opts.HostMode - var harWriter *HarWriter - if *dumpToHar { - harWriter = NewHarWriter(*HarOutputDir, *harEntriesPerFile) - } + harWriter := NewHarWriter(*HarOutputDir, *harEntriesPerFile) outboundLinkWriter := NewOutboundLinkWriter() go startPassiveTapper(harWriter, outboundLinkWriter) - if harWriter != nil { - return harWriter.OutChan, outboundLinkWriter.OutChan - } - - return nil, outboundLinkWriter.OutChan + return harWriter.OutChan, outboundLinkWriter.OutChan } func startMemoryProfiler() { @@ -321,10 +313,8 @@ func startPassiveTapper(harWriter *HarWriter, outboundLinkWriter *OutboundLinkWr } } - if *dumpToHar { - harWriter.Start() - defer harWriter.Stop() - } + harWriter.Start() + defer harWriter.Stop() defer outboundLinkWriter.Stop() var dec gopacket.Decoder