Git Product home page Git Product logo

Comments (11)

progrium avatar progrium commented on June 7, 2024

Yeah, I don't think any of the backends actually support other attributes
yet. Soon Consul will.

On Tue, Oct 28, 2014 at 3:49 PM, joncolby [email protected] wrote:

I am using Docker with consul and tried this out the other day. I am
particularly interested in adding custom metadata to the Attrs data
structure, however I couldn't get this to work.

I tried setting a random metadata env variable such as
SERVICE_RELEASE=12345 and SERVICE_SERVERCLASS=SEARCH in the Dockerfile, and
the env variables are visible from inside the running container. However,
after querying the consul services I did not see and Attrs.

Overwriting Tags via the env variable SERVICE_TAGS did work however, so I
think I am doing it right.

any known issues with this? I don't know go so I didn't peek into the
source code.


Reply to this email directly or view it on GitHub
https://github.com/progrium/registrator/issues/52.

Jeff Lindsay
http://progrium.com

from registrator.

joncolby avatar joncolby commented on June 7, 2024

Thanks for the quick answer. Registrator is a great idea and a cool project.

from registrator.

progrium avatar progrium commented on June 7, 2024

Thanks!

from registrator.

gastonmorixe avatar gastonmorixe commented on June 7, 2024

Guys, How can I get/set say "postgres" container "user" and "password" from consul using registrator?

from registrator.

progrium avatar progrium commented on June 7, 2024

Afaik Consul doesn't support attributes with services yet. They might eventually I think. As you can see from that linked issue it seems they will.

from registrator.

gastonmorixe avatar gastonmorixe commented on June 7, 2024

@progrium Yeah, but... how about using key/value for this?
i.e. "{SERVICE_NAME}:{ENV_VAR}" => "{ENV_VALUE}"
And we export all exposed container's envs

from registrator.

progrium avatar progrium commented on June 7, 2024

Maybe? That seems like a special case. It's more often you want to go the other way around from Consul KV to Docker environment. Seems like a third party module you could make after we improve module support.

from registrator.

gastonmorixe avatar gastonmorixe commented on June 7, 2024

Is it so special? Like the prev. example. Postgres exposes the username and password, and I need it everywhere I want to connect to the it. Otherwise registrator + consul still won't be useful for this use case. And yes, the other way around is to use consul template to get the user/pass

from registrator.

progrium avatar progrium commented on June 7, 2024

Yeah that sounds like the wrong way to go about that problem anyway.

On Tuesday, April 7, 2015, Gaston Morixe [email protected] wrote:

Is it so special? Like the prev. example. Postgres exposes the username
and password, and I need it everywhere I want to connect to the it.
Otherwise registrator + consul still won't help me in this case.


Reply to this email directly or view it on GitHub
#52 (comment)
.

Jeff Lindsay
http://progrium.com

from registrator.

gastonmorixe avatar gastonmorixe commented on June 7, 2024

How would it better? Thanks

from registrator.

progrium avatar progrium commented on June 7, 2024

Exercise for the reader :)

from registrator.

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.