Skip to content

Commit aacb95e

Browse files
committed
wip
1 parent b1c6464 commit aacb95e

File tree

4 files changed

+31
-7
lines changed

4 files changed

+31
-7
lines changed

tools/mdbdebug/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Quick Start
2+
3+
### Build mdbdebug
4+
5+
```bash
6+
$ tools/mdbdebug/build.sh
7+
```
8+
9+
### Run mdbdebug
10+
Run mdbdebug controller to watch deployments in the current cluster:
11+
```bash
12+
bin/mdbdebug --context kind-kind --watch --deployPods
13+
```
14+
15+
Do not use `--deployPods` if you have large deployment in your cluster. Debugging pods are inefficient and eat ~0.5cpu each idle.
16+
17+
### Attach to debugging pods
18+
19+
```bash
20+
$ /bin/attach.sh
21+
```
22+
23+
24+
25+
26+

tools/mdbdebug/attach.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
set -Eeou pipefail
66

7+
source scripts/dev/set_env_context.sh
8+
79
if ! which fzf &>/dev/null ; then
810
echo "you need to install fzf:"
911
echo " brew install fzf"

tools/mdbdebug/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -Eeou pipefail
44

5+
source scripts/dev/set_env_context.sh
6+
57
script_name=$(readlink -f "${BASH_SOURCE[0]}")
68
script_dir=$(dirname "${script_name}")
79

@@ -18,7 +20,7 @@ GOOS=linux GOARCH=amd64 go build -o bin_linux ./...
1820
echo "Copying mdbdebug from to ${PROJECT_DIR}/bin"
1921
cp bin/mdbdebug "${PROJECT_DIR}/bin"
2022

21-
echo "Copying attach.sh and watch.sh to ${PROJECT_DIR}/bin"
23+
echo "Copying attach.sh to ${PROJECT_DIR}/bin"
2224
cp attach.sh "${PROJECT_DIR}/bin"
2325

2426
popd >/dev/null

tools/mdbdebug/watch.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)