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 segments to the consulcatalog provider #3781

Closed
wants to merge 1 commit into from

Conversation

hsmade
Copy link
Contributor

@hsmade hsmade commented Aug 17, 2018

What does this PR do?

This adds segments to the consulcatalog provider. It does this in the same way as the docker provider does.

Motivation

#3597
We are facing the issue that our consul services have routes for multiple domains and share the fqdn between services. This means we would need more than one rule to express the routes for each service. This PR enables us to do so.

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

I implemented the segments using the existing label.ExtractTraefikLabels. I envision that the frontends which are the result of one single service have both the original service name and the segment name in their name: traefik.rule1.frontend.rule:*** on service myservice leads to a frontend named frontend-myservice-rule1. All the frontends which are generated out of a service, share the same backend, to minimise resources. For this I needed to adjust getServiceBackendName to use the original service name as a name, which I store in serviceUpdate.ParentServiceName.
I added a test that expands a single service into 2 frontends, by having 2 segments.

@hsmade
Copy link
Contributor Author

hsmade commented Aug 20, 2018

After discussion with @ldez , this PR is is closed in favor of #3796

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

4 participants