containerized-data-importer/pkg/controller/common
Lee Yarwood f229aeb5ff
dataimportcron: Pass KubeVirt instance type labels to DataVolume and DataSource (#2534)
* dataimportcron: Pass KubeVirt instance type labels to DataVolume and DataSource

Following on from 4fbcb2d509 a requirement
has arisen to expose the default instance type metadata previously
exposed as annotations also as labels to allow callers such as the UI to
have simple server side filtering of these resources.

The unreleased feature implementation in KubeVirt has now
switched to labels and so CDI should now do the same and pass through
the appropriate labels to the underlying resources.

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* instancetype: Pass instance type labels from DataVolume to PVC

Unlike annotations not all labels are copied from a given DataVolume to
a PVC during an import. This change corrects this for instance type
labels ensuring they are passed down to the underlying PVC.

The associated constants are also moved into pkg/controller/common/util
to allow access from the DataImportCron and DataVolume controllers.

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
2023-01-10 17:54:53 +00:00
..
BUILD.bazel Create unit test suite for new folders following refactor (#2518) 2022-12-23 01:50:32 +00:00
controller_suite_test.go Create unit test suite for new folders following refactor (#2518) 2022-12-23 01:50:32 +00:00
runtime-util.go Split and refactor DV controller (#2483) 2022-12-22 01:03:15 +00:00
util_test.go Split and refactor DV controller (#2483) 2022-12-22 01:03:15 +00:00
util.go dataimportcron: Pass KubeVirt instance type labels to DataVolume and DataSource (#2534) 2023-01-10 17:54:53 +00:00