camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

feat(#5864): Added configuration for sizeLimit on empty-dirs in mount trait

Open hernanDatgDev opened this issue 1 year ago • 5 comments

The default SizeLimit on mount trait empty-dir volumes is now configurable with the following syntax: trait.mount. empty-dirs=myVolumeName:/container/path:sizeLimit

Where sizeLimit is a normal resource quantity e.g. 1Gi, 500Mi, etc.

I considered something similar to components where we add configurations after a "?" however since the empty-dir volume source only takes 2 configurations: SizeLimit Medium

I figured it would be easier to just continue the ":" separation syntax. Please let me know your thoughts on this approach

Release Note

NONE

hernanDatgDev avatar Sep 25 '24 19:09 hernanDatgDev

I need to update the documentation for the syntax on the trait still unless you have any concerns with the approach and I should change it. @squakez

hernanDatgDev avatar Sep 25 '24 19:09 hernanDatgDev

Made the changes so that logic is contained mostly within the mount trait. Parsing is kept to a minimum and I'd just need to update the syntax documentation if the logic looks good @squakez

hernanDatgDev avatar Oct 01 '24 19:10 hernanDatgDev

:heavy_check_mark: Unit test coverage report - coverage increased from 45% to 45.1% (+0.1%)

github-actions[bot] avatar Oct 03 '24 07:10 github-actions[bot]

@squakez I've run make generate to handle the documentation update but there are a lot of additional changes that result from this change, specifically to the CRD definitions. They updates do include my updated documentation though.

Any thoughts? I can always revert this commit.

hernanDatgDev avatar Oct 08 '24 19:10 hernanDatgDev

Hi @hernanDatgDev how this one is going? I am planning to release 2.5.0 for next week, so, we should have this ready by then to include in the release.

squakez avatar Oct 15 '24 20:10 squakez

@squakez I'm sorry about the delay. I will get this updated and ready as soon as I can.

hernanDatgDev avatar Oct 23 '24 00:10 hernanDatgDev

Let's wait for the checks to run. For now, don't worry about the autogenerated documentation, we have a nightly task taking care to update. However, for the future, we need to take care of synchronizing the tooling automatically, so, I'm opening a separate issue to take care of that.

squakez avatar Oct 24 '24 05:10 squakez

pkg/trait/mount.go:284:65 godot Comment should end in a period

Please, fix and make lint locally to run the validation and see no more errors.

EDIT: I've just fixed it inline to speed up the merge.

squakez avatar Oct 24 '24 05:10 squakez