-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Interpreted variables in environment variables #448
Comments
@bluk Thanks for opening an issue. This is currently supported only in a limited capacity. We'd like to expand this in a future release. So we can design and implement this correctly can you describe your use case? For example, I know one use-case is to configure docker container networking via |
@cbednarski Actually I'm trying to use the Nomad's client meta (used I am putting a unique UUID for Vault to use in Nomad's client meta configuration. Then I was hoping to use |
@bluk I see. So to clarify, you want to pass a value based on which node the job is placed on? Thanks for highlighting that use case! I think we can improve this. What I would recommend for now is putting a file on the filesystem on that machine, which you can read in your exec or mount into a container. |
@cbednarski Yes, exactly! :) Forgive my ignorance, but how do you mount an arbitrary filesystem into your container via Nomad? I didn't see any way to do that in the documentation. |
@bluk Ah that's a good question. We don't actually support this yet. Sorry to mislead you about this! |
For the new |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
The Constraint section in the Job Specification has a table with interpreted variables such as
$node.id
and$meta.<key>
. I assume the interpreted variables are meant for just constraints but I want to use them in other parts of the config.For my use case, I've added some host machine unique metadata to the Nomad client's meta configuration and want to pass that onto a task.
I tried using them in in a task's
env
section like:However, the value is set to the literal string
$node.id
(so not interpreted).Is there some way to do this? Thanks!
The text was updated successfully, but these errors were encountered: