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

refactor(cdi): update to v1.60.3 #382

Merged
merged 2 commits into from
Oct 11, 2024
Merged

refactor(cdi): update to v1.60.3 #382

merged 2 commits into from
Oct 11, 2024

Conversation

diafour
Copy link
Member

@diafour diafour commented Sep 17, 2024

Description

  • Use golang 1.22.7
  • Build CDI components without bazel.
  • Remove 000-bundle-images.patch: not needed anymore.
  • Remove 006-customizer.patch: it is already in the upstream.
  • Optimize 011-change-storage-class-for-scratch-pvc.patch: one line change is required.
  • Optimize 013-converting-images-on-filesystem-to-qcow2.patch: move new code in a separate file to increase chances to apply without problems in the future.
  • Fix evanphx/json-patch/v5 'replace' operation behaviour.
  • Remove redundant imports reformats in patches, remove changes in BUILD.bazel files.
  • Update base image to alt:p11, remove glibc updating.
  • Shrink cdi images by removing more apt caches.
  • Rename dvcr binaries, change _ to -.
  • Use cdi libraries 1.60.3 in virtualization-controller.
  • Add more rules for kube-api-rewriter.

Why do we need it, and what problem does it solve?

  • Simplify building of CDI components.
  • Remove bazel builder dependency.
  • Remove some patches that are in the upstream.

What is the expected result?

VirtualDisks work as previously.

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.

@diafour diafour force-pushed the refactor/cdi/update-to-1-60 branch 2 times, most recently from bb6b134 to 5b391eb Compare September 19, 2024 12:04
@diafour diafour force-pushed the refactor/kubevirt/update-to-1.3.1 branch 2 times, most recently from 14e4380 to a320fd9 Compare September 24, 2024 19:43
Base automatically changed from refactor/kubevirt/update-to-1.3.1 to main September 26, 2024 14:34
An error occurred while trying to automatically change base from refactor/kubevirt/update-to-1.3.1 to main September 26, 2024 14:34
@universal-itengineer universal-itengineer added the build/self-hosted/virt-runners Run jobs on virtualization git hub runners label Sep 27, 2024
@diafour diafour marked this pull request as ready for review September 30, 2024 08:55
@diafour diafour force-pushed the refactor/cdi/update-to-1-60 branch from 2babe02 to 420f8ee Compare October 3, 2024 19:28
@universal-itengineer universal-itengineer added build/self-hosted/virt-runners Run jobs on virtualization git hub runners and removed build/self-hosted/virt-runners Run jobs on virtualization git hub runners labels Oct 11, 2024
@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
@universal-itengineer universal-itengineer added build/self-hosted/virt-runners Run jobs on virtualization git hub runners and removed build/self-hosted/virt-runners Run jobs on virtualization git hub runners labels Oct 11, 2024
@universal-itengineer universal-itengineer added this to the v0.14.0 milestone Oct 11, 2024
- Use golang 1.22.7
- Build CDI components without bazel.
- Remove 000-bundle-images.patch: not needed anymore.
- Remove 006-customizer.patch: it is already in the upstream.
- Optimize 011-change-storage-class-for-scratch-pvc.patch: one line change is required.
- Optimize 013-converting-images-on-filesystem-to-qcow2.patch: move new code in a separate file to increase chances to apply without problems in the future.
- Fix evanphx/json-patch/v5 'replace' operation behaviour.
- Remove redundant imports reformats in patches, remove changes in BUILD.bazel files.
- Update base image to alt:p11, remove glibc updating.
- Shrink cdi images by removing more apt caches.
- Rename dvcr binaries, change _ to -.
- Use cdi libraries 1.60.3 in virtualization-controller.
- Add more rules for kube-api-rewriter.

---

Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
…troller

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.

---------

Signed-off-by: Isteb4k <dmitry.rakitin@flant.com>
Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
@diafour diafour merged commit 91d8db3 into main Oct 11, 2024
9 of 10 checks passed
@diafour diafour deleted the refactor/cdi/update-to-1-60 branch October 11, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/self-hosted/virt-runners Run jobs on virtualization git hub runners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants