-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Fix du command to be portable (#95172) #95178
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
Welcome @ncopa! |
Hi @ncopa. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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 signed it |
/ok-to-test |
@ncopa: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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. |
The `-B 1` argument is not defiend in POSIX du[1] and does not work with busybox du. Fix this by using `-k` and append "Ki" for the ParseQuantity call. `resource.ParseQuantity()` will set the format to `BinarySI` when there is a "Ki" suffix so we can remove the explicit set of the format. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html Signed-off-by: Natanael Copa <ncopa@mirantis.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ncopa 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 |
/assign @saad-ali |
I think it would make sense to replace both |
I am closing this in favor of #96115 |
The
-B 1
argument is not defiend in POSIX du1 and does not work withbusybox du. Fix this by using
-k
and append "Ki" for the ParseQuantitycall.
resource.ParseQuantity()
will set the format toBinarySI
when thereis a "Ki" suffix so we can remove the explicit set of the format.
Signed-off-by: Natanael Copa ncopa@mirantis.com
What type of PR is this?
/kind bug
What this PR does / why we need it:
Makes kubernetes work with
busybox du
used on Alpine Linux without depending on GNU coreutilsdu
implementaion.Which issue(s) this PR fixes:
Fixes #95172
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: