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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ECS constraints #3537

Merged
merged 4 commits into from
Jun 29, 2018
Merged

Add support for ECS constraints #3537

merged 4 commits into from
Jun 29, 2018

Conversation

andrewstucki
Copy link
Contributor

@andrewstucki andrewstucki commented Jun 27, 2018

What does this PR do?

This PR adds support for constraints in the ECS provider

Motivation

I was running a couple of Traefik containers as ECS instances using roughly the following task definition:

[
  {
    "cpu": 512,
    "essential": true,
    "image": "traefik:1.6.1-alpine",
    "memory": 256,
    "name": "ingress",
    "command": [
      "--constraints=tag==public",
      "--ecs.clusters=my-cluster",
      "--ecs.exposedbydefault=false",
      "--api"
    ],
    "portMappings": [
      {
        "containerPort": 8080,
      },
      {
        "containerPort": 80,
      }
    ]
  }
]

Other containers had docker labels a la:

    "dockerLabels": {
      "traefik.frontend.rule": "Host:myhost.mydomain.com",
      "traefik.enable": "true",
      "traefik.tags": "private"
    },

ECS wasn't using traefik.tags to filter out this container, or any other containers with mismatched constraints.

More

  • Added/updated tests
  • Added/updated documentation

@ldez ldez added this to the 1.7 milestone Jun 29, 2018
Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

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

LGTM
:shipit:

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants