Comments (4)
Jean-Paul expressed a preference for doing this on level of config files, rather than talking to Kubernetes cluster, since it gives more visibility over how things are done.
from telepresence.
An idea in the opposite direction might be to have telepresence actually edit the existing Deployment for the user. A command line:
$ telepresence --deployment foo --container bar --new-shell
could patch foo
so that its bar
container uses the telepresence image and then start a shell in the proxied environment for that container. When the shell exits, telepresence could even roll the deployment back.
That seems kinda snazzy to me though it may be sufficiently automagical that there are some unwanted obscure corner-cases or side-effects.
from telepresence.
Current plan:
$ telepresence --swap-deployment existingservice --run-shell
This swaps out Telepresence proxy for existing pod, and reverts on shutdown.
If you have more than one container:
$ telepresence --swap-deployment existingservice:containername --run-shell
Swap out is done by getting kubectl get deployment --export
version of JSON, switching replicas to 1 and image to our image.
My first thought on how revert is to be done was using the apply
mechanism: at beginning of process the current revision is recorded, and kubectl rollout undo
is used to rollback. Deployments created with both kubectl apply
and kubectl create
appear to start with a revision, so presumably everything will have a revision. However, this doesn't appear to undo change to number of replicas.
This suggests a different mechanism: the same logic that does the swap out could be used for the swap back, we just need to remember old image name and replicas until shutdown.
from telepresence.
Remaining work for swap-deployment
branch:
- Get all tests passing (hopefully just dealing with fiddly bits in
Runner.check_call
). - Test against OpenShift, make sure it works.
- Make sure no k8s resources are leaked by telepresence or the test suite.
- Update documentation and asciinema video (that could be done in separate branch, though.)
from telepresence.
Related Issues (20)
- "Connection refused" with Telepresence 2.19.3 HOT 4
- Can't start telepresence HOT 3
- telepresence helm install outputs success on potential error HOT 1
- Telepresence on Windows can not connect HOT 1
- telepresence intercept: error: found no service with a port that matches a container in pod HOT 11
- Building without "-tags embed_fuseftp" still errors out due to "pattern fuseftp.bits: no matching files found" HOT 2
- Report the use of components with vulnerabilities in telepresence HOT 2
- how to disable traffic agent
- Why do I keep getting reminded about identity verification? HOT 6
- telepresence connect: error: HOT 1
- chart: add option to supply own cert bundle HOT 9
- Intercept with --service option not working when multiple service matching selector HOT 13
- Connecting in Windows WSL with --docker option does not succeed HOT 1
- ReportMetrics failed errors HOT 2
- not able to use telepresence with m3 chip HOT 1
- Provide Homebrew release of OSS version "tel2oss" of Telepresence HOT 1
- Unable to install and run telepresence inside a docker container HOT 7
- [MacOS] Telepresence opens many AWS auth request tabs in the browser even while the computer is asleep HOT 5
- allowConflictingSubnets not recognised in laptop config.yml HOT 2
- DNS Errors after connecting with telepresence on Windows HOT 28
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telepresence.