-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
feat(constraints): Supports constraints for docker backend #438
feat(constraints): Supports constraints for docker backend #438
Conversation
74bc7bc
to
d469723
Compare
@@ -213,6 +215,15 @@ func containerFilter(container dockertypes.ContainerJSON) bool { | |||
return false | |||
} | |||
|
|||
constraintTags := strings.Split(container.Config.Labels["traefik.tags"], ",") | |||
ok, failingConstraint := provider.MatchConstraints(constraintTags) | |||
if ok == false { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok == false
=> !ok
or even
if ok, failingConstraint := provider.MatchConstraints(constraintTags); !ok {
...
}
One minor comment. |
LGTM 🐼 with @emilevauge's comment taken care of and a rebase 👼 |
d469723
to
357150b
Compare
Humm, I'm trying to use the suggested syntax but it is not working. Error log:
But I found a workaround (maybe a workaround) configuring the Constraints globally, described at #451. Can you point what's the correct TOML syntax to configure constraints inside Thanks! |
Related to #311 #342