-
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
Support "none" keyword in log-format escape configuration #8693
Comments
/kind feature |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@longwuyuan is there a current estimate on how much longer the stability work will take priority? I'm guessing three more months or so based on the original assessment. Just checking in, I don't have access to the kubernetes slack so I can't really keep an eye on the conversation. Thanks! |
More details are available here https://youtu.be/UBt4N82ymOE and here https://kubernetes.slack.com/archives/CANQGM8BA/p1656020331133589. |
Thanks! |
I would like the ingress-nginx ingress controller to support the native nginx functionality of disabling escaping characters in access logs. The specific requirement that is driving me here is that I'd like to log all of the request and response headers going through nginx in a json format. I've got set_by_lua_block and log_by_lua_block code to do that, and I've got my log-format-upstream set so that I can create the exact json log message that I want. The problem is, the request headers and response headers in the message are a string containing escaped json rather than json. Example:
Configmap entries:
Desired configmap entry instead of log-format-escape-json:
Generated nginx.conf line inside the ingress controller pod:
Desired nginx.conf line inside the ingress controller pod:
Request:
Logs:
Desired logs:
Nginx supports the "none" keyword in the log-format escape option specifically for this use case. The ingress controller simply hasn't exposed the option.
There is currently another issue associated with this: #8105
This issue failed to get traction; I've taken a more incremental approach here that should be easier to swallow.
Implementation of the more incremental approach is at #8692
This does not require a particular kubernetes version.
The documentation should be updated to reflect that log-format-escape-none can be used to disable escaping entirely.
/kind documentation
The text was updated successfully, but these errors were encountered: