Skip to content

Commit

Permalink
Merge pull request #2591 from Shopify/access-log-improvements
Browse files Browse the repository at this point in the history
Access log improvements
  • Loading branch information
k8s-ci-robot authored May 31, 2018
2 parents aeab200 + d4e6c0d commit 88cb4fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/ingress/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ http {

{{ if $all.DynamicConfigurationEnabled }}
location /configuration {
access_log off;
{{ if $cfg.EnableOpentracing }}
opentracing off;
{{ end }}
Expand Down
4 changes: 3 additions & 1 deletion test/e2e/lua/dynamic_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
})

Expand Down

0 comments on commit 88cb4fa

Please sign in to comment.