Commit Graph

1524 Commits (9d42c1a408c1e1a3accf8757a7d7704fff3b26de)

Author SHA1 Message Date
Daniel Jiang 722aead2fd
Merge pull request #5716 from jelipo/fix-json-name
fix json serialize name
2023-01-03 13:25:53 +08:00
Daniel Jiang 78682d7cc3
Merge pull request #5710 from sseago/async-cr-phases
backup/restore phases for async plugin operations
2023-01-03 13:24:58 +08:00
yanggang 62c00ba841
fix log info : pkg/util/kube/isProvisionedByCSI
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-01-03 10:37:19 +08:00
qiuming 5b03da2637
Merge pull request #5715 from Lyndon-Li/issue-fix-5696
[Main] Fix issue 5696
2022-12-22 10:49:25 +08:00
Scott Seago 2abb176bd8 backup/restore phases for async plugin operations
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-12-21 10:15:32 -05:00
haining.cao 544df59f58 fix json serialize name
Signed-off-by: haining.cao <haining.cao@daocloud.io>
2022-12-21 18:54:45 +08:00
Lyndon-Li 32eb8655cc fix issue 5696
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-12-21 12:49:23 +08:00
Ming 3b903e678f [Cherry-Pick]Fix error with Restic backup empty volumes
Signed-off-by: Ming <mqiu@vmware.com>
2022-12-20 06:33:22 +00:00
Lyndon-Li 88a1317f48 fix issue 5043
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-12-15 20:00:54 +08:00
Dylan Murray 55873c1c37
Prevent nil panic on exec restore hooks (#5675)
* Prevent nil panic on exec restore hooks

Signed-off-by: Dylan Murray <dymurray@redhat.com>
2022-12-13 13:45:52 +08:00
Lyndon-Li b51a17138e fix issue 5458
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-12-01 15:12:07 +08:00
Daniel Jiang 2dce4a7cb5 Update the api-types doc
This commit makes update to the update api-types docs to add missing
fields.
It also includes misc changes to the inline comment, and a change to
Dockerfile to make sure the build-image works on mac

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-11-25 14:39:41 +08:00
Wenkai Yin(尹文开) 8194e8d723 Restore ClusterBootstrap before Cluster
Restore ClusterBootstrap before Cluster otherwise a new default ClusterBootstrap object is create for the cluster

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-11-22 17:25:13 +08:00
Ming bf1122b633 Fix controller problematic log output
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-09 06:46:45 +00:00
Lyndon-Li b06cb9ec60 remove gofrs uuid
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-11-07 16:28:33 +08:00
lyndon cc9d492479
Merge pull request #5485 from Obmondo/fix/error-message
Fix pointer deference to string in error message
2022-11-04 14:15:56 +08:00
Xun Jiang/Bruce Jiang 1865aab28d
Merge pull request #5535 from ywk253100/221102_order
[cherry-pick]Enhance the restore priorities list to support specifying the low prioritized resources that need to be restored in the last
2022-11-03 14:53:10 +08:00
Wenkai Yin(尹文开) c186a7d193 Enhance the restore priorities list to support specifying the low prioritized resources that need to be restored in the last
Enhance the restore priorities list to support specifying the low prioritized resources that need to be r
estored in the last

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-11-03 10:53:32 +08:00
Xun Jiang/Bruce Jiang 345abb3142
Merge pull request #5534 from qiuming-best/backup-progress
fix restic backup progress error
2022-11-02 17:15:30 +08:00
Ming 32637da16b fix restic backup progress error
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-02 07:49:00 +00:00
Xun Jiang/Bruce Jiang 5db3da5aea
Merge pull request #5512 from Lyndon-Li/issue-fix-5505
Issue fix 5505
2022-11-01 19:38:39 +08:00
Xun Jiang/Bruce Jiang ae1e42cfd7
Merge pull request #5478 from Lyndon-Li/s3-compatible-provider
Issue fix 5477
2022-11-01 19:38:26 +08:00
Ming 52a49d1945 fix backup failure with self-signed certification
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-01 07:05:20 +00:00
Xun Jiang 41fc641298 Add credential file store in the backup deletion controller.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-10-31 16:59:26 +08:00
Lyndon-Li 3571339fd6 issue fix 5505
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-31 11:09:46 +08:00
Xun Jiang/Bruce Jiang 150570feec
Remove redundancy code block left by #5388. (#5483)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-10-27 14:20:26 +08:00
Faizan Ahmad 9d01432007
Fix pointer deference to string in error message
Signed-off-by: Faizan Ahmad <faizan@obmondo.com>
2022-10-25 07:52:00 +05:30
Lyndon-Li 9695340c12 repo config for s3 compatible store
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-24 19:48:09 +08:00
Xun Jiang/Bruce Jiang 660841dfbd
Merge pull request #5471 from ywk253100/221021_lib
update k8s.io dependencies to 0.24.0
2022-10-24 14:46:43 +08:00
Xun Jiang/Bruce Jiang 5027aae194
Add more nil pointer check for CSI related code in backup controller. (#5388)
Add some corner cases checking for CSI snapshot in backup controller.

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-10-24 10:42:08 +08:00
Kira Boyle b146a880c6 update k8s.io dependencies to 0.24.0
* This also required an update to use github.com/bombsimon/logrusr/v3
* 'WithClusterName' removed as per the k8s doc reasoning:
* https://github.com/kubernetes/apimachinery/blob/release-1.24/pkg/apis/meta/v1/types.go\#L257-L259
* ('ClusterName was a legacy field that was always cleared by the system and never used')
* Test was updated accordingly

Signed-off-by: Kira Boyle <kira@replicated.com>
2022-10-21 11:16:21 +08:00
Shubham Pampattiwar c5339227fe
increase ensure restic repository timeout (#5335)
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2022-10-19 16:26:45 +08:00
Daniel Jiang fc038041fb
Merge pull request #5294 from cleverhu/change-CSISnapshotTimeout-to-normal-var
change CSISnapshotTimeout from pointer to normal variable
2022-10-19 15:31:47 +08:00
lyndon 162680b39c
Merge branch 'main' into velero-docker-image-go-1.18
Signed-off-by: lyndon <98304688+Lyndon-Li@users.noreply.github.com>
2022-10-19 09:29:36 +08:00
Shubham Pampattiwar 34cca77533 Add nil check before execution of csi snapshot delete
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

add changelog

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2022-10-18 11:51:55 -04:00
Lyndon-Li c92f06ef17 fix lint loop iterator problem
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-18 22:40:48 +08:00
Lyndon-Li d7b4583b2b fix lint errors
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-18 21:53:47 +08:00
Xun Jiang/Bruce Jiang 9cb46deb73
Add CSI VolumeSnapshot client back. (#5449)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-10-18 14:58:03 +08:00
lyndon ad7e3ab8d5
Merge pull request #5446 from allenxu404/i5098
Change subcommand `velero restic` to `velero repo`
2022-10-17 18:28:51 +08:00
Xun Jiang/Bruce Jiang d658f6564d
Merge pull request #5444 from Lyndon-Li/remove-restic
Pod Volume Backup/Restore Refactor: Remove Restic in code
2022-10-17 15:32:17 +08:00
lyndon d52ec8c079
Pod Volume Backup/Restore Refactor: Rename Init Helper (#5432)
* restore helper refactor

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* resolve codespell

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-17 13:42:09 +08:00
danfengl cf32cabddd fix-ctx-issue
1. Fix issue of kubectl client and server mismatch version in GitAction E2E job, refer to https://github.com/elastic/cloud-on-k8s/issues/4737;
2. Adapt to the changing of keyword for involing Kpoia as fs backupper, new installtion breaked upgrade and migration tests;
3. Accept multi-labels of Ginkgo focus as input of E2E make command;
4. Distinguish workload namespace from each tests;
5. Fix issues of not using Velero util to perform Velero commands;
6. Add snapshot test case for NamespaceMapping E2E test;
7. Collect debug bundle after catching error of Velero backup or restore command;
Signed-off-by: danfengl <danfengl@vmware.com>
2022-10-16 13:18:39 +00:00
allenxu404 154f5551c6 Change subcommand restic to repo
Signed-off-by: allenxu404 <qix2@vmware.com>
2022-10-13 19:45:52 +08:00
Lyndon-Li 5f7f69366c remove restic from code
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-13 13:45:32 +08:00
Scott Seago 45de8a782f moved RIA execute input/output structs back to velero package
The RIA refactoring moved velero.RestoreItemAction into a separate
(restoreitemaction) v1 package. Unfortunately, this change would require
plugins to make code changes to locate the RestoreItemActionExecuteInput
and RestoreItemActionExecuteOutput structs.

This commit restores those structs to the original velero package, leaving
just the RestoreItemAction interface in the new v1 package.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-10-12 13:17:47 -04:00
Daniel Jiang b5b4db29cd
Merge pull request #5429 from reasonerjt/skip-additional-resources-main
Skip the exclusion check for additional resources returned by BIA
2022-10-12 09:46:09 +08:00
lyndon 83ea1cc58b
rename daemonset (#5390)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-11 14:18:21 +08:00
Daniel Jiang 28c543a9ec Skip the exclusion check for additional resources returned by BIA
This commit provides a simple contract that if the BackupItemAction
plugin sets an annotation in a resource it has handled, the additional
items will considered "must include" i.e. each of them will skip the
"include-exclude" filter, such that the plugin developer can make sure
they are included in the backup disregarding the filter setting in the
bakcup CR.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-10-11 12:03:44 +08:00
Xun Jiang/Bruce Jiang f3e3cfcdaf
Merge pull request #5412 from allenxu404/i5085
Change B/R describe CLI to support kopia
2022-10-03 14:32:04 +08:00
allenxu404 47f8eb5f9b Change B/R describe cli to support kopia
Signed-off-by: allenxu404 <qix2@vmware.com>
2022-09-30 17:30:18 +08:00
Xun Jiang/Bruce Jiang a80c96c8f8
update velero using klog to version v2.9.0 (#5396)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2022-09-30 14:08:43 +08:00
Xun Jiang/Bruce Jiang 3f3a5050d6
Exclude "csinodes.storage.k8s.io" and "volumeattachments.storage.k8s.io" from backup and restore by default. (#5064)
Signed-off-by: Xun Jiang <jxun@vmware.com>

Signed-off-by: Xun Jiang <jxun@vmware.com>
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
2022-09-29 15:24:06 +08:00
Xun Jiang/Bruce Jiang eec27e942e
Add backup status checking schedule controller. (#5283)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2022-09-29 15:01:30 +08:00
qiuming eacc10347b
Fix restore error with flag namespace-mappings (#5377)
Signed-off-by: Ming <mqiu@vmware.com>
2022-09-29 11:54:51 +08:00
Xun Jiang 9693aca1f3 Fix Test_prepareBackupRequest_BackupStorageLocation UT failure.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-09-26 17:10:23 +08:00
Daniel Jiang c83447f394
Merge pull request #5362 from niulechuan/add-backup-controller-ut
Added backupController's UT to test the prepareBackupRequest() method BackupStorageLocation processing logic
2022-09-26 14:17:16 +08:00
Lyndon-Li 6c8981b0ad fix issue 5386
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-23 16:52:38 +08:00
Xun Jiang/Bruce Jiang ce247a3d90
Remove snapshot related lister, informer and client from backup controller. (#5299)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-09-23 15:44:39 +08:00
Xun Jiang/Bruce Jiang b7f5cbd0c0
Merge pull request #5318 from sseago/volumesnapshotter-refactor
plugin versioning v1 refactor for VolumeSnapshotter
2022-09-23 09:54:01 +08:00
lyndon c81f0db886
rename pvbr param (#5370)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-23 09:13:36 +08:00
Scott Seago b6088356e6 plugin versioning v1 refactor for VolumeSnapshotter
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-09-21 13:47:23 -04:00
Scott Seago 32ef20d317 RestoreItemAction v1 refactoring for plugin api versioning
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-09-20 17:43:56 -04:00
qiuming 07da9b9cf8
Merge pull request #5279 from ywk253100/220829_pause
Support pause/unpause schedules
2022-09-20 16:06:17 +08:00
qiuming 648311a0f5
Merge pull request #5350 from blackpiglet/5019-snapshot-volumes-help-message-modification
Modify help message of parameter --snapshot-volumes
2022-09-20 14:18:00 +08:00
Niu Lechuan a5f1e7ac11 Added backupController's UT to test the prepareBackupRequest() method BackupStorageLocation processing logic
Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>
2022-09-20 11:26:03 +08:00
Lyndon-Li 18bda60791 fix issue 5358
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-19 16:46:03 +08:00
Xun Jiang/Bruce Jiang 32b48d0dad
Merge pull request #5356 from Lyndon-Li/issue-fix-5352
Fix issue 5352
2022-09-19 14:47:27 +08:00
lyndon 429e204992
Merge pull request #5329 from kaovilai/veleroDownloadRequestReturnSomething-veleromain
Cancel downloadRequest when timeout without downloadURL
2022-09-19 14:20:18 +08:00
Lyndon-Li dedb3e0098 fix issue 5352
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-19 11:39:11 +08:00
lyndon ede7b197ae
Merge pull request #5297 from blackpiglet/remove_apex_log
Remove github.com/apex/log logger.
2022-09-16 16:47:36 +08:00
Xun Jiang/Bruce Jiang e42352b2e4
Merge pull request #5271 from sseago/plugin-versioning-impl
plugin/clientmgmt and framework refactoring for BackupItemAction v1
2022-09-16 16:41:33 +08:00
Xun Jiang d134783282 Clarify the help message for the default value of parameter --snapshot-volumes, when it's not set.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-09-16 16:03:05 +08:00
Xun Jiang/Bruce Jiang 4768c2acf4
Merge pull request #5314 from allenxu404/issue3565
Change the status of restore to completed from partiallyFailed when restore empty backup
2022-09-16 15:00:36 +08:00
Scott Seago e3e2a8dfa0 plugin/framework refactoring for BackupItemAction v1
Refactors the framework  package to implement the plugin versioning changes
needed for BIA v1 and overall package refactoring to support plugin versions
in different packages. This should be all that's needed to move on to
v2 for BackupItemAction. The remaining plugin types still need similar
refactoring to what's being done here for BIA before attempting a
v2 implementation.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-09-15 11:15:30 -04:00
Scott Seago 4262b47536 plugin/clientmgmt refactoring for BackupItemAction v1
Refactors the clientmgmt package to implement the plugin versioning changes
needed for BIA v1 and overall package refactoring to support plugin versions
in different packages. This should be all that's needed to move on to
v2 for BackupItemAction. The remaining plugin types still need similar
refactoring to what's being done here for BIA before attempting a
v2 implementation.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-09-15 11:15:30 -04:00
Shubham Pampattiwar 1e138af1cf
Merge pull request #5263 from sseago/biav1-refactor
Don't move velero v1 plugins to new proto dir
2022-09-15 11:14:05 -04:00
Xun Jiang/Bruce Jiang 745ebbe081
Merge pull request #5347 from qiuming-best/fix-restic-resotre
Fix restore cmd extraflag overwrite bug
2022-09-15 15:37:15 +08:00
Xun Jiang/Bruce Jiang d0954dddd4
Merge pull request #5322 from qiuming-best/fix-get-parent-snapshot
Fix PVB finds wrong parent snapshot
2022-09-15 15:23:27 +08:00
Ming 4022020d5f Fix restore cmd extraflag overwrite bug
Signed-off-by: Ming <mqiu@vmware.com>
2022-09-15 06:09:41 +00:00
Xun Jiang/Bruce Jiang a05fc498b1
Merge pull request #5291 from cleverhu/add-shorthand-for-labels-columns
Add shorthand for labels columns
2022-09-15 11:24:06 +08:00
Wenkai Yin(尹文开) 4b9dbfa416 Support pause/unpause schedules
Support pause/unpause schedule

Fixes #2363

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-09-15 10:42:48 +08:00
Tiger Kaovilai 2c759f395a cancel downloadRequest checkFunc if timeout passed
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-09-14 14:13:09 -04:00
lyndon 100d6b4430
Merge pull request #5319 from Lyndon-Li/issue-fix-4874
Issue fix 4874 and 4752
2022-09-14 11:04:56 +08:00
Lyndon-Li fbb2606102 issue fix 4874 update
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-13 11:15:52 +08:00
Shubham Pampattiwar be40d7eb19
Merge pull request #4864 from sseago/vsl-creds-main
Add credentials to volume snapshot locations.
2022-09-12 09:56:49 -04:00
Ming c612853bd5 Fix PVB finds wrong parent snapshot
Signed-off-by: Ming <mqiu@vmware.com>
2022-09-09 08:30:57 +00:00
lyndon 30a70cbd0d
Merge branch 'vmware-tanzu:main' into issue-fix-4874 2022-09-09 09:20:38 +08:00
Xun Jiang/Bruce Jiang 325b8c0d05
Merge pull request #5308 from Lyndon-Li/repository-ensurer-refactor
Repo Ensurer Refactor
2022-09-08 21:17:31 +08:00
Scott Seago be0a1cf361
Merge pull request #5293 from cleverhu/optimize-restore
optimize code for restore exists resources
2022-09-08 09:01:44 -04:00
Scott Seago 596114b427 Add credentials to volume snapshot locations.
This is analogous to the BSL creds work that was done previously, but for VSLs instead.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-09-08 08:59:17 -04:00
allenxu404 dc70471909 Change the status of restore to completed from partially failed when restore empty backup
Signed-off-by: allenxu404 <qix2@vmware.com>
2022-09-08 18:40:49 +08:00
Lyndon-Li 8496b43e37 refactor repo ensurer
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-08 16:10:51 +08:00
Lyndon-Li a12024887f fix issue 4874
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-07 21:44:45 +08:00
lyndon 8888f8765e
Merge pull request #5282 from Lyndon-Li/kopia-pvbr-smoking-test
Kopia Pod Volume Backup/Restore Smoking Test Changes
2022-09-07 14:20:44 +08:00
Lyndon-Li a90ba3db7c kopia pvbr smoking test changes
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-07 13:22:49 +08:00
Xun Jiang b49e39c021 Remove github.com/apex/log logger.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-09-07 08:52:16 +08:00
cleverhu 7de6f2a2fc trim isAlreadyExistsError for restore
Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-09-07 03:55:20 +08:00
cleverhu 067a3ec03a change CSISnapshotTimeout from point to normal var
Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-09-07 01:30:47 +08:00
cleverhu 5e6111e6c0 add shorthand for labels columns
Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-09-06 20:14:13 +08:00
Scott Seago b15c59ba69 Don't move velero v1 plugins to new proto dir
To preserve backwards compatibility, don't move velero
v1 plugins to new proto dir.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-09-05 16:01:56 -04:00