ingress-nginx
ingress-nginx copied to clipboard
Possibility to configure klog logs to json
Hey, when setting the following values in the Helm chart:
controller:
config:
log-format-escape-json: "true"
log-format-upstream: '...'
it is possible to configure the access log in the format I want to have. But I didn't found an option to configure all logs (the klog one's) of the container in json due to https://github.com/kubernetes/ingress-nginx/blob/256374079f29993e554b934ffec576b7b6fd54ac/cmd/nginx/main.go#L54
I would be great to make this configurable.
This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
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.
This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev
on Kubernetes Slack.
I understand one way to achieve this is to switch to using component-base/logs. I understand that this is more tightly integrated to the kubernetes lifecycle (with featureGates, alpha/beta/deprecation status), so is this something the maintainers of ingress-nginx would welcome ?
If so, I'll try to work on a PR, time permitting.
@VannTen I'm not a maintainer but if you want you can start anyways, right ;)
I am not a developer so just curious if the suggestion here is different from this https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#log-format-upstream
log-format-upstream
is about nginx access logs, this is about the logs related to the ingress-controller (aka, watching the Ingress object, etc)