-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
add labels to containers from job definition #414
add labels to containers from job definition #414
Conversation
Thanks for the PR. I think it is cleaner to provide these via the driver config instead of munging the meta property for the job. For instance, we might be able to do something like:
Also, I'm planning to add some basic labels based on the job name, task, etc. so these are already setup for monitoring tools. |
Yes, adding metadata is a bit annoying, but I though that the main idea was to try to have a common structure for all drivers, and since config is a map[string]string I couldn't figure something like labels. So, would be allowed to change Task.Config to map[string]interface{} ? that would allow us to add another map inside, but don't know if you allow that (thinking in performance or future driver design. |
@fernandezvara There is already a PR [ #415 ] in motion which introduces map[string]interface{} as the type of the config. I think you can implement this once that PR is merged into main. |
Yes, @diptanu, will wait until final merge, nice addition the config on its own struct. |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Since labels on containers are a power tool, Nomad must allow to set labels on docker containers if required.
This is a POC for add those labels without make any modification that could break job definition and located only on the docker driver.
Sometimes some environment variables need to be hidden for the user (by security or something), or are just meaningless.