From 80f77b7a22f6e1982cca547d02e9134444768d70 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Wed, 13 Jun 2018 08:47:09 -0400 Subject: [PATCH 1/3] Disable resync period --- cmd/nginx/flags.go | 5 ++--- cmd/nginx/main.go | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cmd/nginx/flags.go b/cmd/nginx/flags.go index b229e7e2a..fe7986d86 100644 --- a/cmd/nginx/flags.go +++ b/cmd/nginx/flags.go @@ -21,7 +21,6 @@ import ( "fmt" "os" "runtime" - "time" "github.com/golang/glog" "github.com/spf13/pflag" @@ -79,8 +78,8 @@ The key in the map indicates the external port to be used. The value is a reference to a Service in the form "namespace/name:port", where "port" can either be a port name or number.`) - resyncPeriod = flags.Duration("sync-period", 600*time.Second, - `Period at which the controller forces the repopulation of its local object stores.`) + resyncPeriod = flags.Duration("sync-period", 0, + `Period at which the controller forces the repopulation of its local object stores. Disabled by default.`) watchNamespace = flags.String("watch-namespace", apiv1.NamespaceAll, `Namespace the controller watches for updates to Kubernetes objects. diff --git a/cmd/nginx/main.go b/cmd/nginx/main.go index 61c261f64..14b94b904 100644 --- a/cmd/nginx/main.go +++ b/cmd/nginx/main.go @@ -104,11 +104,6 @@ func main() { } } - minResyncPeriod := 10 * time.Second - if conf.ResyncPeriod < minResyncPeriod { - glog.Fatalf("Resync period should be at least %v (current: %v)", minResyncPeriod, conf.ResyncPeriod) - } - // create the default SSL certificate (dummy) defCert, defKey := ssl.GetFakeSSLCert() c, err := ssl.AddOrUpdateCertAndKey(fakeCertificate, defCert, defKey, []byte{}, fs) From 283bcf7a1eff70d0dca82a691a4b7b169b168a74 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Wed, 13 Jun 2018 12:30:10 -0400 Subject: [PATCH 2/3] Only use go get to install required packages --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1cb4d40f9..40445ee44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,10 +40,7 @@ jobs: script: - sudo luarocks install luacheck - make luacheck - - mkdir --parents $GOPATH/src/golang.org/x - && git clone --depth=1 https://go.googlesource.com/lint $GOPATH/src/golang.org/x/lint - && go get golang.org/x/lint/golint - - go get github.com/vbatts/git-validation + - go get golang.org/x/lint/golint - make verify-all - stage: Lua Unit Test before_script: From c680112405d4d37a2c07142722f21a9a4c588eab Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Wed, 13 Jun 2018 12:39:34 -0400 Subject: [PATCH 3/3] Workaround https://github.com/golang/go/issues/25872 --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 40445ee44..038ad2b62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,12 @@ jobs: script: - sudo luarocks install luacheck - make luacheck - - go get golang.org/x/lint/golint + - | + go get -d golang.org/x/lint/golint + cd $GOPATH/src/golang.org/x/tools + git checkout release-branch.go1.10 + go install golang.org/x/lint/golint + cd - - make verify-all - stage: Lua Unit Test before_script: