Containers-roadmap: FEATURE REQUEST: Propagate Container Instance and Service Tags to Task

Created on 22 Nov 2018  路  5Comments  路  Source: aws/containers-roadmap

Summary

Would be great to have the ECS Container Instance, Service and Task Tags to propagate to the container as labels and be able to retrieve the labels from inside the container. Or add the docker daemon labels to the metadata.

Description

curl $ECS_CONTAINER_METADATA_URI
should display container instance, service and task tags as labels.

Could be used to provide instance specific information to each containers.

ECS Proposed

Most helpful comment

up

All 5 comments

Hey Math,
We're looking to implement this feature request and would like more details regarding your use case. We are currently planning on adding an additional endpoint ($ECS_CONTAINER_METADATA_URI/taskWithTags). This endpoint will have the same information as $ECS_CONTAINER_METADATA_URI/task but with two additional fields on the endpoint for TaskTags and ContainerInstanceTags. This endpoint uses ECS API calls to dynamically retrieve tags, so only users needing this information can choose to use this URI, others can avoid any impact to latency with API calls. Does this address your use case?

Adding them to the Docker labels would make the Tags static, and would not change for the lifetime of the Docker container. Additionally, Service tags can already be propagated to Task tags so this solution would also display any Service Tags as well.

Thanks,
Kar Shin

Hi Kar,
I currently have a workaround where I do call the describe-container-instance api to get the tags. For the task tags, I figured they wouldn't be required in my case.

My use case is that some containers needs to know the IP of the host or AZ they are being deployed in, which is being added as a tag value to the container instance.

hello @linkar-ec2,

What's the status on this implementation ? I can call $ECS_CONTAINER_METADATA_URI/taskWithTags already, but can't see tags. The instance role has the new tag function enabled, and the service and tasks have tags enabled.

up

What's the status on this implementation? I can call $ECS_CONTAINER_METADATA_URI/taskWithTags already, but can't see tags.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndrewMcFarren picture AndrewMcFarren  路  3Comments

pauldougan picture pauldougan  路  3Comments

adlemich picture adlemich  路  3Comments

abby-fuller picture abby-fuller  路  3Comments

mineiro picture mineiro  路  3Comments