Merge pull request #2591 from Shopify/access-log-improvements

Access log improvements
This commit is contained in:
k8s-ci-robot 2018-05-31 13:26:56 -07:00 committed by GitHub
commit 88cb4fa662
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View file

@ -910,6 +910,7 @@ func (n *NGINXController) createServers(data []*extensions.Ingress,
defLoc.Ingress = ing
// we need to use the ingress annotations
defLoc.Logs = anns.Logs
defLoc.BasicDigestAuth = anns.BasicDigestAuth
defLoc.ClientBodyBufferSize = anns.ClientBodyBufferSize
defLoc.ConfigurationSnippet = anns.ConfigurationSnippet

View file

@ -541,6 +541,7 @@ http {
{{ if $all.DynamicConfigurationEnabled }}
location /configuration {
access_log off;
{{ if $cfg.EnableOpentracing }}
opentracing off;
{{ end }}

View file

@ -135,7 +135,9 @@ var _ = framework.IngressNginxDescribe("Dynamic Configuration", func() {
Expect(log).ToNot(BeEmpty())
By("POSTing new backends to Lua endpoint")
Expect(restOfLogs).To(ContainSubstring("a client request body is buffered to a temporary file"))
// NOTE(elvinefendi) now that we disabled access log for this endpoint we have to find a different way to assert this
// or maybe delete this test completely and just rely on unit testing of Lua middleware?
//Expect(restOfLogs).To(ContainSubstring("a client request body is buffered to a temporary file"))
Expect(restOfLogs).ToNot(ContainSubstring("dynamic-configuration: unable to read valid request body"))
})