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

feat(api): move calculation of scratch filesystem overhead to cdi controller #430

Merged

Conversation

Isteb4k
Copy link
Contributor

@Isteb4k Isteb4k commented Oct 9, 2024

Description

CDI always requests scratch space with a Filesystem volume mode, regardless of the volume mode of the related
DataVolume. An additional overhead space should be reserved for the Filesystem volume.

By default, this overhead is taken from the CDI Config and is not dynamically updated based on the target PVC size.
As a result, the target PVC size with the overhead from the CDI Config may be insufficient to successfully complete
PVC creation.

To address this, since there is no strict formula for ext4 filesystem overhead, empirical estimates of the filesystem
overhead were provided based on the target PVC size:

  • return 0 for target PVC size == 0
  • add 40% for target PVC size < 24Mi
  • add 25% for target PVC size < 512Mi
  • add 15% for target PVC size < 4096Mi
  • add 10% for target PVC size >= 4096Mi

Previously, this overhead was added at the level of our controller, which led to an undesirable increase in the size of images and disks. As part of this PR, the addition of an overhead is now taking place at the cdi controller level.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

@Isteb4k Isteb4k force-pushed the feat/api/scratch-filesystem-overhead branch from 9f3500c to 35f8e19 Compare October 9, 2024 14:45
@Isteb4k Isteb4k changed the base branch from main to refactor/cdi/update-to-1-60 October 9, 2024 14:46
@Isteb4k Isteb4k force-pushed the feat/api/scratch-filesystem-overhead branch 2 times, most recently from 9e1ae59 to afb9aa3 Compare October 9, 2024 15:01
@Isteb4k Isteb4k changed the title docs(module): explicitly specify the name instead of using the date feat(api): move calculation of cdi scratch pvc size to cdi Oct 9, 2024
@Isteb4k Isteb4k force-pushed the feat/api/scratch-filesystem-overhead branch 3 times, most recently from 249d284 to c37883d Compare October 9, 2024 16:53
@Isteb4k Isteb4k requested a review from diafour October 9, 2024 16:56
@Isteb4k Isteb4k force-pushed the feat/api/scratch-filesystem-overhead branch from c37883d to 1921ea2 Compare October 9, 2024 17:00
@Isteb4k Isteb4k marked this pull request as ready for review October 9, 2024 17:00
@Isteb4k Isteb4k changed the title feat(api): move calculation of cdi scratch pvc size to cdi feat(api): move calculation of cdi scratch pvc size to cdi controller Oct 9, 2024
@Isteb4k Isteb4k changed the title feat(api): move calculation of cdi scratch pvc size to cdi controller feat(api): move calculation of scratch filesystem overhead to cdi controller Oct 9, 2024
@Isteb4k Isteb4k force-pushed the feat/api/scratch-filesystem-overhead branch 4 times, most recently from 0c0c7c9 to e315d1a Compare October 10, 2024 12:03
@universal-itengineer universal-itengineer force-pushed the refactor/cdi/update-to-1-60 branch 2 times, most recently from 90fabbb to fb8c51d Compare October 11, 2024 14:20
@diafour diafour force-pushed the refactor/cdi/update-to-1-60 branch 2 times, most recently from e5a9f39 to ecb7a8f Compare October 11, 2024 15:25
@diafour diafour changed the base branch from refactor/cdi/update-to-1-60 to main October 11, 2024 15:45
@diafour diafour changed the base branch from main to refactor/cdi/update-to-1-60 October 11, 2024 15:46
@diafour diafour force-pushed the feat/api/scratch-filesystem-overhead branch from e315d1a to 81fff9f Compare October 11, 2024 16:06
@Isteb4k Isteb4k merged commit 2cf59c4 into refactor/cdi/update-to-1-60 Oct 11, 2024
1 check passed
@Isteb4k Isteb4k deleted the feat/api/scratch-filesystem-overhead branch October 11, 2024 16:33
@universal-itengineer universal-itengineer added this to the v0.14.0 milestone Oct 11, 2024
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.

3 participants