Merge pull request #1800 from maxlaverse/configurable_refresh_interval

Add control of the configuration refresh interval
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-12-09 12:17:31 -06:00 committed by GitHub
commit e02697ee4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -107,6 +107,8 @@ type Configuration struct {
FakeCertificatePath string
FakeCertificateSHA string
SyncRateLimit float32
}
// GetDefaultBackend returns the default backend

View file

@ -106,7 +106,7 @@ func NewNGINXController(config *Configuration, fs file.Filesystem) *NGINXControl
resolver: h,
cfg: config,
sslCertTracker: store.NewSSLCertTracker(),
syncRateLimiter: flowcontrol.NewTokenBucketRateLimiter(0.3, 1),
syncRateLimiter: flowcontrol.NewTokenBucketRateLimiter(config.SyncRateLimit, 1),
recorder: eventBroadcaster.NewRecorder(scheme.Scheme, apiv1.EventSource{
Component: "nginx-ingress-controller",