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

Rephrase the traefik.backend definition in documentation #4317

Merged
merged 3 commits into from Dec 19, 2018
Merged

Rephrase the traefik.backend definition in documentation #4317

merged 3 commits into from Dec 19, 2018

Conversation

dduportal
Copy link
Contributor

Signed-off-by: Damien DUPORTAL damien.duportal@gmail.com

What does this PR do?

This PR rephrases the definition of the label traefik.backend in the documentation.

Motivation

As underlined in #4284 and #4024, the actual definition of the label traefik.backend
leads to confusion: the provided value is expected to be the full backend name.
But it is an internal naming, which depends on dynamic name generation,
and the provided value is used as a suffix, to discriminate backends from each others.

So here is this PR, trying to rephrase to make it more close to reality, and to avoid false expectations when using the API.

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

Here is a nice gopher image, because gophers are cute:

image



Signed-off-by: Damien DUPORTAL <damien.duportal@gmail.com>
Signed-off-by: Damien DUPORTAL <damien.duportal@gmail.com>
Signed-off-by: Damien DUPORTAL <damien.duportal@gmail.com>
@dduportal
Copy link
Contributor Author

@ldez : I've taken your feedback and explanations in account.

The code from providers/*/config.go and templates/*.tmpl had been used for the 5 providers, to get the right "object" name:

  • Docker: container
  • ECS and Rancher: service
  • Mesos: task
  • Marathon: application

Copy link
Member

@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

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
Member

@jbdoumenjou jbdoumenjou left a comment

Choose a reason for hiding this comment

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

LGTM

@traefiker traefiker merged commit 1468e1f into traefik:v1.7 Dec 19, 2018
@dduportal dduportal deleted the docs/GH-4284-backend-naming branch December 19, 2018 15:51
| `traefik.tags=foo,bar,myTag` | Adds Traefik tags to the Docker container/service to be used in [constraints](/configuration/commons/#constraints). |
| `traefik.protocol=https` | Overrides the default `http` protocol |
| `traefik.weight=10` | Assigns this weight to the container |
| `traefik.backend=foo` | Overrides the container name by `foo` in the generated name of the backend. |

Choose a reason for hiding this comment

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

This is accurate for backends which are not segments. However, when we use segments, as explained in #4284, the backend name is being set as backend-<container-name>-backendsite1 where traefik.backend=backendsite1 has been specified by
the user.

@ldez ldez mentioned this pull request Jan 8, 2019
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants