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

OVA: changing nfs mount to server and conversion pod to use shared PVC #592

Merged
merged 5 commits into from
Oct 4, 2023

Conversation

bkhizgiy
Copy link
Member

@bkhizgiy bkhizgiy commented Sep 13, 2023

Until now when adding a new OVA provider we were mount the NFS volume directly to the server/ conversion pod, this worked for some of the cases but wasn't supported on a restricted or different namespaces from forklift/MTV since NFS is not permitted. This fix switch the use of NFS to used shared PVC for both of the cases instead.

@bkhizgiy bkhizgiy requested a review from ahadas as a code owner September 13, 2023 14:32
@bkhizgiy bkhizgiy changed the title WIP OVA: changing nfs mount to server and conversion pod to use shared PVC OVA: changing nfs mount to server and conversion pod to use shared PVC Sep 14, 2023
@bkhizgiy
Copy link
Member Author

The PR is ready and was tested on different namespaces, both the provider adding and migrations.
the only thing not working is the owner reference, once is set with the plan info the PVC deletes before the conversion finished, for now I've removed it from the code but it means that the PV and PVC are not removed once the plan is removed.

  • the migration wasn't tested on restricted namespace but according to the documentation it should work as well.

pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/provider/ova-setup.go Outdated Show resolved Hide resolved
pkg/controller/provider/ova-setup.go Outdated Show resolved Hide resolved
pkg/controller/provider/ova-setup.go Outdated Show resolved Hide resolved
pkg/controller/provider/ova-setup.go Outdated Show resolved Hide resolved
pkg/controller/provider/ova-setup.go Outdated Show resolved Hide resolved
Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liranr23 can you please take over this one and polish it?

pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
@bkhizgiy
Copy link
Member Author

Still need to be tested, having some issue with my env.

pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/migration.go Outdated Show resolved Hide resolved
pkg/controller/plan/migration.go Outdated Show resolved Hide resolved
pkg/controller/plan/migration.go Outdated Show resolved Hide resolved
pkg/controller/plan/migration.go Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/migration.go Outdated Show resolved Hide resolved
pkg/controller/plan/migration.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Show resolved Hide resolved
pkg/controller/plan/migration.go Outdated Show resolved Hide resolved
@bkhizgiy bkhizgiy force-pushed the namespace branch 2 times, most recently from 083bbac to 53a2b98 Compare October 3, 2023 09:40
@ahadas ahadas self-requested a review October 3, 2023 11:20
@bkhizgiy
Copy link
Member Author

bkhizgiy commented Oct 3, 2023

Was tested also for restricted namespace and the entire flow was as expected.

@liranr23
Copy link
Member

liranr23 commented Oct 3, 2023

CI setup fails due to non-existing RPM dep of the ovirt-populator. #617 should fix it.

Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code is better structured and it was verified with restricted namespaces, which is great. commented mostly on the code changes

pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
pkg/controller/plan/migration.go Outdated Show resolved Hide resolved
pkg/controller/provider/ova-setup.go Outdated Show resolved Hide resolved
pkg/controller/provider/ova-setup.go Outdated Show resolved Hide resolved
pkg/controller/provider/ova-setup.go Outdated Show resolved Hide resolved
pkg/controller/provider/ova-setup.go Outdated Show resolved Hide resolved
@bkhizgiy bkhizgiy force-pushed the namespace branch 2 times, most recently from af0df68 to eb8fccf Compare October 3, 2023 15:58
pkg/controller/plan/migration.go Outdated Show resolved Hide resolved
pkg/controller/plan/migration.go Outdated Show resolved Hide resolved
pkg/controller/plan/migration.go Show resolved Hide resolved
pkg/controller/plan/kubevirt.go Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Oct 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ahadas ahadas merged commit 4dcadc3 into kubev2v:main Oct 4, 2023
8 checks passed
bkhizgiy added a commit to bkhizgiy/forklift that referenced this pull request Oct 4, 2023
Signed-off-by: Bella Khizgiyaev <[email protected]>
bkhizgiy added a commit to bkhizgiy/forklift that referenced this pull request Oct 4, 2023
bkhizgiy added a commit to bkhizgiy/forklift that referenced this pull request Oct 4, 2023
bkhizgiy added a commit to bkhizgiy/forklift that referenced this pull request Oct 4, 2023
ahadas pushed a commit that referenced this pull request Oct 4, 2023
Signed-off-by: Bella Khizgiyaev <[email protected]>
ahadas pushed a commit that referenced this pull request Oct 4, 2023
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.

4 participants