Skip to content
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

[Feature] Enable controller and apiserver to write logs to file path #593

Closed
1 of 2 tasks
Jeffwan opened this issue Sep 27, 2022 · 6 comments
Closed
1 of 2 tasks
Labels
enhancement New feature or request

Comments

@Jeffwan
Copy link
Collaborator

Jeffwan commented Sep 27, 2022

Search before asking

  • 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!
@Jeffwan Jeffwan added the enhancement New feature or request label Sep 27, 2022
@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Sep 27, 2022

/cc @Basasuya

@DmitriGekhtman
Copy link
Collaborator

DmitriGekhtman commented Sep 28, 2022

This seems reasonable -- writing to disk could be enabled by an option in the operator entrypoint.

@Basasuya
Copy link
Contributor

My preliminary conclusion is that using klog to write to file and stdout.
I will research on the writing file feature of klog

@DmitriGekhtman
Copy link
Collaborator

sgtm
Let's just make sure not to alter the default behavior. (So by default, don't write to disk.)

@Basasuya
Copy link
Contributor

Basasuya commented Oct 9, 2022

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

@kevin85421
Copy link
Member

This issue is resolved by #632. Close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants