Skip to content

Commit 8614c08

Browse files
authored
Merge pull request #4 from Shuanglu/agentmode
fix hostnetwork missing
2 parents 22f66c5 + 4e155f4 commit 8614c08

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

cmd/k8stcpdump/k8stcpdump.go

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ func generatePodManifest(runtimeEndpoint string, configMapName string, labelValu
156156
Labels: map[string]string{"run": labelValue},
157157
},
158158
Spec: apicore.PodSpec{
159+
HostNetwork: true,
159160
Volumes: []apicore.Volume{
160161
{
161162
Name: "targetpodsjson",

example/test.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
{
22
"Pods": [
33
{
4-
"Name": "tunnelfront-6d5cd84fc6-p7gdb",
4+
"Name": "kube-proxy-r2g4r",
55
"Namespace": "kube-system"
66
},
77
{
8-
"Name": "metrics-server-58fdc875d5-cnvml",
9-
"Namespace": "kube-system"
10-
},
11-
{
12-
"Name": "coredns-748cdb7bf4-jdxfm",
8+
"Name": "tunnelfront-678bc45dfd-89srb",
139
"Namespace": "kube-system"
1410
}
1511
],

k8sTcpdump

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)