You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 31, 2021. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+9-66
Original file line number
Diff line number
Diff line change
@@ -58,76 +58,19 @@ make deploy-mini-application
58
58
This will build a new docker image from your current code as well as evaluate any changes made to the `values.local.yaml`
59
59
file in your project directory and push those changes to minikube.
60
60
61
-
If you want to do step debugging you can use a tool called telepresence. The shorthand make target below will spawn a new
62
-
tmux session with both `minikube tunnel` and `telepresence` running side by side. This is because on their own I've found
63
-
that telepresence does not always tunnel traffic properly. And minikube has no way to send traffic from its cluster to
64
-
a local target. This will do both.
61
+
If you want to do step debugging there is a shortcut in the makefile to do so. You will need to create a `config.yaml`
62
+
file in your project directory with all the same settings you have specified in your `values.local.yaml` for everything
63
+
to work properly. Once you have done that you can run the command below:
65
64
66
65
```bash
67
-
make debug-api-mini
66
+
make local-api
68
67
```
69
68
70
-
Which will let you run the REST API on your actual computer and serve requests from minikube there. This means you can
71
-
run the REST API in GoLand or VSCode and use a step debugger to debug requests. There is a caveat with doing this though;
72
-
configuration is primarily provided to the REST API service in Kubernetes via environment variables. So you may need to
73
-
make a `config.yaml` file in your project directory and add any configuration options there in order to run the service
74
-
properly. More documentation on that file will be added at a later date.
75
-
76
-
You'll need to install macFUSE and SSHFS from the installer packages here: https://osxfuse.github.io/
77
-
78
-
79
-
You may see an error like the following in the tmux session that is started:
80
-
```
81
-
T: Warning: kubectl 1.21.0 may not work correctly with cluster version 1.18.15 due to the version discrepancy. See https://kubernetes.io/docs/setup/version-skew-policy/ for more information.
82
-
83
-
T: Using a Pod instead of a Deployment for the Telepresence proxy. If you experience problems, please file an issue!
84
-
T: Set the environment variable TELEPRESENCE_USE_DEPLOYMENT to any non-empty value to force the old behavior, e.g.,
T: Starting proxy with method 'inject-tcp', which has the following limitations: Go programs, static binaries, suid programs, and custom DNS implementations are not supported. For a full list of method limitations see
88
-
T: https://telepresence.io/reference/methods.html
89
-
T: Volumes are rooted at $TELEPRESENCE_ROOT. See https://telepresence.io/howto/volumes.html for details.
90
-
T: Starting network proxy to cluster by swapping out Deployment rest-api with a proxy Pod
91
-
T: Forwarding remote port 9000 to local port 9000.
92
-
T: Forwarding remote port 4000 to local port 4000.
93
-
94
-
95
-
Looks like there's a bug in our code. Sorry about that!
96
-
97
-
Traceback (most recent call last):
98
-
File "/Users/elliotcourant/monetr/rest-api/bin/telepresence/telepresence/cli.py", line 135, in crash_reporting
99
-
yield
100
-
File "/Users/elliotcourant/monetr/rest-api/bin/telepresence/telepresence/main.py", line 81, in main
101
-
user_process = launch(
102
-
File "/Users/elliotcourant/monetr/rest-api/bin/telepresence/telepresence/outbound/setup.py", line 64, in launch
18.5 TEL | END SPAN local.py:42(set_up_torsocks) 15.0s
125
-
126
-
Would you like to file an issue in our issue tracker? You'll be able to review and edit before anything is posted to the public. We'd really appreciate the help improving our product. [Y/n]:
127
-
```
128
-
129
-
If you do, **do not enter `n` or exit telepresence**. Chances are it actually did work and is tunneling TCP traffic like
130
-
we want it to.
69
+
This will spawn a new tmux window with a minikube tunnel in it. This is needed for the API to talk to the services it
70
+
needs within the minikube cluster.
71
+
This will also swap out the target for the API service in kubernetes with an endpoint pointed at your computer and at port
72
+
4000. This way you can run a REST API instance locally through something like GoLand or VSCode and step debug API
0 commit comments