mirror of
https://github.com/foomo/gograpple.git
synced 2025-10-16 12:35:37 +00:00
chore: update readme with examples
This commit is contained in:
parent
a3d29b4915
commit
4430877d44
32
README.md
32
README.md
@ -19,6 +19,38 @@ start patch debugging in interactive mode
|
||||
gograpple interactive
|
||||
```
|
||||
when you configure your patch correctly a file will be saved in your cwd and the debug session will start immmediatelly
|
||||
## configuration
|
||||
### patch (default)
|
||||
| field | default value | description |
|
||||
|---|---|---|
|
||||
| source_path | | absolute path to the main.go (entrypoint) |
|
||||
| cluster | | cluster context to use |
|
||||
| namespace | | kubernetes namespace |
|
||||
| deployment | | kubernetes deployment |
|
||||
| container | | pod container to use |
|
||||
| listen_addr | 127.0.0.1:2345 | address to listen on for delve server |
|
||||
| image | alpine:latest | image to use as base when building the patch |
|
||||
| delve_continue | false | continue the debugged process on start |
|
||||
| launch_vscode | false | launch vscode with debug config |
|
||||
### example config explained
|
||||
if we use the following gograppe-patch example:
|
||||
```
|
||||
source_path: /home/runz0rd/dev/backend/cmd/search/search.go
|
||||
cluster: gke_my-awesome-webshop-stage_europe-west1_default
|
||||
namespace: stage-a
|
||||
deployment: search-service-default
|
||||
container: search
|
||||
listen_addr: 127.0.0.1:2345
|
||||
source_path: alpine:latest
|
||||
delve_continue: false
|
||||
launch_vscode: true
|
||||
```
|
||||
the following will happen:
|
||||
- your application at specified `source_path` will be built with base image `image` into a patch image
|
||||
- that patch image will be pushed into the same repo as the image thats originally deployed, for example `my-image-repo.com/backend/search-service:some-tag` will be `my-image-repo.com/backend/search-service-patch:latest`
|
||||
- the `deployment` you specified in `namespace` and `cluster` will be patched to allow running a delve server on it with your application
|
||||
- delve server will be started in your `container` and port-forwarded to be on `listen_addr`
|
||||
- if configured `delve_continue` will be applied on dlv startup and `launch_vscode` will simplify the debug session for vscode users
|
||||
|
||||
## common issues
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user