Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tags for task definition and propagate them to ECS tasks #96

Merged
merged 2 commits into from May 20, 2020

Conversation

mozamimy
Copy link
Contributor

Motivation

Cost allocation tags feature of AWS is useful to understand cost condition. In general, also tags are useful for metadata of AWS resources.

ECS supports tagging for task definitions, tasks and services. Tags attached to task definition and service can be propagated to its related running tasks. cf. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html

This patch adds a support tagging for task definitions and propagate these tags to tasks generated from that definition.

What not to do

This change doesn't support tagging for services and propagate tags only from task definitions (it means no service propagate tags).

This is for simplicity of implementation and specification of Hako. When we use Hako, 1 hako app has 1 service and 1 task definition basically. So it's enough define tags to a task definition and propagate them to running tasks generated from the definition. I think this is natural and it can cover general use-cases.

Hako config

{
  scheduler: {
    type: 'ecs',
    tags: {
      Project: 'awesome-project',
    },
  },
}

@eagletmt Please review 馃檹

Copy link
Owner

@eagletmt eagletmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks reasonable to support propagate_tags=TASK_DEFINITION only 馃憤

@eagletmt eagletmt merged commit 00b7576 into eagletmt:master May 20, 2020
@mozamimy mozamimy deleted the tag-support branch May 20, 2020 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants