Add flag to skip the update of Ingress status on shutdown

This commit is contained in:
Manuel de Brito Fontes 2017-06-19 21:22:08 -04:00
parent ca5f402322
commit 05a976f9e5
4 changed files with 30 additions and 14 deletions

View file

@ -138,8 +138,9 @@ type Configuration struct {
// (for instance NGINX)
Backend ingress.Controller
UpdateStatus bool
ElectionID string
UpdateStatus bool
ElectionID string
UpdateStatusOnShutdown bool
}
// newIngressController creates an Ingress controller
@ -307,12 +308,13 @@ func newIngressController(config *Configuration) *GenericController {
if config.UpdateStatus {
ic.syncStatus = status.NewStatusSyncer(status.Config{
Client: config.Client,
PublishService: ic.cfg.PublishService,
IngressLister: ic.ingLister,
ElectionID: config.ElectionID,
IngressClass: config.IngressClass,
DefaultIngressClass: config.DefaultIngressClass,
Client: config.Client,
PublishService: ic.cfg.PublishService,
IngressLister: ic.ingLister,
ElectionID: config.ElectionID,
IngressClass: config.IngressClass,
DefaultIngressClass: config.DefaultIngressClass,
UpdateStatusOnShutdown: config.UpdateStatusOnShutdown,
})
} else {
glog.Warning("Update of ingress status is disabled (flag --update-status=false was specified)")