Coder Social home page Coder Social logo

Comments (6)

proAlexandr avatar proAlexandr commented on July 17, 2024

Hi @vintikzzz, thanks for the feature request!
Could you clarify, please, where you would like to use env variables? In the config text, config's path or in resource fields (name/namespace)?

from kube-forwarder.

vintikzzz avatar vintikzzz commented on July 17, 2024

Ok! I have a lot of golang microservices in development. Every microservice reads information about location of another services from environment variable (see k8s docs). So it will be great if such env variables automatically become available in my dev-environment like this happens inside k8s.

from kube-forwarder.

proAlexandr avatar proAlexandr commented on July 17, 2024

@vintikzzz
Thanks for your comment, it seems I completely misunderstood the issue description.
Is it something like "Env variables forwarding" feature? l.e. you want that env variables from a pod are available on your dev machine (the machine on which Kube Forwarder is installed)?

from kube-forwarder.

vintikzzz avatar vintikzzz commented on July 17, 2024

@proAlexandr
I'll try to add more details:

Initial conditions:

  1. I have k8s cluster
  2. I have installed "Kube Forwarder" on my local machine
  3. I have local project A that reads standard k8s environment variables to communicate with service B inside k8s cluster (for example B_SERVICE_HOST and B_SERVCE_PORT)

Steps:

  1. In "Kube Forwarder" I add new resource that represents my service B, with forwarding resource port 8080 to my local port 8081
  2. "Kube Forwarder" makes port forwarding for service B and also injects environment variables on my local machine B_SERVICE_HOST=127.0.0.1 and B_SERVCE_PORT=8081
  3. I run my local project A and it automatically connects to service B that is inside k8s cluster with the help of port forwarding and env variables injection.

from kube-forwarder.

proAlexandr avatar proAlexandr commented on July 17, 2024

Thanks! Now, It is clear for me. I agree it could be a nice feature.
I suppose it could be implemented in this way:
image
There is an advanced section in the resource form. After you open it you see the checkbox. If the checkbox is checked two text fields appear and have default values based on the resource name.

Sorry, I can't promise you that the feature will be implemented soon. Feel free to make a PR if it's very important for you.

from kube-forwarder.

dobesv avatar dobesv commented on July 17, 2024

That's kind of interesting, but where would it inject those environment variables into? .bashrc ?

from kube-forwarder.

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.