gograpple/test/app
2023-01-30 17:26:08 +01:00
..
.vscode apply small fixes 2023-01-30 17:26:08 +01:00
chart refactor cleanup, update attach dlv build 2023-01-29 09:40:12 +01:00
Dockerfile refactor attach, add debug mode 2023-01-29 13:44:29 +01:00
example.yaml update dependencies, example config and small log changes 2022-06-03 15:24:43 +02:00
main.go refactor attach, add debug mode 2023-01-29 13:44:29 +01:00
Makefile implement config generate and load with suggestions 2022-05-20 17:13:26 +02:00
README.md chore: add readme for example app debugging 2022-04-14 16:09:21 +02:00

README

Instructions to debug the example app.

STEPS

Install dependencies:

$ brew install helm kubectx k9s

Start docker, check which context you are connected to:

$ kubectx
docker-desktop

Setup local cluster, deploy test chart:

$ cd test/app
$ make build && make deploy

Use k9s to check if the example app pod is running:

$ k9s

then patch:

$ gograpple patch example --image golang

and debug (using vscode):

$ gograpple delve example --source . --vscode

set a breakpoint in the HTTP handler.

Note: before the startup of the service debugging does not work as delve is not started yet!

Use port forwarding via k9s to expose the pod (shift-F):

  • App Port: 80
  • Local Port: 8080

Note: This will be reverted once you exit k9s!

Now access the web service by visiting: http://localhost:8080

You should be dropped into the debugger in VSCode at the breakpoint!

Once done, rollback:

$ gograpple patch example --rollback

Happy debugging!