Adds default rule system on Docker provider.

Co-authored-by: Julien Salleyron <julien@containo.us>
This commit is contained in:
Ludovic Fernandez 2019-01-21 19:06:02 +01:00 committed by Traefiker Bot
parent b54c956c5e
commit 04958c6951
20 changed files with 506 additions and 168 deletions

View file

@ -15,7 +15,6 @@ const (
type configuration struct {
Enable bool
Tags []string
Domain string
Docker specificConfiguration
}
@ -27,13 +26,12 @@ type specificConfiguration struct {
func (p *Provider) getConfiguration(container dockerData) (configuration, error) {
conf := configuration{
Enable: p.ExposedByDefault,
Domain: p.Domain,
Docker: specificConfiguration{
Network: p.Network,
},
}
err := label.Decode(container.Labels, &conf, "traefik.docker.", "traefik.domain", "traefik.enable", "traefik.tags")
err := label.Decode(container.Labels, &conf, "traefik.docker.", "traefik.enable", "traefik.tags")
if err != nil {
return configuration{}, err
}