File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Pod
3+ metadata :
4+ name : go115pod
5+ spec :
6+ containers :
7+ - name : go115app
8+ image : go115app
9+ args :
10+ - /dbg/go/bin/dlv
11+ - exec
12+ - --log
13+ - --headless
14+ - --continue
15+ - --accept-multiclient
16+ - --listen=localhost:56286
17+ - --api-version=2
18+ - ./app
19+ ports :
20+ - containerPort : 8080
21+ - containerPort : 56286
22+ name : dlv
23+ readinessProbe :
24+ httpGet :
25+ path : /
26+ port : 8080
27+ volumeMounts :
28+ - mountPath : /dbg
29+ name : go-debugging-support
30+ initContainers :
31+ - image : gcr.io/gcp-dev-tools/duct-tape/go
32+ name : install-go-support
33+ resources : {}
34+ volumeMounts :
35+ - mountPath : /dbg
36+ name : go-debugging-support
37+ volumes :
38+ - emptyDir : {}
39+ name : go-debugging-support
40+
41+ ---
42+ apiVersion : batch/v1
43+ kind : Job
44+ metadata :
45+ name : connect-to-go115
46+ labels :
47+ project : container-debug-support
48+ type : integration-test
49+ spec :
50+ ttlSecondsAfterFinished : 10
51+ backoffLimit : 1
52+ template :
53+ spec :
54+ restartPolicy : Never
55+ volumes :
56+ - name : kubectl
57+ emptyDir : {}
58+ initContainers :
59+ - name : copy-kubectl
60+ image : bitnami/kubectl
61+ command : [sh, -c, 'cp -p /opt/bitnami/kubectl/bin/kubectl /kubectl/kubectl']
62+ volumeMounts :
63+ - mountPath : /kubectl
64+ name : kubectl
65+ containers :
66+ - name : dlv-to-go115
67+ image : gcr.io/gcp-dev-tools/duct-tape/go
68+ command : [sh, -c, 'sleep 5;
69+ /kubectl/kubectl port-forward pod/go115pod 56286:56286 &
70+ sleep 2;
71+ (echo bt; echo exit -c) > init.txt;
72+ set -x;
73+ /duct-tape/go/bin/dlv connect --init init.txt localhost:56286']
74+ volumeMounts :
75+ - mountPath : /kubectl
76+ name : kubectl
77+
78+
You can’t perform that action at this time.
0 commit comments