Remove lua and use fastcgi to render errors
This commit is contained in:
parent
7b38e5a36e
commit
a091d3ede7
35 changed files with 251 additions and 4160 deletions
|
|
@ -110,6 +110,8 @@ type GenericController struct {
|
|||
|
||||
// runningConfig contains the running configuration in the Backend
|
||||
runningConfig *ingress.Configuration
|
||||
|
||||
forceReload bool
|
||||
}
|
||||
|
||||
// Configuration contains all the settings required by an Ingress controller
|
||||
|
|
@ -243,6 +245,7 @@ func newIngressController(config *Configuration) *GenericController {
|
|||
if mapKey == ic.cfg.ConfigMapName {
|
||||
glog.V(2).Infof("adding configmap %v to backend", mapKey)
|
||||
ic.cfg.Backend.SetConfig(upCmap)
|
||||
ic.forceReload = true
|
||||
}
|
||||
},
|
||||
UpdateFunc: func(old, cur interface{}) {
|
||||
|
|
@ -252,6 +255,7 @@ func newIngressController(config *Configuration) *GenericController {
|
|||
if mapKey == ic.cfg.ConfigMapName {
|
||||
glog.V(2).Infof("updating configmap backend (%v)", mapKey)
|
||||
ic.cfg.Backend.SetConfig(upCmap)
|
||||
ic.forceReload = true
|
||||
}
|
||||
// updates to configuration configmaps can trigger an update
|
||||
if mapKey == ic.cfg.ConfigMapName || mapKey == ic.cfg.TCPConfigMapName || mapKey == ic.cfg.UDPConfigMapName {
|
||||
|
|
@ -406,7 +410,7 @@ func (ic *GenericController) syncIngress(key interface{}) error {
|
|||
PassthroughBackends: passUpstreams,
|
||||
}
|
||||
|
||||
if ic.runningConfig != nil && ic.runningConfig.Equal(&pcfg) {
|
||||
if !ic.forceReload || ic.runningConfig != nil && ic.runningConfig.Equal(&pcfg) {
|
||||
glog.V(3).Infof("skipping backend reload (no changes detected)")
|
||||
return nil
|
||||
}
|
||||
|
|
@ -425,6 +429,7 @@ func (ic *GenericController) syncIngress(key interface{}) error {
|
|||
setSSLExpireTime(servers)
|
||||
|
||||
ic.runningConfig = &pcfg
|
||||
ic.forceReload = false
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import (
|
|||
"net/http/pprof"
|
||||
"os"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
|
@ -65,8 +64,8 @@ func NewIngressController(backend ingress.Controller) *GenericController {
|
|||
service with the format namespace/serviceName and the port of the service could be a
|
||||
number of the name of the port.`)
|
||||
|
||||
resyncPeriod = flags.Duration("sync-period", 60*time.Second,
|
||||
`Relist and confirm cloud resources this often.`)
|
||||
resyncPeriod = flags.Duration("sync-period", 0,
|
||||
`Relist and confirm cloud resources this often. Default is 0 (no resync)`)
|
||||
|
||||
watchNamespace = flags.String("watch-namespace", api.NamespaceAll,
|
||||
`Namespace to watch for Ingress. Default is to watch all namespaces`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue