File tree 4 files changed +49
-9
lines changed
4 files changed +49
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"configurations" : [
3
+ {
4
+ "name" : " Attach to Kubernetes Node" ,
5
+ "type" : " node" ,
6
+ "request" : " attach" ,
7
+ "smartStep" : true ,
8
+ "port" : 9229 ,
9
+ "address" : " 127.0.0.1" ,
10
+ "localRoot" : " ${workspaceFolder}/components" ,
11
+ "remoteRoot" : " /app/node_modules/@gitpod" ,
12
+ "skipFiles" : [
13
+ " <node_internals>/**"
14
+ ]
15
+ },
3
16
{
4
17
"name" : " Attach to Node" ,
5
18
"type" : " node" ,
21
34
"mode" : " remote"
22
35
},
23
36
{
24
- // This will run the db-test yarn target in the gitpod-db component.
25
- // This allows you to set breakpoints in your tests and step through
26
- // them with the VSCode debugger.
27
37
"type" : " node" ,
28
38
"request" : " launch" ,
29
39
"name" : " gitpod-db-tests" ,
30
40
"cwd" : " ${workspaceFolder}/components/gitpod-db" ,
31
41
"runtimeExecutable" : " yarn" ,
32
- "runtimeArgs" : [" db-test" ],
42
+ "runtimeArgs" : [
43
+ " db-test"
44
+ ],
33
45
"internalConsoleOptions" : " openOnSessionStart" ,
34
46
"skipFiles" : [
35
47
" <node_internals>/**"
36
48
]
37
49
}
38
50
]
39
- }
51
+ }
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- set -Eeuo pipefail
4
- source /workspace/gitpod/scripts/ws-deploy.sh deployment server
3
+ deploymentName=" server"
4
+ debugPort=" 9229"
5
+
6
+ echo " Storing the original deployment configuration in a file"
7
+ kubectl get deployment $deploymentName -o json > original_deployment_$deploymentName .json
8
+
9
+ function restore {
10
+ echo " Restoring the original deployment configuration and stop port forwarding"
11
+ kubectl replace --force -f original_deployment_$deploymentName .json
12
+ rm original_deployment_$deploymentName .json
13
+ }
14
+ trap restore EXIT
15
+
16
+ echo " Add the inspect flag and debug port to the configuration"
17
+ jq ' .spec.template.spec.containers[0].command = ["yarn", "start-inspect"]' original_deployment_$deploymentName .json > new_deployment_$deploymentName .json
18
+
19
+ echo " Apply the new configuration"
20
+ kubectl apply -f new_deployment_$deploymentName .json
21
+ rm new_deployment_$deploymentName .json
22
+
23
+ echo " Scale down to one pod"
24
+ kubectl scale deployment $deploymentName --replicas=1
25
+
26
+ echo " Forward the port $debugPort to localhost. Waiting for a debugger to attach ..."
27
+ kubectl port-forward deployment/$deploymentName $debugPort
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -Eeuo pipefail
4
+ source /workspace/gitpod/scripts/ws-deploy.sh deployment server
Original file line number Diff line number Diff line change 5
5
"license" : " AGPL-3.0" ,
6
6
"scripts" : {
7
7
"start" : " node ./dist/main.js" ,
8
- "start-inspect" : " node --inspect=9229 ./dist/main.js" ,
8
+ "start-inspect" : " node --inspect=0.0.0.0: 9229 ./dist/main.js" ,
9
9
"prepare" : " yarn clean && yarn build" ,
10
10
"build" : " yarn lint && npx tsc" ,
11
11
"build:clean" : " yarn clean && yarn build" ,
22
22
"telepresence" : " telepresence --swap-deployment server --method inject-tcp --run yarn start-inspect"
23
23
},
24
24
"files" : [
25
- " /dist"
25
+ " /dist" ,
26
+ " /src"
26
27
],
27
28
"dependencies" : {
28
29
"@authzed/authzed-node" : " ^0.10.0" ,
You can’t perform that action at this time.
0 commit comments