Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reverse proxying for local k8s dev #2880

Closed
wants to merge 159 commits into from

Conversation

vvagaytsev
Copy link
Collaborator

@vvagaytsev vvagaytsev commented Mar 30, 2022

What this PR does / why we need it:
This PR implements a "replacement" of a Garden service (or a few services) running in a k8s cluster with a locally deployed application (or a few applications).

In order to achieve this, the target container in the k8s cluster is replaced with a proxy container that runs an ssh server. First, the Garden app starts an SSH tunnel between the local service and the proxy container using kubectl port-forward command. Next, it starts a reverse-port-forwarding with ssh between the remote proxy container's exposed port and the local app's port with ssh command.

The Garden supports the new local-mode option in deploy command and the new localMode configuration entry. It allows running a Garden service in "local mode". It means running the application locally and connecting it to the k8s cluster via a proxy container.

See https://github.com/garden-io/garden/blob/reverse-proxying-for-local-k8s-dev/docs/guides/running-service-in-local-mode.md for more details.

@vvagaytsev vvagaytsev force-pushed the reverse-proxying-for-local-k8s-dev branch 13 times, most recently from d53fc1e to 2d2ee5c Compare April 7, 2022 10:39
@vvagaytsev vvagaytsev force-pushed the reverse-proxying-for-local-k8s-dev branch 7 times, most recently from ab1d5b9 to 2d5fa3a Compare April 14, 2022 10:59
@vvagaytsev vvagaytsev force-pushed the reverse-proxying-for-local-k8s-dev branch 3 times, most recently from abf8f48 to c6eed30 Compare April 19, 2022 10:55
@vvagaytsev vvagaytsev changed the title WIP: Reverse proxying for local k8s dev feat: reverse proxying for local k8s dev Apr 19, 2022
@vvagaytsev vvagaytsev force-pushed the reverse-proxying-for-local-k8s-dev branch 6 times, most recently from 172fa45 to a6cf6d7 Compare April 22, 2022 17:25
@vvagaytsev vvagaytsev force-pushed the reverse-proxying-for-local-k8s-dev branch from f1dafbb to b27c6a5 Compare May 11, 2022 14:55
@vvagaytsev
Copy link
Collaborator Author

Alternative PR (with the same contents) is #2949 - it has the squashed changes and only 3 commits. I'll likely use the new branch local-mode-with-reverse-k8s-proxy as a root feature branch and will create a few more PRs targeted to that branch with some further changes and fixes.

@vvagaytsev
Copy link
Collaborator Author

Closing this is favour of #2949

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants