-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for access-log-path and error-log-path #1243
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
badaaec
to
9049b93
Compare
@@ -118,7 +118,7 @@ http { | |||
{{ if $cfg.DisableAccessLog }} | |||
access_log off; | |||
{{ else }} | |||
access_log /var/log/nginx/access.log upstreaminfo if=$loggable; | |||
access_log {{ $cfg.AccessLogPath }} upstreaminfo if=$loggable; | |||
{{ end }} | |||
error_log /var/log/nginx/error.log {{ $cfg.ErrorLogLevel }}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not also add a variable for error_log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just made it configurable in the PR since I hadn't any reason not to add it
@maxlaverse please squash the commits |
39de6bd
to
1299831
Compare
70f72de
to
6310814
Compare
6310814
to
dd00b6d
Compare
/lgtm |
@maxlaverse thanks! |
By default, the access logs of the Nginx Ingress go to
/var/log/nginx/access.log
which is a synlink to/dev/stdout
. We are using a syslog server to store all our access logs which leaves us with two options:For performance reason and simplicity we choose to directly send our logs from Nginx to a syslog service. This is working fine by modifying the template.
However, since it might interest other people to have the log destination customizable, a cleaner solution would be to make it configurable in the ConfigMap and that's what this PR is about.
This pull-requests adds support for a
access-log-path
field in the Nginx ConfigMap to set a different path than the default one (/var/log/nginx/access.log
). The value is put as is in the Nginx template, therefore also allowing to configure a syslog server as log destination.