Coder Social home page Coder Social logo

Comments (4)

itamarst avatar itamarst commented on July 25, 2024

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.

exarkun avatar exarkun commented on July 25, 2024

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.

itamarst avatar itamarst commented on July 25, 2024

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.

itamarst avatar itamarst commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.