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

Marathon not respecting traefik.enable #104

Closed
ghost opened this issue Nov 10, 2015 · 3 comments
Closed

Marathon not respecting traefik.enable #104

ghost opened this issue Nov 10, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 10, 2015

I have a test container where I've set traefik.enable=false but traefik is still picking it up.

From docker inspect:

"Labels": {
    "traefik.enable": "false"
}

In the dockerfile:

LABEL traefik.enable=false

In the Marathon job:

"parameters": [
     { "key": "label", "value": "traefik.enable=false" }
 ]

However when I go into traefik's frontend it is still showing the appid for the container and creating front and backends for it.

This is traefik built from master an hour or so ago. It's been recycled with no change. Relevant debug logs (it's a custom redis container):

time="2015-11-10T17:28:48-05:00" level=debug msg="Creating frontend frontend-redis"
time="2015-11-10T17:28:48-05:00" level=debug msg="Creating route route-host-redis Host:redis.traefik"
time="2015-11-10T17:28:48-05:00" level=debug msg="Creating backend backend-redis"
time="2015-11-10T17:28:48-05:00" level=info msg="Creating load-balancer wrr"
time="2015-11-10T17:28:48-05:00" level=info msg="Creating server server-redis-18e3b237-87f9-11e5-9ee9-000c295c6e06 http://slave2.example.org:31499"
time="2015-11-10T17:28:48-05:00" level=debug msg="Creating frontend frontend-redisarray"
time="2015-11-10T17:28:48-05:00" level=debug msg="Creating route route-host-redisarray Host:redisarray.traefik"
time="2015-11-10T17:28:48-05:00" level=debug msg="Creating backend backend-redisarray"
time="2015-11-10T17:28:48-05:00" level=info msg="Creating load-balancer wrr"
time="2015-11-10T17:28:48-05:00" level=info msg="Creating server server-redisarray-e59b8d9a-85f0-11e5-9ee9-000c295c6e06 http://slave3.example.org:31584"
@emilevauge
Copy link
Member

Hi @rvm2015, if you use the marathon backend, you should use Marathon's labels.
Here is an example of JSON application file:

{
  "id": "whoami",
  "cpus": 0.1,
  "mem": 64.0,
  "instances": 3,
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "emilevauge/whoami",
      "network": "BRIDGE",
      "portMappings": [
        { "containerPort": 80, "hostPort": 0, "protocol": "tcp" }
      ]
    }
  },
  "healthChecks": [
    {
      "protocol": "HTTP",
      "portIndex": 0,
      "path": "/",
      "gracePeriodSeconds": 5,
      "intervalSeconds": 20,
      "maxConsecutiveFailures": 3
    }
  ],
  "labels": {
      "traefik.enable": "false",
  }
}

@emilevauge
Copy link
Member

@rvm2015, is it OK for you using marathon labels? Can I close the issue?

@ghost
Copy link
Author

ghost commented Nov 19, 2015

Yes, apologies. When I read the original docs I completely blanked on trying Mesos labels. This is closable.

@emilevauge emilevauge modified the milestone: 1.0 Feb 27, 2016
@traefik traefik locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants