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(k8s): local mode for container modules #2949

Merged
merged 101 commits into from
Jun 21, 2022

Conversation

vvagaytsev
Copy link
Collaborator

@vvagaytsev vvagaytsev commented May 11, 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 running-service-in-local-mode.md for more details.

See local-mode example to try it out.

@vvagaytsev vvagaytsev changed the title Feat: local mode with reverse k8s proxy feat: local mode with reverse k8s proxy May 11, 2022
Orzelius
Orzelius previously approved these changes May 11, 2022
Copy link
Contributor

@Orzelius Orzelius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this is same as #2880

@vvagaytsev vvagaytsev force-pushed the feat/local-mode-with-reverse-k8s-proxy branch 16 times, most recently from cdbb589 to ce43a0a Compare May 17, 2022 09:12
@vvagaytsev vvagaytsev requested a review from Orzelius May 17, 2022 09:18
@vvagaytsev
Copy link
Collaborator Author

I need to add some tests for enableLivenessProbe config option, will do it a bit later.

@vvagaytsev vvagaytsev marked this pull request as draft May 17, 2022 09:23
@vvagaytsev vvagaytsev force-pushed the feat/local-mode-with-reverse-k8s-proxy branch from ce43a0a to 307cd18 Compare May 17, 2022 09:47
@vvagaytsev vvagaytsev marked this pull request as ready for review May 17, 2022 10:23
@vvagaytsev vvagaytsev force-pushed the feat/local-mode-with-reverse-k8s-proxy branch from 761d108 to 99d43a4 Compare May 24, 2022 14:02
@vvagaytsev vvagaytsev requested a review from Orzelius May 27, 2022 05:01
@vvagaytsev vvagaytsev force-pushed the feat/local-mode-with-reverse-k8s-proxy branch from 99d43a4 to e770b5d Compare May 27, 2022 15:50
@vvagaytsev vvagaytsev marked this pull request as draft May 30, 2022 11:53
@vvagaytsev vvagaytsev force-pushed the feat/local-mode-with-reverse-k8s-proxy branch from 354ba38 to 98dbe28 Compare June 21, 2022 12:29
@vvagaytsev vvagaytsev changed the title feat: local mode with reverse k8s proxy feat: local mode over in-cluster reverse proxy Jun 21, 2022
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.

5 participants