Merge branch v2.9 into v3.0
This commit is contained in:
commit
b22aef7fff
70 changed files with 110 additions and 85 deletions
|
@ -47,11 +47,6 @@ func (p *Provider) Init() error {
|
|||
// Provide allows the file provider to provide configurations to traefik
|
||||
// using the given configuration channel.
|
||||
func (p *Provider) Provide(configurationChan chan<- dynamic.Message, pool *safe.Pool) error {
|
||||
configuration, err := p.BuildConfiguration()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if p.Watch {
|
||||
var watchItem string
|
||||
|
||||
|
@ -69,6 +64,19 @@ func (p *Provider) Provide(configurationChan chan<- dynamic.Message, pool *safe.
|
|||
}
|
||||
}
|
||||
|
||||
configuration, err := p.BuildConfiguration()
|
||||
if err != nil {
|
||||
if p.Watch {
|
||||
log.Debug().
|
||||
Str(logs.ProviderName, providerName).
|
||||
Err(err).
|
||||
Msg("Error while building configuration (for the first time)")
|
||||
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
sendConfigToChannel(configurationChan, configuration)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue