Commit Graph

206 Commits

Author SHA1 Message Date
Arnon Gilboa
0b3f786ee6
Enable WebhookPvcRendering feature gate by default (#3736)
The feature is available since v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner
(#3711), and mainly in order to support:
https://github.com/kubevirt/kubevirt/pull/14637

As a bonus, the related Serial tests are now parallel. Thanks akalenyu:)

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2025-05-14 18:40:03 +02:00
SKALA NETWORKS
247cf32f8e
chore(doc): add undocumented features in datavolumes (#3714)
Signed-off-by: SkalaNetworks <contact@skala.network>
2025-04-29 02:58:24 +02:00
SKALA NETWORKS
d6103398bb
chore(doc): wrong source used for pvc in docs (#3710)
Signed-off-by: SkalaNetworks <contact@skala.network>
Co-authored-by: SkalaNetworks <contact@skala.networks>
2025-04-27 18:17:04 +02:00
SKALA NETWORKS
85b86a4c8b
chore(doc): clarify how cloning is done and the requirements for it (#3720)
Signed-off-by: SkalaNetworks <contact@skala.network>
2025-04-25 07:05:03 +02:00
Matthew Arnold
e17b60a129
VDDK: Add CRD field for extra configuration arguments (#3622)
* Add ExtraArgs field to VDDK CRD.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add tests for VDDK ExtraArgs field.

Add one unit test and rework existing functional test into a table for
both annotation and field entries.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Update ExtraArgs DataVolume documentation.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

---------

Signed-off-by: Matthew Arnold <marnold@redhat.com>
2025-04-01 23:56:35 +02:00
Arnon Gilboa
41b96ed638
Add PVC source support for DataImportCron (#3617)
* Add PVC source support for DataImportCron

A PVC from any namespace can now be the source for a DataImportCron. The
source digest is based on the PVC UID, which is polled by the schedule
similarly to image stream, so when a new PVC is detected it will be
imported.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Cleanups

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

---------

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2025-01-27 20:32:57 +01:00
Matthew Arnold
27dc66bb7b
CNV-52722: Pass through extra VDDK configuration options to importer pod. (#3572)
* Add annotation for extra VDDK library arguments.

The VDDK library itself accepts infrequently-used arguments in a
configuration file, and some of these arguments have been tested to show
a significant transfer speedup in some environments. This adds an
annotation that references a ConfigMap holding the contents of this VDDK
configuration file, and mounts it to the importer pod. The first file in
the mounted directory is passed to the VDDK.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add functional test for VDDK args annotation.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add unit test for extra VDDK arguments annotation.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add documentation for extra VDDK arguments.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Simplify new functional test annotation creation.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Look for specific file instead of first file.

Instead of listing the mounted VDDK arguments directory and filtering
out hidden files, just hard-code the expected file name and ConfigMap
key.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Move extra VDDK arguments functional test.

Put this in import_test and assert the values there, instead of in the
VDDK test plugin. The VDDK plugin logs the given values, and then the
test scans the log for what it expects to see.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Clean up lint error.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Move VDDK configuration test back, change test ID.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Avoid using kubectl for scanning nbdkit logs.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Temporary: show whole nbdkit log after failure.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Revert "Temporary: show whole nbdkit log after failure."

This reverts commit 488849f8fd.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Copy extra VDDK args annotation for populators.

Also add a related unit test.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Correct VDDK args config map mount comment.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

---------

Signed-off-by: Matthew Arnold <marnold@redhat.com>
2025-01-20 18:30:50 +01:00
Thomas-David Griedel
6a375497e2
Update dead link in releases.md (#3587)
Signed-off-by: Thomas-David Griedel <griedel911@gmail.com>
2025-01-15 01:46:47 +01:00
Arnon Gilboa
be3bca39cc
Deprecate DV garbage collection (#3552)
After several releases with GC disabled by default, we decided to
deprecate it, as unfortunately it violates fundamental principle of
Kubernetes. CR should not be auto-deleted when it completes its role
(Job with TTLSecondsAfterFinished is an exception), and once CR was
created we can assume it is there until explicitly deleted. In addition,
CR should keep idempotency, so the same CR manifest can be applied
multiple times, as long as it is a valid update (e.g. DataVolume
validation webhook does not allow updating the spec).

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2024-12-04 17:35:36 +01:00
Andrei Kvapil
7b330eb755
Describe device_ownership_from_security_context=true for Containerd v2 (#3452)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-10-07 19:21:39 +02:00
Alex Kalenyuk
0838360279
Docs for dataimportcron storage class switching (#3445)
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2024-10-06 15:39:08 +02:00
cfillekes
2a5a909fc1
Create build-the-builder.md (#3019)
* Create build-the-builder.md

Document the manual build of CDI builder helper container and typical make targets

Signed-off-by: cfillekes <cfillekes@ibm.com>

* Update doc/build-the-builder.md

Co-authored-by: Alexander Wels <awels@redhat.com>
Signed-off-by: cfillekes <cfilleke@redhat.com>

---------

Signed-off-by: cfillekes <cfillekes@ibm.com>
Signed-off-by: cfillekes <cfilleke@redhat.com>
Co-authored-by: Alexander Wels <awels@redhat.com>
2024-08-09 18:54:01 +02:00
cccsss01
9ea4dfd48d
Update quota.md (#3321)
* Update quota.md

The override Defaults didn't work for me, I updated them to what did work for me however i'm not sure how to check them, as the status of the CDIS object still shows the old settings.  Adding information that states how to update it would be beneficial.

I also added docs that modifies the CDI directly.

Signed-off-by: cccsss01 <56396984+cccsss01@users.noreply.github.com>

* Update doc/quota.md

Co-authored-by: Michael Henriksen <mhenriks@redhat.com>
Signed-off-by: cccsss01 <56396984+cccsss01@users.noreply.github.com>

---------

Signed-off-by: cccsss01 <56396984+cccsss01@users.noreply.github.com>
Co-authored-by: Michael Henriksen <mhenriks@redhat.com>
2024-06-28 22:30:50 +02:00
halfcrazy
301f0ab5a5
Update csi-cloning prerequisites (#3325)
The CSI clone supports cross storage classes now. See https://github.com/kubernetes-csi/external-provisioner/pull/699

The limitation in CDI was removed in https://github.com/kubevirt/containerized-data-importer/pull/2750/files#diff-6a637cfe899a0436fa6e24865f2b9259f9b8504e40e080e03603830a5504a0c9L754

Signed-off-by: halfcrazy <hackzhuyan@gmail.com>
2024-06-20 20:20:09 +02:00
Arnon Gilboa
11d91e0a15
Suppress CDIDefaultStorageClassDegraded on SNO (#3310)
* Suppress CDIDefaultStorageClassDegraded on SNO

On single-node OpenShift, even if none of the default/virt default
storage classes supports `ReadWriteMany` (but supports smart clone),
we will not fire the `CDIDefaultStorageClassDegraded` alert.
We added `degraded` label to `kubevirt_cdi_storageprofile_info` to
simplify the alert expression.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Cleanup utest

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

---------

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2024-06-16 23:45:44 +02:00
Edu Gómez Escandell
f3d0060353
Update DataVolume doc references from the 'pvc' API to the 'storage' API (#3244)
* Docs: Replace instances of pvc with storage

All instances of DataVolume > Spec > PVC have been replaced with storage,
except for two cases in datavolumes.md:
- Data Volumes>Target Storage/PVC>PVC
    https://github.com/kubevirt/containerized-data-importer/blob/338bafe/doc/datavolumes.md#pvc
- Data Volumes>Source>PVC source
    https://github.com/kubevirt/containerized-data-importer/blob/338bafe/doc/datavolumes.md#pvc-source

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Replace `Storage` with `storage` in doc/datavolumes.md

I also reworded it so that the paragraph does not start in lower-case.

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Remove optional default 'accessModes: ReadWriteOnce' from docs

Removed from storage options, I still kept it for the pvc.

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Remove resources/requests/storage when cloning a PVC

This argument is optional. Only removed for 'storage', not 'pvc'.

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Replace 'pvc' with 'storage' API in manifests

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Moved 'Target Storage/PVC' section above 'Source'

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Rephrase the Storage target section to emphasize it over PVC

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Fix empty field in YAML file

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Rephrase prose around filesystem volume mode

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Fix grammar and spelling

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Write acces mode in upgrade-testing-artifacts manifest

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Update doc/datavolumes.md

Co-authored-by: Alexander Wels <awels@redhat.com>
Signed-off-by: Edu Gómez Escandell <edu1997xyz@gmail.com>

---------

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <edu1997xyz@gmail.com>
Co-authored-by: Alexander Wels <awels@redhat.com>
2024-06-07 19:02:12 +02:00
Alex Kalenyuk
76f9c0a423
Add virt default storage class mention in onboarding doc (#3272)
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2024-06-07 02:39:41 +02:00
Benny Zlotnik
f8484ba343
forklift: rename API group (#3295)
* forklift: rename API group

To avoid collisions with forklift's CRDs

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: rename to forklift.cdi.kubevirt.io

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

---------

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
2024-06-05 00:05:35 +02:00
Arnon Gilboa
d365661e30
Fix progress metric registration and parsing (#3292)
* Fix progress metric registration and parsing

Use default metric registration. We shouldn't use the controller-runtime
registration as we have no controller here and it will not register the
metric correctly.

Fix the metric parsing to match its new name. Otherwise the DV progress
will not be updated until its 100%.

Regression introduced in #3254

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Add kubevirt_cdi_import_progress_total metric

Use it in the importer instead of kubevirt_cdi_clone_progress_total and
fix metric parsing accordingly.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Move ProgressFromClaim to host-clone

Nobody else is using it.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Add ProgressMetric interface

ProgressReader can now work with either import or clone progress metric.
FIXME: consider removing the direct Add/Get and use only via interface.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Refactor ProgressMetric interface

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Refactor progress parsing

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Refer metric names from the metrics package

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

---------

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2024-06-03 13:25:37 +02:00
Arnon Gilboa
a5cedb1555
Progress metrics refactor and rename (#3254)
* clone_progress metric refactor

The clone_progress metric is not in the monitoring package. The metric
is with incorrect name, based on the kubevirt and Prometheus metrics
naming conventions. It's not documented and not located under
/pkg/monitoring. After the code refactoring we should not have
Prometheus metrics in other places in the code, other than the
/monitoring/metrics package, and metrics should be registered using
operator-observability package.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* openstack_populator_progress metric refactor

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* clone_progress metric refactor CR fixes

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* ovirt_progress metric refactor

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Align progress metrics names with linter rules

Also add the metrics to the doc and json generation tools.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Remove redundant ListMetrics

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

---------

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2024-05-17 14:02:25 +02:00
Benny Zlotnik
46f0f76ed4
forklift: introduce forklift controller (#2983)
* forklift: add types for forklift populators

Introduce the OvirtVolumePopulator and OpenstackVolumePopulator types

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: introduce forklift controller

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: add CRD missing CRD suffix

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: fix tests

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: start support for mutated PVC

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: fix linter issues

and skip bound PVCs

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: update vendor and generated code

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: remove unnecessary argument

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: add ovirt-populator to cdi-importer

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: fix linter issues

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: fix contrller_test

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: regenerate swagger

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: normalize ovirt image name

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: restore OVIRT_POPULATOR_IMAGE_NAME

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: address comments

- remove accidental copy-paste
- change type of NAD reference to string
- use NAD in the controller

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: add doc with examples for the forklift populators

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: rename secret reference

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: fix linter warning

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: update deps

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: fix linter issues

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: use ginkgo for openstack populator test

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* Roll back nginx from 1.24.0 to 1.22.1 to avoid segfaults when pulling…
… images with tls

Possibly a bug, there were some segfault fixes in 1.25.4 release:
https://nginx.org/en/CHANGES

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* forklift: address comments

- Fix const
- Reverse conditional
- Pass context to reconcile
- Improve cross namespace check
- Add populator pod watcher

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: address comments

- Drop unnecessary comments
- Add dataSourceRef check
- Add node to spec

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: add restartCount annotation

- fix race condition leaving Running phase in annotation
- fix metrics UT

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: address comments

- Change optional fields to a pointer
- Fix Pod watch
- Add NotFound check to avoid an extra reconile

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

* forklift: regenerate

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>

---------

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
Co-authored-by: Alex Kalenyuk <akalenyu@redhat.com>
2024-05-14 21:38:22 +02:00
Matthew Arnold
6f7809e7a4
VDDK: Fix NBD status coalescing for large blocks. (#3242)
* Mock NBD functions in VDDK unit tests.

Also add some example tests for GetBlockStatus.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Avoid infinite loop by returning whole block.

Also add a unit test to trigger this code. Without the fix, this spins
"No new block status data" messages forever, as reported in the bug.
With the fix, this continues the data transfer without zero-range or
hole-punch optimizations.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Correctly extend merged block length.

Bring in the previously proposed fix to make sure merged blocks have
correct lengths, avoiding the initial issue.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add two more GetBlockStatus unit tests.

Hopefully this makes it more obvious what GetBlockStatus actually does.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add unit tests for larger block sizes.

The first test intentionally overflows the result block's length field
and causes an infinite loop in GetBlockStatus, as pointed out in the
problem report. This will be fixed in the next commit.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Avoid integer overflow and sort out casts.

Increase the size of BlockStatusData.Length to an int64, to avoid
overflow in GetBlockStatus. Also change BlockStatusData.Offset to an
int64 and remove a handful of unnerving integer conversions. Favor int64
over uint64 to match system libraries, and add a few necessary
conversions mostly isolated to libnbd interfaces.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Fix alignment for multi-stage VDDK documentation.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

---------

Signed-off-by: Matthew Arnold <marnold@redhat.com>
2024-05-11 02:52:25 +02:00
Michael Henriksen
6f933028fb
Claim Adoption Doc (#3221)
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
2024-05-03 22:44:10 +02:00
Alex Kalenyuk
39cc6ea853
Fix volume/access mode inferring for temp host assisted source PVC in snapshot clones (#3155)
* Clone from snapshot: fix volume/access mode inferring for temp host assisted source PVC

Sometimes with snapshot cloning we have to fall back to host assisted.
To do this, we create a temporary restore from the snapshot and initiate a host assisted clone
from that -> target PVC.
The issue this commit fixes is that we set the wrong access/volume modes on this temporary restore PVC
(we set it to the target's).

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* Annotate dataimportcron-created snapshot with their source volume mode

This would then get capitalized on by host assisted fallbacks from snapshot cloning

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

---------

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2024-04-05 15:29:50 +02:00
Felix Matouschek
e262fb1d8d
docs: Add docs for containerdisk labels (#3153)
Add docs which explain how PVCs of imported containerdisks can be
decorated with additional labels.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-27 07:33:35 +01:00
Arnon Gilboa
56a7eaeebc
Rename PVC webhook rendering label to applyStorageProfile (#3124)
Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2024-03-07 08:42:43 +01:00
Aviv Litman
42ec627e35
Refactor recording-rules and alerts code (#3068)
* Refactor recording-rules and alerts code

Signed-off-by: avlitman <alitman@redhat.com>

* Remove promv1 from schema

Signed-off-by: avlitman <alitman@redhat.com>

---------

Signed-off-by: avlitman <alitman@redhat.com>
2024-02-18 16:05:42 +01:00
Arnon Gilboa
221469d062
Add PVC spec mutating webhook rendering based on StorageProfiles (#2813)
* Add PVC mutating webhook using StorageProfiles

The webhook mutates the PVC Spec based on the available StorageProfiles,
so for example you can create PVC without accessModes and it will be
auto-completed.

To use this feature, enable the `WebhookPvcRendering` feature gate.

For any PVC you want to use StorageProfile, label it with:
    cdi.kubevirt.io/useStorageProfile: "true"

If you want to use volumeMode preferred by CDI according to
StorageProfiles, set it to FromStorageProfile. Otherwise if not
explicitly set to Block, it will be Filesystem by k8s default.

E.g.:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc-test
  labels:
    cdi.kubevirt.io/useStorageProfile: "true"
spec:
  storageClassName: rook-ceph-block
  volumeMode: FromStorageProfile
  resources:
    requests:
      storage: 1Mi

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Move webhook create/delete to callback

plus some CR fixes and cleanups

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Move webhook CR creation to sit with callbacks

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Update existing webhook if modified

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Eliminate unnecessary CR update

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

---------

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2024-02-12 15:26:28 +01:00
Alex Kalenyuk
338bafe6b2
Docs for default virt storage class (#3027)
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2024-01-18 14:08:01 +01:00
Aviv Litman
3bb70209d0
Refactor monitoring code (#3009)
* refactor monitoring

Signed-off-by: avlitman <alitman@redhat.com>

* Upgrade pointer to pnt

Signed-off-by: avlitman <alitman@redhat.com>

* fix controller base and ready gague

Signed-off-by: avlitman <alitman@redhat.com>

---------

Signed-off-by: avlitman <alitman@redhat.com>
2024-01-02 09:17:18 +01:00
Arnon Gilboa
edda5abe0f
Add new Prometheus alerts and label existing alerts (#2998)
* Add Prometheus alerts and label existing alerts

- CDINoDefaultStorageClass - not having a default (or virt default)
SC is surely not an OpenShift error, as admins may prefer their cluster
users to only use explicit SC names. However, in the CDI context when
DV is created with default SC but default does not exist, we will fire
an error event and the PVC will be Pending for the default SC, so when
there are such Pending PVCs we will fire an alert.

- CDIDefaultStorageClassDegraded - when the default (or virt default)
SC does not support CSI/Snapshot clone (smart clone) or does not have
ReadWriteMany access mode (for live migration).

- CDIStorageProfilesIncomplete - add storageClass and provisioner
labels.

- CDIDataImportCronOutdated - add dataImportCron namespace and name
labels.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* CR fixes

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Create stub VolumeSnapshotClass for testing

Including the VolumeSnapshot/Class/Content crds for the
CDIDefaultStorageClassDegraded alert func test.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Add snapshot manifests for tests

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Deploy snapshot CRDs in the hpp destructive lane

Remove stub snapshot CRDs

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Add label explanation to new metric help

Also rename the metric kubevirt_cdi_storageprofile_status to
kubevirt_cdi_storageprofile_info since it always reports value 1,
where the label values provide the details about the storage
class and storage profile.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Revert NoProvisioner check removal

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* CR fixes

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Nicify StorageProfile metric update

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

---------

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2023-12-19 12:29:08 +01:00
Ivan Mikheykin
5f90a7c8b5
fix(docs): registry datasource expect CA certs with .crt (#2987)
Registry source requires .crt suffix for CA certificates. It is a feature of the library "github.com/containers/image":
See 536af6b1ad/vendor/github.com/containers/image/v5/pkg/tlsclientconfig/tlsclientconfig.go (L36)

Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
2023-11-16 19:23:28 +01:00
Ben Coxford
3a57e0ebf2
Add support for linkerd injection annotations on datavolumes (#2954)
* add support for linkerd annotations on datavolumes

Signed-off-by: bcoxford <ben.coxford@ncr.com>

* fix default value linkerd injection annotation

Signed-off-by: bcoxford <ben.coxford@ncr.com>

* set default value for linkerd injection to disabled

Signed-off-by: bcoxford <ben.coxford@ncr.com>

* resolve linting on mesh annotation hinting

Signed-off-by: bcoxford <ben.coxford@ncr.com>

* fix linting on AnnPodSidecarInjectionLinkerdDefault hints

Signed-off-by: bcoxford <ben.coxford@ncr.com>

* add note to sidecar unit tests

Signed-off-by: bcoxford <ben.coxford@ncr.com>

---------

Signed-off-by: bcoxford <ben.coxford@ncr.com>
2023-11-16 19:23:21 +01:00
akalenyu
d3c60a7f95
Add storage provider onboarding doc (#2914)
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2023-11-10 16:01:18 +01:00
Arnon Gilboa
3f84f369db
Add doc for fallback to host-assisted cloning (#2963)
Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2023-11-06 21:57:26 +01:00
akalenyu
934a0be808
Default storage class for virtualization purposes (#2913)
* Default virt storage class

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* Add alert for multiple default virt storage classes

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* Refactor content type funcs to not return strings

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

---------

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2023-10-27 04:28:15 +02:00
Aviv Litman
71ee8474f2
Move clone_progress to separate list (#2929)
Since clone_progress metric used for internal purpose only we should not
document it in metrics.md or test it in the metrics linter. therefore
clone_progress moved to separate list (not used by the doc and linter
generators).

Signed-off-by: Aviv Litman <alitman@alitman-thinkpadp1gen4i.tlv.csb>
Co-authored-by: Aviv Litman <alitman@alitman-thinkpadp1gen4i.tlv.csb>
2023-10-19 16:07:04 +02:00
akalenyu
3d3564d658
Update doc of shouldUseCDIPopulator to reflect changes (#2904)
I find myself going back a lot to this function and I noticed
some of the fallback reasons are outdated following:
https://github.com/kubevirt/containerized-data-importer/pull/2765
https://github.com/kubevirt/containerized-data-importer/pull/2873

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2023-09-26 19:09:38 +02:00
alromeros
030846ac9c
Allow modifying log verbosity in CDI (#2882)
* Allow modifying log verbosity from cdiConfig

This commit adds a new field in the cdiConfig API to allow specifying a log verbosity level to initialize all loggers.

Changes in this field will mean restarting all CDI components to initialize all loggers.

Signed-off-by: Alvaro Romero <alromero@redhat.com>

* Update debug documentation to cover log verbosity

Signed-off-by: Alvaro Romero <alromero@redhat.com>

---------

Signed-off-by: Alvaro Romero <alromero@redhat.com>
2023-09-08 14:26:58 +02:00
Aviv Litman
2d993ca736
Update metric names to fit metrics naming conventions (#2816)
This fix updated metrics names to meet the metrics naming conventions.
The old metrics names will not be available after this fix.

Signed-off-by: Aviv Litman <alitman@redhat.com>
2023-08-10 17:32:32 +02:00
Shelly Kagan
e23ab12d60
Add documentation for cdi populators (#2776)
* Add documentation for cdi populators

Signed-off-by: Shelly Kagan <skagan@redhat.com>

* populators doc updates after review

Signed-off-by: Shelly Kagan <skagan@redhat.com>

---------

Signed-off-by: Shelly Kagan <skagan@redhat.com>
2023-07-11 13:19:16 +02:00
akalenyu
ab184640d0
Add DataImportCron snapshot sources docs (#2747)
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2023-06-23 01:06:33 +02:00
Arnon Gilboa
0bc6a8aeca
Disable DV GC by default (#2754)
* Disable DV GC by default

DataVolume garbage collection is a nice feature, but unfortunately it
violates fundamental principle of Kubernetes. CR should not be
auto-deleted when it completes its role (Job with TTLSecondsAfter-
Finished is an exception), and once CR was created we can assume it is
there until explicitly deleted. In addition, CR should keep idempotency,
so the same CR manifest can be applied multiple times, as long as it is
a valid update (e.g. DataVolume validation webhook does not allow
updating the spec).

When GC is enabled, some systems (e.g GitOps / ArgoCD) may require a
workaround (DV annotation deleteAfterCompletion = "false") to prevent
GC and function correctly.

On the next kubevirt-bot Bump kubevirtci PR (with bump-cdi), it will
fail on all kubevirtci lanes with tests referring DVs, as the tests
IsDataVolumeGC() looks at CDIConfig Spec.DataVolumeTTLSeconds and
assumes default is enabled. This should be fixed there.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Fix test waiting for PVC deletion with UID

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Fix clone test assuming DV was GCed

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Fix DIC controller DV/PVC deletion when snapshot is ready

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

---------

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2023-06-20 21:09:19 +02:00
Marcelo Feitoza Parisi
c7467cc5fd
Google Cloud Storage Import Support (#2615)
* Google Cloud Storage Importer

This is a Google Cloud Storage importer for CDI

Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>

* Fix auto-generated swagger and openapi

Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>

* GCS Importer General Fixes

Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>

* Moving back gcs-secret.txt

Moving file back to imageDir to fix unit testing.

Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>

---------

Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>
Co-authored-by: Marcelo Parisi <marcelo@dev-box.corp.feitoza.com.br>
2023-03-22 16:49:29 +00:00
Alexander Wels
0fc8efce88
Add document explaining requirements for mainters/approvers (#2641)
Signed-off-by: Alexander Wels <awels@redhat.com>
2023-03-21 04:25:21 +00:00
akalenyu
15826e7925
Add clone from VolumeSnapshot docs (#2574)
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2023-02-10 19:37:14 +01:00
Rick
9c9758c6c0
docs: fix exposing upload porxy ingress (#2578)
Signed-off-by: rick <LinuxSuRen@users.noreply.github.com>
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
2023-02-09 00:54:16 +01:00
alromeros
06c1dca5e7
Add external-population docs (#2549)
This commit adds documentation for the external-population support in DataVolumes.

Signed-off-by: Alvaro Romero <alromero@redhat.com>

Signed-off-by: Alvaro Romero <alromero@redhat.com>
2023-01-21 00:39:26 +01:00
Maya Rashish
80c1984985
Remove v1alpha1 as a stored version from our CRDs (#2407)
* Avoid generating most of the v1alpha1 CRDs, regenerate

We leave the CDI CRD alone as that one is installed via a YAML file.

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Avoid references to v1alpha1 APIs in docs

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Remove v1alpha1 specific tests

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Manually adjust code not to reference v1alpha1 APIs

v1alpha1 upload paths are kept as virtctl image upload still uses them

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Factor out scaling deployment to function

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Handle removal of v1alpha1 version from CRDs

If it was ever a storage version, we perform manual storage migration:
we ensure v1beta1 is storage version, get & update every object, and
remove the v1alpha1 storage version.

The CDI CRD v1alpha1 version is kept, so updating from clusters that
had old versions by applying release YAMLs still works.

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Test upgrade from a version with v1alpha1 storage version.

Artificially create objects by scaling down cdi-operator & creating
a DV. Make sure it's there even after we restore CDI and that v1beta1
is the only storedVersion.

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Regenerate (again, due to rebase)

Signed-off-by: Maya Rashish <mrashish@redhat.com>

Signed-off-by: Maya Rashish <mrashish@redhat.com>
2022-12-20 00:26:50 +00:00
akalenyu
f5d0b70b09
Document CRI configurable that smoothens non-root containers usage of block devices (#2458)
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2022-11-04 00:47:23 +00:00