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

Add kubelet config file to update containerLogMaxSize and containerLogMaxFiles setting #866

Open
wants to merge 1 commit into
base: release-4.15
Choose a base branch
from

Conversation

praveenkumar
Copy link
Member

@praveenkumar praveenkumar commented Mar 21, 2024

By default log size is set to 50Mi and number of log file is set to 5 but for local developement we might not need those setting where disk space is also critical. In this PR we are changing it to 5Mi and 2 respectivily.

During the testing (generation of 4.15.3 bundle) I can see reduction of ~ 200 MB to final bundle size.

…gMaxFiles setting

By default log size is set to 50Mi and number of log file is set to 5
but for local developement we might not need those setting where disk
space is also critical. In this PR we are changing it to 5Mi and 2
respectivily.

During the testing (generation of 4.15.3 bundle) I can see reduction of
~ 200 MB to final bundle size.
@openshift-ci openshift-ci bot requested review from anjannath and cfergeau March 21, 2024 07:41
Copy link

openshift-ci bot commented Mar 21, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from praveenkumar. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cfergeau
Copy link
Contributor

Is there a way to delete these logs after we've done the install?

@praveenkumar
Copy link
Member Author

Is there a way to delete these logs after we've done the install?

It is not only we delete after done with install but also have same setting for end users which might don't know why the disk is taking that much space (if default is 50MiB which means every container can able to put that much logs before rotate).

@praveenkumar
Copy link
Member Author

/retest

Copy link

openshift-ci bot commented Mar 21, 2024

@praveenkumar: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-microshift 7f89a9d link true /test e2e-microshift
ci/prow/e2e-snc 7f89a9d link true /test e2e-snc

Full PR test history. Your PR dashboard.

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.

@cfergeau
Copy link
Contributor

but also have same setting for end users which might don't know why the disk is taking that much space (if default is 50MiB which means every container can able to put that much logs before rotate).

Hard to tell how many logs users will expect/need to debug their apps. Once the bundle is downloaded, in my opinion disk space is less of a problem. Is 5MiB / 2 log files something which is recommended somewhere?

@praveenkumar
Copy link
Member Author

but also have same setting for end users which might don't know why the disk is taking that much space (if default is 50MiB which means every container can able to put that much logs before rotate).

Is 5MiB / 2 log files something which is recommended somewhere?

No, It is not someone recommended, default for k8s is 10MiB and 5 logs file. This is just provide user a better disk management when using CRC (since it is development use case).

@cfergeau
Copy link
Contributor

This is just provide user a better disk management when using CRC (since it is development use case).

For a development use case, you want logs.

@praveenkumar
Copy link
Member Author

This is just provide user a better disk management when using CRC (since it is development use case).

For a development use case, you want logs.

We are not removing the logs just reducing size of the file. The question here is what would be right size one which provided by openshift 50MiB or one which we think should be good enough to get all the details.

@cfergeau
Copy link
Contributor

This is just provide user a better disk management when using CRC (since it is development use case).

For a development use case, you want logs.

We are not removing the logs just reducing size of the file. The question here is what would be right size one which provided by openshift 50MiB or one which we think should be good enough to get all the details.

I honestly have no idea what a good size would be, which is why I'd favour sticking with the defaults, and only deleting all logs before bundle generation.

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

Successfully merging this pull request may close these issues.

2 participants