-
Notifications
You must be signed in to change notification settings - Fork 254
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
forklift: introduce forklift controller #2983
Conversation
Hi @bennyz. Thanks for your PR. I'm waiting for a kubevirt member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
cfbaa09
to
b349944
Compare
b349944
to
db43ee8
Compare
c0397fe
to
692a25f
Compare
692a25f
to
c6d73c0
Compare
c6d73c0
to
6ebf956
Compare
6ebf956
to
116eeba
Compare
b478523
to
f4e7b96
Compare
509fadc
to
00150db
Compare
@akalenyu could you have a preliminary look? |
So this is fine for review, regardless of the ovirt populator still not being in? |
This fetches the ovirt populator from our repo, as this is seems the direction we'll be going for, and even if not, switching back to the original approach will not be difficult and won't affect the core controller code too much, just the boilerplate code around |
hack/build/config.sh
Outdated
@@ -61,6 +61,9 @@ QUAY_REPOSITORY=${QUAY_REPOSITORY:-cdi-operatorhub} | |||
QUAY_NAMESPACE=${QUAY_NAMESPACE:-kubevirt} | |||
CDI_LOGO_PATH=${CDI_LOGO_PATH:-"assets/cdi_logo.png"} | |||
|
|||
# oVirt populator image from forklift | |||
OVIRT_POPULATOR_IMAGE_NAME=${OVIRT_POPULATOR_IMAGE_NAME:-"quay.io/kubev2v/ovirt-populator:release-v2.5.4"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @alromeros @mhenriks
my worry is productizing this in downstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about including & using the sources under CDI? at least in our scripts
On other distributions (downstream) the env var will be set to something else and that will get tested instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not implemented yet, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not yet, just to clarify, we want to build it in CDI?
something like was done here: #2895 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, any drawbacks? lets us stay completely in charge upstream if anything breaks down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why you linked the closed PR, the one that merged also had the ovirt populator sources in it:
#2947
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the closed one ovirt-populator is built separately which is what I assume we want here, while in #2947 it's part of cdi-importer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I see. maybe for consistency let's keep it non separate (part of importer)? wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
published, only did a basic sanity check but looks ok
- remove accidental copy-paste - change type of NAD reference to string - use NAD in the controller Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
… 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>
- Fix const - Reverse conditional - Pass context to reconcile - Improve cross namespace check - Add populator pod watcher Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
- Drop unnecessary comments - Add dataSourceRef check - Add node to spec Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
- fix race condition leaving Running phase in annotation - fix metrics UT Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
- 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>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
edba942
to
84dc967
Compare
/test all |
/test pull-cdi-goveralls |
/test pull-cdi-generate-verify |
/test pull-containerized-data-importer-fossa |
/test pull-containerized-data-importer-e2e-nfs |
/test pull-containerized-data-importer-e2e-ceph |
/retest-required |
/cherrypick release-v1.59 |
@akalenyu: #2983 failed to apply on top of branch "release-v1.59":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
* 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>
* Run bazelisk run //robots/cmd/uploader:uploader -- -workspace /home/prow/go/src/github.com/kubevirt/project-infra/../containerized-data-importer/WORKSPACE -dry-run=false (#3247) Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com> * Improve usability of Golangci-lint (#3193) * Run 'make format && make generate' Seems like this hadn't been run in a long while. Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Run 'golangci-lint --fix' when using 'make format' Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Update golangci-lint version Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Remove gofmt Golangci-lint already runs gofmt internally (see ./.golangci.yml) Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Remove golint pass This linter has been deprecated since May 9, 2021. Golangci-lint already covers its functionality Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Remove goimports Golangci-lint already runs goimports internally (see ./.golangci.yml) Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Move govet into golangci-lint This way we don't parse the project twice. Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Update README Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Run formaters and generators again Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> --------- Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * 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> * Run bazelisk run //robots/cmd/uploader:uploader -- -workspace /home/prow/go/src/github.com/kubevirt/project-infra/../containerized-data-importer/WORKSPACE -dry-run=false Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com> --------- Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com> Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com> Co-authored-by: kubevirt-bot <kubevirtbot@redhat.com> Co-authored-by: Edu Gómez Escandell <egomez@redhat.com> Co-authored-by: Benny Zlotnik <2139890+bennyz@users.noreply.github.com>
What this PR does / why we need it:
A controller to run the forklift populators, it will handle the population for the OvirtVolumePopulator and OpenstackVolumePopulator kinds
Example DVs:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
depends on #2947
Release note:
TODO: