kuberay
kuberay copied to clipboard
[Feature] Enable controller and apiserver to write logs to file path
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Description
Currently, we use stdout to catch control plane logs. This is inconvenient under some cases. Alternatively, we want to dump logs to a file path and use log shipper to send to remote logging system like ELK etc. So the ideal way is we both write logs to stdout and file.
Use case
As a user, I want to ship my logs to the logging system.
Related issues
No response
Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
/cc @Basasuya
This seems reasonable -- writing to disk could be enabled by an option in the operator entrypoint.
My preliminary conclusion is that using klog to write to file and stdout. I will research on the writing file feature of klog
sgtm Let's just make sure not to alter the default behavior. (So by default, don't write to disk.)
After testing, I found Dockerfile is using gcr.io/distroless/static:nonroot as based image, which can not exec into the container. Writing to file is meaningless because I can not see them. So should we use swap the based image?
\cc @Jeffwan @DmitriGekhtman
This issue is resolved by #632. Close it.