systematically call updateIngressStatus

This commit is contained in:
mpl 2020-01-22 03:44:04 +01:00 committed by Traefiker Bot
parent 60e247862a
commit c24e74efe3

View file

@ -242,7 +242,14 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl
continue continue
} }
if rule.HTTP != nil { if err := p.updateIngressStatus(ingress, client); err != nil {
log.FromContext(ctx).Errorf("Error while updating ingress status: %v", err)
}
if rule.HTTP == nil {
continue
}
for _, pa := range rule.HTTP.Paths { for _, pa := range rule.HTTP.Paths {
if err = checkStringQuoteValidity(pa.Path); err != nil { if err = checkStringQuoteValidity(pa.Path); err != nil {
log.FromContext(ctx).Errorf("Invalid syntax for path: %s", pa.Path) log.FromContext(ctx).Errorf("Invalid syntax for path: %s", pa.Path)
@ -265,12 +272,6 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl
conf.HTTP.Routers[routerKey] = loadRouter(ingress, rule, pa, rtConfig, serviceName) conf.HTTP.Routers[routerKey] = loadRouter(ingress, rule, pa, rtConfig, serviceName)
} }
} }
err := p.updateIngressStatus(ingress, client)
if err != nil {
log.FromContext(ctx).Errorf("Error while updating ingress status: %v", err)
}
}
} }
certs := getTLSConfig(certConfigs) certs := getTLSConfig(certConfigs)