Wenkai Yin(尹文开)
c8ad69ab04
Check whether the API resource exists before creating the informer cache
...
Check whether the API resource exists before creating the informer cache
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2024-01-24 12:41:00 +08:00
Wenkai Yin(尹文开)
673bfefd45
Log the error got from the discovery helper
...
Log the error got from the discovery helper
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2024-01-22 15:24:53 +08:00
Tiger Kaovilai
270b1de6a1
Do not attempt restore resource with no available GVK in cluster ( #7322 )
...
Check for GVK before attempting restore.
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2024-01-22 09:50:13 +08:00
Wenkai Yin(尹文开)
956248e8a6
Create informer per resources to avoid huge memory consumption
...
Create informer per resources to avoid huge memory consumption
Fixes #7323
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2024-01-18 10:47:00 +08:00
Jose Arevalo
0b307ca035
Add CRD name to error message when it is not ready to use
...
When debugging this error it is currently hard to identify what
CRD is causing the issue. This is particularly difficult when
dealing with over a hundred CRDs.
Signed-off-by: Jose Arevalo <jose.matias.arevalo@gmail.com>
2024-01-10 12:11:47 +10:00
Daniel Jiang
a5d08ac5f0
Do not set "targetNamespace" to namepsace items
...
fixes #7263
This commit makes the data structures more consistent, that namespaces,
as cluster scoped resource will not have "targetNamespace" in the
"restoreableItem" instance.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2024-01-05 14:01:16 +08:00
Xun Jiang
9be8eb0c6d
Don't generate empty structure.
...
VolumeInfo contains several sub-structures. They are filled for
different scenarios. Do not generate empty structure for the
not filled sub-structures.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-12-21 14:53:03 +08:00
Daniel Jiang
0f49935720
Use a new variable for resource path
...
This commit avoids mistakes when checking the type of the resource
Fixes #7190
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-12-10 23:19:52 +08:00
Xun Jiang
28df14d9d5
Modify restore logic.
...
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-12-05 10:01:16 +08:00
Xun Jiang
c77bec73bb
Move VolumesInformation to an independant package.
...
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-12-04 08:33:37 +08:00
Xun Jiang
ca97248f2a
Use VolumeInfo to help restore the PV.
...
Add VolumeInfo for left PVs during backup.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-12-04 08:33:37 +08:00
Xun Jiang
f5c159ce56
Resolve linter issues.
...
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-11-29 11:15:43 +08:00
Daniel Jiang
b8604b6a89
Treat namespace as a regular restorable item ( #7143 )
...
Fixes #1970
Namespaces will be handled as cluster-scope resource, but for
consistency they will still created via "Ensure namespace" flow for
consistency.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-11-28 11:20:36 -05:00
Daniel Jiang
85482aefaf
Merge pull request #7117 from allenxu404/issue6567
...
Add hook status to backup/restore CR
2023-11-28 16:54:11 +08:00
allenxu404
5d1a632be4
Add hook status to backup/restore CR
...
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-11-28 14:47:31 +08:00
qiuming
3fdb3ec7c5
Merge pull request #7069 from 27149chen/imporve-discovery-refresh
...
improve discoveryHelper.Refresh() in restore
2023-11-27 18:02:36 +08:00
lou
179faf3e33
update after review
...
Signed-off-by: lou <alex1988@outlook.com>
2023-11-27 17:39:37 +08:00
Lyndon-Li
efc5319c1c
Issue 6693: partially fail restore if CSI snapshot is involved but CSI feature is not ready
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-11-10 12:40:41 +08:00
Lyndon-Li
2841be7681
Merge branch 'main' into issue-fix-6693
2023-11-10 10:04:27 +08:00
Xun Jiang/Bruce Jiang
cb5ffe2753
Merge pull request #7061 from blackpiglet/6595_backward_compatability
...
Add DataUpload Result and CSI VolumeSnapshot check for restore PV.
2023-11-10 09:37:19 +08:00
Lyndon-Li
873197ff50
issue 6693: partially fail restore if CSI snapshot is involved but CSI feature is not ready
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-11-09 17:37:23 +08:00
lou
70483ded90
improve discoveryHelper.Refresh() in restore
...
Signed-off-by: lou <alex1988@outlook.com>
2023-11-07 19:12:30 +08:00
Xun Jiang
1fb0529d98
Add DataUpload Result and CSI VolumeSnapshot check for restore PV.
...
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-11-06 22:40:03 +08:00
Anshul Ahuja
6b7ce6655d
Merge pull request #7022 from allenxu404/i6721
...
Fix inconsistent behavior of Backup and Restore hook execution
2023-11-06 14:01:30 +05:30
Xun Jiang
56b5e982d9
Remove dependency of generated client part 3
...
Replace generated discovery client with client-go client.
Remove generated client from PVR action.
Remove generated client from pkg/cmd directory.
Delete velero generate client from client factory.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-11-06 11:34:39 +08:00
lyndon
d6146ecff4
Merge pull request #7041 from blackpiglet/6190_part_2
...
Remove dependency of generated client part 2
2023-11-03 17:43:10 +08:00
Xun Jiang
a221a88945
Remove dependency of generated client part 2
...
Remove dependecy of generate client from pkg/cmd/cli/snapshotLocation.
Remove the Velero generated informer from PVB and PVR.
Remove dependency of generated client from pkg/podvolume directory.
Replace generated codec with runtime codec.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-11-03 17:11:36 +08:00
Tiger Kaovilai
10245b05de
restore: Use warning when Create IsAlreadyExist and Get error ( #7004 )
...
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-11-02 15:53:47 -04:00
allenxu404
3a3527553a
Fix inconsistent behavior of Backup and Restore hook execution
...
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-11-02 12:31:53 +08:00
Wenkai Yin(尹文开)
73c948d6bd
Merge pull request #6917 from 27149chen/rm-improvement
...
support JSON Merge Patch and Strategic Merge Patch in Resource Modifiers
2023-11-02 10:36:40 +08:00
Xun Jiang/Bruce Jiang
9ff4b1e079
Merge pull request #7026 from blackpiglet/6376_fix
...
Add HealthCheckNodePort deletion logic in Serivce restore
2023-10-27 16:40:04 +08:00
Xun Jiang
a94918026c
Add HealthCheckNodePort deletion logic in Service restore.
...
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-10-27 14:13:52 +08:00
Xun Jiang
908e2c63ba
Check whether the action is a CSI action and whether CSI feature is
...
enabled, before executing the action.
The DeleteItemAction is not checked, because the DIA doesn't have a
method to get the action's plugin name.
This should be OK, because the CSI will check whether the VS and VSC
have a backup name annotation. If the VS and VSC is not handled by
the CSI plugin, then they don't have the annotation.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-10-24 16:54:38 +08:00
Shubham Pampattiwar
ad114f8f65
Merge pull request #6723 from sseago/restore-get-perf
2023-10-12 07:57:40 -07:00
Scott Seago
7750e12151
Perf improvements for existing resource restore
...
Use informer cache with dynamic client for Get calls on restore
When enabled, also make the Get call before create.
Add server and install parameter to allow disabling this feature,
but enable by default
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-10-11 10:51:39 -04:00
Scott Seago
09be1f7995
issue #6807 : Retry failed create when using generateName
...
When creating resources with generateName, apimachinery
does not guarantee uniqueness when it appends the random
suffix to the generateName stub, so if it fails with
already exists error, we need to retry.
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-10-09 17:38:37 -04:00
lou
d8b9328310
support JSON Merge Patch and Strategic Merge Patch in Resource Modifiers
...
Signed-off-by: lou <alex1988@outlook.com>
2023-09-25 18:00:18 +08:00
Daniel Jiang
cf3cb9c4ed
Merge pull request #6712 from kaovilai/jobs-label-k8s1.27
...
On restore, delete Kubernetes 1.27 job controller uid label
2023-09-18 16:49:50 +08:00
Guang Jiong Lou
246831de7b
use old namespace in resource modifier ( #6724 )
...
* use old namespace in resource modifier
Signed-off-by: lou <alex1988@outlook.com>
* add changelog
Signed-off-by: lou <alex1988@outlook.com>
* update docs
Signed-off-by: lou <alex1988@outlook.com>
* updated after review
Signed-off-by: lou <alex1988@outlook.com>
---------
Signed-off-by: lou <alex1988@outlook.com>
2023-09-08 15:29:46 +05:30
lyndon
1615cfd7f3
fix issue 6709 ( #6741 )
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-01 16:52:24 +08:00
Tiger Kaovilai
c5aad9e488
Remove legacy label version check, to be added back when version is known
...
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-08-28 11:08:44 -04:00
Tiger Kaovilai
7d3d818f93
Handle 1.27 k8s job label changes
...
per 0e86fa5115/CHANGELOG/CHANGELOG-1.27.md
?plain=1#L1768
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-08-28 10:42:09 -04:00
lou
1784f63b93
get resource client again after restore actions in case resource's gv is changed
...
Signed-off-by: lou <alex1988@outlook.com>
2023-08-10 18:55:27 +08:00
Daniel Kucera
0ec0c963d2
Allow updated resource version ( #6499 )
...
Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
2023-08-10 10:44:15 +08:00
Lyndon-Li
74bf03b272
data mover wrong bsl after sync
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-07-25 12:38:09 +08:00
Anshul Ahuja
8db88bd392
Merge branch 'main' into resourcemodifier
2023-07-10 11:33:49 +05:30
Anshul Ahuja
6307a43004
Add test case
...
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-06 10:14:49 +05:30
Anshul Ahuja
ed4437ad22
initial draft
...
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-05 13:51:32 +05:30
Xun Jiang
7b4d4c7275
Limit label "velero.io/pvc-namespace-name" length to 63.
...
1. Limit label length.
2. Modify UT accordingly.
3. Remove unnecessary const variable.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-07-04 15:10:34 +08:00
Anshul Ahuja
5424b07bb3
restore flow changes
...
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-03 13:48:24 +05:30