Skip to content

Commit 913d1c0

Browse files
committed
update
Signed-off-by: Hang Yan <[email protected]>
1 parent 56f5993 commit 913d1c0

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

pkg/antctl/antctl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ $ antctl get podmulticaststats pod -n namespace`,
779779
},
780780
{
781781
cobraCommand: packetcapture.Command,
782-
supportAgent: false,
782+
supportAgent: true,
783783
supportController: true,
784784
},
785785
{

pkg/antctl/command_list.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,11 @@ func (cl *commandList) GetDebugCommands(mode string) [][]string {
139139
}
140140
}
141141
for _, cmd := range cl.rawCommands {
142-
if cmd.cobraCommand.Use == "proxy" {
142+
143+
if cmd.cobraCommand.Use == "proxy" || cmd.cobraCommand.Use == "packetcapture" {
143144
// proxy will keep running until interrupted so it
144-
// cannot be used as is in e2e tests.
145+
// cannot be used as is in e2e tests. For packetcapture, the default values didn't
146+
// make much sense in e2e tests.
145147
continue
146148
}
147149
if mode == runtime.ModeController && cmd.supportController ||

pkg/antctl/raw/packetcapture/command.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func init() {
8484

8585
Command.Flags().StringVarP(&options.source, "source", "S", "", "source of the the PacketCapture: Namespace/Pod, Pod, or IP")
8686
Command.Flags().StringVarP(&options.dest, "destination", "D", "", "destination of the PacketCapture: Namespace/Pod, Pod, or IP")
87-
Command.Flags().Int32VarP(&options.number, "number", "n", 0, "target number of packets to capture, the capture will stop when it is reached")
87+
Command.Flags().Int32VarP(&options.number, "number", "n", 1, "target number of packets to capture, the capture will stop when it is reached")
8888
Command.Flags().StringVarP(&options.flow, "flow", "f", "", "specify the flow (packet headers) of the PacketCapture, including tcp_src, tcp_dst, udp_src, udp_dst")
8989
Command.Flags().BoolVarP(&options.nowait, "nowait", "", false, "if set, command returns without retrieving results")
9090
Command.Flags().StringVarP(&options.outputDir, "output-dir", "o", ".", "save the packets file to the target directory")

0 commit comments

Comments
 (0)