Commit 693caf6
Add VM file restore feature integration
This commit integrates the VM file restore feature into OADP operator,
following the same pattern as the non-admin controller integration.
Features:
- Enable/disable VM file restore via DPA.Spec.VMFileRestore.Enable
- Automatic deployment of oadp-vm-file-restore-controller when enabled
- Support for custom resource limits via DPA configuration
- Image override support for all 4 required images:
* VM file restore controller
* File access container
* SSH sidecar
* FileBrowser sidecar
Changes:
- API: Added VMFileRestore struct to DataProtectionApplication spec
- API: Added 4 image key constants for unsupportedOverrides
- Controller: Created vmfilerestore_controller.go with reconciliation logic
- Validation: Added VM file restore validation requiring kubevirt and openshift plugins
- CRDs: Added VirtualMachineBackupsDiscovery and VirtualMachineFileRestore
- RBAC: Added ClusterRole, binding, and ServiceAccount for controller
- Bundle: Updated CSV with new CRDs, environment variables, and related images
- Documentation: Created comprehensive user guide at docs/config/vm_file_restore.md
- Tests: Added 33 unit test scenarios with full coverage
Prerequisites:
- KubeVirt must be installed in the cluster
- kubevirt-velero-plugin must be configured in defaultPlugins (required)
- openshift-velero-plugin must be configured in defaultPlugins (required)
Implements: migtools/oadp-vm-file-restore#10
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 513180a commit 693caf6
File tree
22 files changed
+4008
-0
lines changed- api/v1alpha1
- bundle/manifests
- config
- crd
- bases
- manager
- rbac
- vm-file-restore-controller_rbac
- docs/config
- internal/controller
22 files changed
+4008
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| |||
728 | 732 | | |
729 | 733 | | |
730 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
731 | 747 | | |
732 | 748 | | |
733 | 749 | | |
| |||
840 | 856 | | |
841 | 857 | | |
842 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
843 | 863 | | |
844 | 864 | | |
845 | 865 | | |
| |||
873 | 893 | | |
874 | 894 | | |
875 | 895 | | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
876 | 899 | | |
877 | 900 | | |
878 | 901 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
691 | 697 | | |
692 | 698 | | |
693 | 699 | | |
| |||
1135 | 1141 | | |
1136 | 1142 | | |
1137 | 1143 | | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
1138 | 1152 | | |
1139 | 1153 | | |
1140 | 1154 | | |
| |||
1297 | 1311 | | |
1298 | 1312 | | |
1299 | 1313 | | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
1300 | 1322 | | |
Lines changed: 72 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2669 | 2669 | | |
2670 | 2670 | | |
2671 | 2671 | | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
2672 | 2676 | | |
2673 | 2677 | | |
2674 | 2678 | | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
2675 | 2747 | | |
2676 | 2748 | | |
2677 | 2749 | | |
| |||
0 commit comments