-
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
Nomad should pass job, alloc and task ids as docker labels #4781
Comments
job "demo" {
group "demo" {
task "demo" {
config {
labels {
key = value
}
}
}
}
} |
Where would the values come from at runtime? Are there variables i can use to set them? (Let me look..) Edit - i looked and I only see ENV vars that have these details (aside from jobId), which i’m not sure we can pass in as labels in the job file. Or can we? Note - mesos does this automatically. (It sorta feels like it shoudl be an automatic thing) |
you can reference any environment key using interpolation |
Hey @jippi , I was going to be using Docker Labels for our containers to autodiscover haproxy and would be putting it into the Nomad Definition. I am curious how to handle each of the keys: What would the syntax look like because it seems like single quotes are not recognized by the Nomad definition? Thanks |
Absence of this feature prevents me from effectively using cAdvisor (with Prometheus), as we have same task names in different nomad jobs. I am even considering implementing an augmenting proxy that would rewrite Prometheus metrics obtained from cAdvisor adding Nomad job and group name based on the allocation id, which is included as a suffix in the |
@kshpytsya you can expose these via cadvisor's |
Any news on this? It would be a very useful feature for log shipping agents ( like promtail) which can only read Docker labels. |
FYI i've created a PR adding those labels #9885 |
Forgot to close this one out when #9885 was merged. Marked for 1.1.0 |
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. |
It woudl be very useful if nomad passed jobId, alloc Id, and taskid as docker labels on container.create().
This will allow us to correlate - via monitoring tools, (Sysdig/Prometheus/etc) and security tooling - running containers with nomad Runtime metadata. Its very common for these tools to pull in docker labels as means for identification and other categorization purposes.
@rcgenova
The text was updated successfully, but these errors were encountered: