Remove unnecessary periodic sync
This commit is contained in:
parent
a091d3ede7
commit
69e766e042
3 changed files with 12 additions and 22 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http/pprof"
|
||||
"os"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
|
@ -64,8 +65,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", 0,
|
||||
`Relist and confirm cloud resources this often. Default is 0 (no resync)`)
|
||||
resyncPeriod = flags.Duration("sync-period", 600*time.Second,
|
||||
`Relist and confirm cloud resources this often. Default is 10 minutes`)
|
||||
|
||||
watchNamespace = flags.String("watch-namespace", api.NamespaceAll,
|
||||
`Namespace to watch for Ingress. Default is to watch all namespaces`)
|
||||
|
|
@ -148,6 +149,10 @@ func NewIngressController(backend ingress.Controller) *GenericController {
|
|||
}
|
||||
}
|
||||
|
||||
if resyncPeriod.Seconds() < 10 {
|
||||
glog.Fatalf("resync period (%vs) is too low", resyncPeriod.Seconds())
|
||||
}
|
||||
|
||||
err = os.MkdirAll(ingress.DefaultSSLDirectory, 0655)
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to mkdir SSL directory: %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue