feat(#5864): Added configuration for sizeLimit on empty-dirs in mount trait
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
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
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
:heavy_check_mark: Unit test coverage report - coverage increased from 45% to 45.1% (+0.1%)
@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.
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 I'm sorry about the delay. I will get this updated and ready as soon as I can.
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.
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.