Compare commits

..

1463 Commits

Author SHA1 Message Date
Xun Jiang/Bruce Jiang
5c4fdfe147 Merge pull request #6993 from allenxu404/release-1.12
Change v1.12.1 changelog
2023-10-20 21:04:47 +08:00
allenxu404
226237bab4 Change v1.12.1 changelog
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-10-20 20:50:12 +08:00
Xun Jiang/Bruce Jiang
bbc9790316 Merge pull request #6991 from Lyndon-Li/release-1.12
[1.12] Issue 6988: udmrepo use region specified in BSL when s3URL is empty
2023-10-20 20:32:29 +08:00
Lyndon-Li
10744ec516 udmrepo use region specified in BSL when s3URL is empty
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-10-20 20:14:01 +08:00
lyndon
905cd43140 Merge pull request #6986 from blackpiglet/support_windows_build
Add both non-Windows version and Windows version code for PVC block mode logic
2023-10-20 19:37:05 +08:00
Xun Jiang
3034cdb448 Make Windows build skip BlockMode code.
PVC block mode backup and restore introduced some OS specific
system calls. Those calls are not available for Windows, so
add both non Windows version and Windows version code, and
return error for block mode on the Windows platform.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-10-20 17:44:38 +08:00
Xun Jiang/Bruce Jiang
353ff55e42 Merge pull request #6984 from allenxu404/release-1.12
Add v1.12.1 changelog
2023-10-20 12:00:11 +08:00
allenxu404
468017d7db Add v1.12.1 changelog
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-10-20 11:18:27 +08:00
lyndon
6bf705fd25 Merge pull request #6970 from ywk253100/231018_auth
[cherry-pick]Import auth provider plugins
2023-10-18 16:48:58 +08:00
Sebastian Glab
7a909d8ff5 Import auth provider plugins
Signed-off-by: Sebastian Glab <sglab@catalogicsoftware.com>
2023-10-18 16:06:18 +08:00
lyndon
ef1b9816b2 Merge pull request #6943 from sseago/retry-generateName1.12
[release-1.12]: CP issue #6807: Retry failed create when using generateName
2023-10-16 11:09:21 +08:00
Scott Seago
457fcc6893 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-13 10:29:46 -04:00
Wenkai Yin(尹文开)
b498847b5b Merge pull request #6951 from blackpiglet/fix_CVE-2023-39325
Fix CVE-2023-39325.
2023-10-13 18:22:45 +08:00
Xun Jiang
af9697814e Fix CVE-2023-39325.
Bump Velero and Restic golang.org/x/net to v0.17.0.
Bump golang version to v1.20.10.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-10-13 14:22:18 +08:00
lyndon
d92a051795 Merge pull request #6948 from sseago/restore-get-perf1.12
[release-1.120: CP Perf improvements for existing resource restore
2023-10-13 08:13:50 +08:00
Scott Seago
a3cb39d62e 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-12 15:07:55 -04:00
Shubham Pampattiwar
c1ace31466 Merge pull request #6940 from Lyndon-Li/release-1.12
[1.12] Issue 6647: add default-snapshot-move-data parameter to Velero install
2023-10-11 08:54:35 -07:00
Lyndon-Li
8bf98e8895 fix issue 6647
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-10-11 17:43:38 +08:00
Xun Jiang/Bruce Jiang
e53cfdf85e Merge pull request #6887 from allenxu404/release-1.12
Add docs link for new features to release note
2023-10-10 16:55:30 +08:00
allenxu404
d93cc9094a Add doc links for new features to release note
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-10-10 16:05:11 +08:00
lyndon
15dd67e203 Merge pull request #6935 from Lyndon-Li/release-1.12
[1.12] Issue 6734: spread backup pod evenly
2023-10-10 11:41:37 +08:00
Lyndon-Li
877592194b issue 6734: spread backup pod evenly
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-10-10 11:04:04 +08:00
Wenkai Yin(尹文开)
17b495fcfd Merge pull request #6934 from ywk253100/231010_image
[cherry-pick]Replace the base image with paketobuildpacks image
2023-10-10 10:32:14 +08:00
Wenkai Yin(尹文开)
b99a59480d Replace the base image with paketobuildpacks image
Replace the base image with paketobuildpacks image

Fixes #6851

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-10-10 09:38:54 +08:00
qiuming
a789976a03 Merge pull request #6925 from qiuming-best/target-v1.12.1
[Cherry-pick v1.12]Keep the logs info ns/name same with other modules
2023-10-08 11:23:52 +08:00
qiuming
52878de077 Merge branch 'release-1.12' into target-v1.12.1 2023-10-08 11:08:07 +08:00
yanggang
432a5fe566 [Cherry-pick v1.12]Keep the logs info ns/name is the same with other modules.
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-10-08 03:07:43 +00:00
Xun Jiang/Bruce Jiang
175047baa9 Merge pull request #6912 from blackpiglet/6750_cherry_pick
[cherry-pick][release-1.12]Code clean for backup cmd client. (#6750)
2023-10-08 11:05:06 +08:00
Yang Gang
0eaf14ed19 Code clean for backup cmd client. (#6750)
Address some code spell check errors.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-10-03 23:55:25 +08:00
David Zaninovic
c415fd4bcc Add support for block volumes (#6680) (#6897)
(cherry picked from commit 8e01d1b9be)

Signed-off-by: David Zaninovic <dzaninovic@catalogicsoftware.com>
2023-09-29 15:28:35 -04:00
Shubham Pampattiwar
554403df5c Merge pull request #6713 from kaovilai/jobs-label-k8s1.27-velero1.12
release-1.12: On restore, delete Kubernetes 1.27 job controller uid label
2023-09-29 11:49:32 -07:00
Tiger Kaovilai
aba64ba151 Remove legacy label version check, to be added back when version is known
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-09-29 12:27:29 -04:00
Tiger Kaovilai
3a410c9f04 changelog
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-09-29 12:27:29 -04:00
Tiger Kaovilai
2f92f78be5 Handle 1.27 k8s job label changes
per  0e86fa5115/CHANGELOG/CHANGELOG-1.27.md (L1768)

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-09-29 12:27:29 -04:00
Shubham Pampattiwar
9d5dd8e09d Merge pull request #6899 from sseago/pvb-start-logs
[release-1.12] cherry-pick Fix some wrong logs and code clean.
2023-09-29 09:27:01 -07:00
yanggang
6103073551 Fix some wrong logs and code clean.
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-09-28 13:27:51 -04:00
Xun Jiang/Bruce Jiang
83f892d81f Add go clean in Dockerfile and action. (#6896)
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-09-28 10:20:48 -04:00
Wenkai Yin(尹文开)
2cd15f1e4b Merge pull request #6892 from reasonerjt/cp-6768-1.12
[Cherry-pick v1.12] code clean for repository (#6768)
2023-09-28 17:56:59 +08:00
Yang Gang (成都)
27a89df34d code clean for repository (#6768)
Signed-off-by: Yang Gang (成都) <gang.yang@daocloud.io>
2023-09-28 16:51:22 +08:00
lyndon
e4c2b2b157 Merge pull request #6886 from Lyndon-Li/release-1.12
[1.12] Issue 6880: set ParallelUploadAboveSize as MaxInt64
2023-09-28 15:15:53 +08:00
Lyndon-Li
edefe7a63b issue 6880: set ParallelUploadAboveSize as MaxInt64
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-28 14:26:46 +08:00
Wenkai Yin(尹文开)
a097094bcf Merge pull request #6881 from ywk253100/230927_cherry_pick
Add 'orLabelSelector' for backup, restore command
2023-09-28 07:21:13 +08:00
Wenkai Yin(尹文开)
bc4dc6c0c8 Rename the changelog
Rename the changelog

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-09-27 20:16:48 +08:00
Nilesh Akhade
343e54f1b8 Add 'orLabelSelector' for backup, restore command
Signed-off-by: Nilesh Akhade <nakhade@catalogicsoftware.com>
2023-09-27 20:13:48 +08:00
lyndon
08d44b02a8 Merge pull request #6877 from Lyndon-Li/release-1.12
[1.12] Issue: 6859 move plugin depdending podvolume functions to util pkg
2023-09-27 17:46:48 +08:00
Lyndon-Li
a8c76a4a00 issue: move plugin depdending podvolume functions to util pkg
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-27 11:29:02 +08:00
lyndon
0623ac363a Merge pull request #6873 from Lyndon-Li/release-1.12
[1.12] Issue 6786:always delete VSC regardless of the deletion policy
2023-09-26 20:56:50 +08:00
Lyndon-Li
1aea12a80c issue 6786:always delete VSC regardless of the deletion policy
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-26 15:53:05 +08:00
Xun Jiang/Bruce Jiang
7112c62e49 Merge pull request #6842 from allenxu404/release-1.12
Modify changelogs for v1.12
2023-09-19 17:53:28 +08:00
allenxu404
dcb891a307 Modify changelogs for v1.12
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-09-19 17:36:36 +08:00
lyndon
21353f00a8 Merge pull request #6841 from Lyndon-Li/release-1.12
[1.12] Doc for multiple snapshot class
2023-09-19 16:45:26 +08:00
Lyndon-Li
5e7114899b doc for multiple snapshot class
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-19 16:28:28 +08:00
Wenkai Yin(尹文开)
b035680ce6 Set data mover related properties for schedule (#6823)
Set data mover related properties for schedule

Fixes #6820

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-09-14 18:04:48 +08:00
lyndon
9eb133e635 Merge pull request #6821 from reasonerjt/update-kopia-repo-1.12
[cherrypick-1.12]Switch the kopia repo to new org
2023-09-14 11:53:12 +08:00
Daniel Jiang
6f1262d4c6 Switch the kopia repo to new org
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-09-14 11:19:43 +08:00
lyndon
48e3278c6c Merge pull request #6814 from allenxu404/release-1.12
[Cherry-pick]Add doc changes after rc1 to v1.12 docs
2023-09-14 10:25:23 +08:00
Qi Xu
acfc6e474f Add doc changes after rc1 to v1.12 docs (#6812)
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-09-13 18:43:00 +08:00
qiuming
993d2c775f Merge pull request #6803 from qiuming-best/finalizer-optimize
Optimize of removing dataupload datadownload finalizer
2023-09-12 15:44:21 +08:00
qiuming
b70b01cde9 Merge branch 'release-1.12' into finalizer-optimize 2023-09-12 15:00:58 +08:00
Anshul Ahuja
8b8a5a2bcc use old namespace in resource modifier (#6724) (#6794)
* use old namespace in resource modifier



* add changelog



* update docs



* updated after review



---------

Signed-off-by: lou <alex1988@outlook.com>
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
Co-authored-by: Guang Jiong Lou <7991675+27149chen@users.noreply.github.com>
Co-authored-by: Daniel Jiang <jiangd@vmware.com>
2023-09-12 14:54:03 +08:00
qiuming
5b36cd7e83 Merge branch 'release-1.12' into finalizer-optimize 2023-09-12 11:57:07 +08:00
Ming Qiu
3240fb196c Optimize of removing finalizer no matter the dataupload datadownload cr is been deleted or not
Signed-off-by: Ming Qiu <mqiu@vmware.com>
2023-09-12 11:55:44 +08:00
Daniel Jiang
d9859d99ba Merge pull request #6793 from Lyndon-Li/release-1.12
[1.12] Add csi snapshot data mover doc
2023-09-08 18:09:31 +08:00
Lyndon-Li
18d4fe45e8 add csi snapshot data movement doc
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-08 17:51:49 +08:00
qiuming
60d5bb22f7 Merge pull request #6791 from Lyndon-Li/release-1.12
[1.12] Fix issue 6785
2023-09-08 16:32:39 +08:00
Lyndon-Li
9468b8cfa9 fix issue 6785
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-08 15:18:02 +08:00
lyndon
420562111b Merge pull request #6789 from Lyndon-Li/release-1.12
[1.12] Fix issue 6748 [2]
2023-09-08 15:15:19 +08:00
lyndon
cf0b2e9139 Merge branch 'release-1.12' into release-1.12 2023-09-08 14:57:03 +08:00
lyndon
506415e60c Merge pull request #6787 from kaovilai/fsb-yaml-example-r1.12
cherry-pick: r1.12: Show yaml example of repository password: file-system-backup.md #6783
2023-09-08 12:53:42 +08:00
Lyndon-Li
3733a40637 fix issue 6748
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-08 09:53:00 +08:00
Tiger Kaovilai
fe1ade0226 Show yaml example of repository password: file-system-backup.md
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-09-07 11:54:10 -04:00
Xun Jiang/Bruce Jiang
86e1a74937 Merge pull request #6778 from allenxu404/release-1.12
[cherry-pick] add note for backup repository password configuration
2023-09-07 10:25:05 +08:00
Shubham Pampattiwar
6260a44e62 add note for backup repository password configuration
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

address PR feedback

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

reword the note

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

change FS backups to normal backups in the note

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2023-09-06 17:58:57 +08:00
Xun Jiang/Bruce Jiang
06d9bfae8d Merge pull request #6762 from blackpiglet/6750_fix_1.12
[cherry-pick][release-1.12]Fix #6752: add namespace exclude check.
2023-09-06 15:44:09 +08:00
Xun Jiang
4d1617470f Fix #6752: add namespace exclude check.
Add PSA audit and warn labels.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-09-06 15:28:17 +08:00
lyndon
1b2c82c9eb Merge pull request #6772 from Lyndon-Li/release-1.12
[1.12] Fix issue 6748
2023-09-06 11:21:19 +08:00
Lyndon-Li
040060082a fix issue 6748
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-06 10:37:47 +08:00
Wenkai Yin(尹文开)
fc653bdfbe Update restore controller logic for restore deletion (#6761)
1. Skip deleting the restore files from storage if the backup/BSL is not found
2. Allow deleting the restore files from storage even though the BSL is readonly

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-09-06 08:38:45 +08:00
lyndon
6790a18814 Merge pull request #6758 from Lyndon-Li/release-1.12
[1.12] Fix issue 6753
2023-09-05 11:06:55 +08:00
Lyndon-Li
93995bfd00 fix issue 6753
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-05 10:44:58 +08:00
lyndon
80572934dc Merge pull request #6743 from Lyndon-Li/release-1.12-1
[1.12] Fix issue 6733
2023-09-01 18:40:11 +08:00
lyndon
41d9b67945 Merge branch 'release-1.12' into release-1.12-1 2023-09-01 18:22:05 +08:00
lyndon
a06107ac70 Merge pull request #6742 from Lyndon-Li/release-1.12
[1.12] Fix issue 6709
2023-09-01 18:18:27 +08:00
lyndon
40a94e39ad Merge branch 'release-1.12' into release-1.12-1 2023-09-01 18:07:13 +08:00
lyndon
7ea0d434d6 Merge branch 'release-1.12' into release-1.12 2023-09-01 17:53:16 +08:00
qiuming
6b884ecc39 Merge pull request #6740 from qiuming-best/release-1.12
Fix kopia snapshot policy not work
2023-09-01 17:43:36 +08:00
Lyndon-Li
183f7ac154 fix issue 6733
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-01 17:30:52 +08:00
lyndon
75bda412a1 fix issue 6709 (#6741)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-09-01 17:12:31 +08:00
Ming Qiu
a2eb10df8f Fix kopia snapshot policy not work
Signed-off-by: Ming Qiu <mqiu@vmware.com>
2023-09-01 16:34:02 +08:00
Daniel Jiang
90bc1abd21 Merge pull request #6725 from anshulahuja98/cherrypick-6704
[1.12] Cherry Pick - add label selector in Resource Modifiers  (#6704)
2023-08-31 15:59:34 +08:00
Guang Jiong Lou
45165503ba add label selector in Resource Modifiers (#6704)
* add label selector in resource modifier

Signed-off-by: lou <alex1988@outlook.com>

* add ut

Signed-off-by: lou <alex1988@outlook.com>

* update after review

Signed-off-by: lou <alex1988@outlook.com>

* update after review

Signed-off-by: lou <alex1988@outlook.com>

---------

Signed-off-by: lou <alex1988@outlook.com>
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-08-31 10:52:03 +05:30
qiuming
53530130a5 Fix velero uninstall bug (#6720)
Signed-off-by: Ming <mqiu@vmware.com>
2023-08-30 17:54:30 +08:00
danfengliu
ed256d74dd Merge pull request #6708 from danfengliu/cherry-pick-fix-nightly-issues
[cherry-pick to v1.12] monitor velero logs and fix E2E issues
2023-08-29 15:40:18 +08:00
Xun Jiang/Bruce Jiang
ab28a09a07 Merge branch 'release-1.12' into cherry-pick-fix-nightly-issues 2023-08-29 10:17:53 +08:00
qiuming
90f4cc5497 Merge pull request #6707 from qiuming-best/mqiu-release-1.12
make Velero uninstall backward compatible
2023-08-29 09:03:37 +08:00
qiuming
f505ed709b Merge branch 'release-1.12' into mqiu-release-1.12 2023-08-28 17:31:48 +08:00
Ming
28074e3f37 make velero uninstall backward compatible
Signed-off-by: Ming <mqiu@vmware.com>
2023-08-28 09:31:29 +00:00
danfengl
240f33c09d monitor velero logs and fix E2E issues
1. Capture Velero pod log and K8S cluster event;
2. Fix wrong path of storageclass yaml file issue caused by pert test;
3. Fix change storageclass test issue that no sc named 'default' in EKS cluster;
4. Support AWS credential as config format;
5. Support more E2E script input parameters like standy cluster plugins and provider.

Signed-off-by: danfengl <danfengl@vmware.com>
2023-08-28 06:04:09 +00:00
lyndon
fd08848471 fix issue 6391 (#6703)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-08-25 16:36:45 +08:00
qiuming
5f585be24b Merge pull request #6701 from qiuming-best/mqiu-release-1.12
[CherryPick v1.12] Fix delete dataupload datadownload CR failure
2023-08-25 11:45:33 +08:00
Ming
5480acf0a0 [CherryPick v1.12] Fix delete dataupload datadownload failure when Velero uninstall
Signed-off-by: Ming <mqiu@vmware.com>
2023-08-25 03:24:40 +00:00
Daniel Jiang
e2d3e84bab skip subresource in resource discovery (#6688)
Signed-off-by: lou <alex1988@outlook.com>
Co-authored-by: lou <alex1988@outlook.com>
2023-08-23 15:13:34 +08:00
Qi Xu
0c0ccf949b Ping golang/distroless image to latest version (#6679)
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-08-18 19:17:50 +08:00
lyndon
7d23ad9772 Merge pull request #6677 from danfengliu/add-default-plugin-for-1.12
Add default plugin setting for Velero v1.12 in E2E test
2023-08-18 17:34:46 +08:00
Xun Jiang/Bruce Jiang
ecfc907f33 Merge pull request #6673 from allenxu404/v1.12-doc
Add v1.12 docs
2023-08-18 17:31:47 +08:00
danfengl
3a00945b44 Add default plugin setting for Velero v1.12 in E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2023-08-18 09:05:46 +00:00
lyndon
db8aa22b1b Merge pull request #6675 from allenxu404/v1.12-changelog
Add v1.12 changelog
2023-08-18 16:47:50 +08:00
allenxu404
9e2acc987d Add v1.12 changelog
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-08-18 16:05:50 +08:00
allenxu404
872b3a17f6 Add v1.12 docs
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-08-18 13:41:28 +08:00
Daniel Jiang
e1a49f75f6 Merge pull request #6672 from allenxu404/readme
Update readme and move implemented designs
2023-08-18 13:16:09 +08:00
allenxu404
5224be9dfb Update readme and move implemented designs
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-08-18 12:02:41 +08:00
danfengliu
c5ccd8199b Merge pull request #6644 from danfengliu/replace-pod-with-deploy
Replace pod with deployment in E2E test
2023-08-18 11:04:47 +08:00
danfengl
172166749e Replace pod with deployment in E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2023-08-18 01:57:43 +00:00
Shawn Hurley
0e7c41780e Adding design updates to handle block device with kopia (#6590)
Signed-off-by: Shawn Hurley <shawn@hurley.page>
2023-08-17 13:36:35 -04:00
Daniel Jiang
5e13f8172b Merge pull request #6667 from Lyndon-Li/issue-fix-6662
Fix issue 6662
2023-08-17 16:57:46 +08:00
Lyndon-Li
dac28084a3 issue fix 6662
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-08-17 11:35:18 +08:00
Daniel Jiang
30e54b026f Remove the incorrect group of pvc from modifer doc (#6661)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-08-16 15:45:00 +08:00
Xun Jiang/Bruce Jiang
dd07a08a02 Merge pull request #6659 from qiuming-best/resourcemodifiers
Fix resource modifiers e2e case
2023-08-16 15:13:32 +08:00
Ming
3f05a7dc1d Fix resource modifiers case
Signed-off-by: Ming <mqiu@vmware.com>
2023-08-16 03:34:59 +00:00
Anshul Ahuja
e753a08f85 E2E test for Resource Modifier & Bug fixes (#6483)
* Add resource modifier e2e test and bug fixes

Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-08-16 11:09:59 +08:00
Daniel Jiang
0b30adb35a Merge pull request #6608 from shawn-hurley/feature/add-provider-interface-blockmod
Feature/add provider interface for block mode
2023-08-16 11:09:36 +08:00
qiuming
e3b6063655 Merge pull request #6569 from qiuming-best/perf-test
Add performance E2E test
2023-08-16 10:13:34 +08:00
Shawn Hurley
563a16c10f adding block mode to uploader/provider interfaces
Signed-off-by: Shawn Hurley <shawn@hurley.page>
2023-08-15 15:33:23 -04:00
Ming
f890033ee8 Merge branch 'main' of https://github.com/qiuming-best/velero into perf-test 2023-08-15 07:57:01 +00:00
qiuming
411bd54920 Merge pull request #6616 from qiuming-best/add-accept-label
Fix data mover controller bugs
2023-08-15 12:04:31 +08:00
Ming Qiu
3b45830012 Add performance E2E test
Signed-off-by: Ming Qiu <mqiu@vmware.com>
2023-08-15 01:46:36 +00:00
Ming Qiu
5485616abf Fix data mover bugs #6550 #6563 #6600
Signed-off-by: Ming Qiu <mqiu@vmware.com>
2023-08-14 08:37:19 +00:00
Daniel Jiang
713792d63e Merge pull request #6634 from 27149chen/allow-update-gv
Get resource client again after restore actions in case resource's gv is changed
2023-08-14 14:15:05 +08:00
lou
797267c89a add changelog
Signed-off-by: lou <alex1988@outlook.com>
2023-08-11 10:11:24 +08: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
danfengliu
a88cb465a4 Merge pull request #6632 from danfengliu/make-cls-worker-node-count-configurable
[E2E Test] The minimum worker node count of workload cluster should be 2
2023-08-10 16:30:32 +08:00
qiuming
7311fb4df9 Merge pull request #6627 from Lyndon-Li/continue-wait-on-csi-snapshot-error
Continue wait on csi snapshot error
2023-08-10 12:27:34 +08:00
qiuming
543d8d52c8 Merge pull request #6625 from allenxu404/upgrade-doc
Add upgrade doc to v1.12
2023-08-10 11:37:40 +08:00
Lyndon-Li
b90c5bba3d continue wait on csi snapshot error
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-08-10 11:34:26 +08:00
Daniel Jiang
206c4f214e Merge pull request #6598 from luisdavim/fix_aws_creds
fix: load AWS config and assume role
2023-08-10 10:55:04 +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
allenxu404
a26f0b972f add upgrade doc for 1.12
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-08-09 20:41:00 +08:00
Luis Davim
28c5dc9fda fix: load AWS config and assume role
Signed-off-by: Luis Davim <dluis@vmware.com>
2023-08-09 13:26:30 +01:00
qiuming
685db899d6 Merge pull request #6626 from allenxu404/modify-output
Modify output for command of `restore delete`
2023-08-09 17:32:39 +08:00
allenxu404
7a8a68d9e9 modify output for command of restore delete
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-08-09 15:58:31 +08:00
Wenkai Yin(尹文开)
e9c170cb15 Upgrade to v3 for the codecov action (#6622)
Upgrade to v3 for the codecov action

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-08-09 14:08:01 +08:00
Qi Xu
5f463c59ec add "Deleting" phase for restore display (#6604)
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-08-08 17:16:53 -04:00
lyndon
81057b9983 Merge pull request #6621 from Lyndon-Li/data-mover-fail-earlier-for-snapshot-creation-error
Data mover fail earlier for snapshot creation error
2023-08-08 14:29:41 +08:00
Xun Jiang/Bruce Jiang
b7a05b384e Merge pull request #6619 from Lyndon-Li/issue-fix-6614
Fix issue 6614
2023-08-08 13:51:56 +08:00
Lyndon-Li
22c88ba330 data mover fail earlier for snapshot creation error
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-08-08 12:05:56 +08:00
Lyndon-Li
b51d1a0202 fix issue 6614
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-08-08 09:46:35 +08:00
qiuming
f78dd073bf Merge pull request #6558 from kaovilai/s3profilefix
GetS3Credentials pass profile from config to NewSharedCredentials
2023-08-07 16:38:25 +08:00
lyndon
ab162fa67d Merge pull request #6584 from anshulahuja98/patch-6
Fix indent in resource modifier docs
2023-08-07 14:16:25 +08:00
danfengl
c637057dab The minimum worker node count of wowrkload cluster should be 2
Signed-off-by: danfengl <danfengl@vmware.com>
2023-08-06 08:35:38 +00:00
Xun Jiang/Bruce Jiang
1777bbe5b4 Add warning log for snapshot data mover fell backup to Velero native snapshot. (#6602)
Enlarge throttle of UT case TestThrottle_ShouldOutput to avoid occasional CI
failure due to timeout caused by test environment's CPU speed

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-08-04 18:09:21 +08:00
Xun Jiang/Bruce Jiang
d027a1641d Merge pull request #6591 from allenxu404/finalizer-enhance
Enhance uninstall and backup deletion for restore finalizer
2023-08-03 17:23:07 +08:00
allenxu404
846f0de178 enhance uninstall and backup deletion for restore finalizer
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-08-03 16:43:33 +08:00
lyndon
06628cfecc Merge pull request #6594 from Lyndon-Li/issue-fix-6571
Fix issue 6571
2023-08-03 15:09:47 +08:00
lyndon
bb74c352fb Merge pull request #6578 from Lyndon-Li/issue-fix-6560
Fix issue 6560
2023-08-03 14:55:09 +08:00
Lyndon-Li
69bc84cf0c fix issue 6571
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-08-03 14:46:02 +08:00
lyndon
bb96c2155c fix issue 6575 (#6587)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-08-02 10:27:05 -04:00
Anshul Ahuja
0da9134f15 Update restore-resource-modifiers.md
Fix indent in resource modifier docs

Signed-off-by: Anshul Ahuja <anshul.ahu@gmail.com>

Fix
2023-08-02 14:17:49 +05:30
Xun Jiang/Bruce Jiang
7135f16e31 Merge pull request #6564 from Lyndon-Li/issue-fix-6561-02
Fix issue 6561
2023-08-02 10:05:45 +08:00
Lyndon-Li
7cf3559fab fix issue 6560
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-08-01 21:37:51 +08:00
Lyndon-Li
d6134ec444 fix issue 6561
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-08-01 21:10:01 +08:00
Xun Jiang/Bruce Jiang
18586bc6af Merge pull request #6501 from anshulahuja98/resourcemodifierdocs
Add Resource modifiers docs / site
2023-08-01 10:58:22 +08:00
Xun Jiang/Bruce Jiang
9ba0bcc2a2 Merge pull request #6295 from kaovilai/speedup-fmt
Speedup update-1fmt.sh by removing xargs, printf.
2023-08-01 10:48:45 +08:00
Yang Gang
16613f5fe1 Fix the velero crd define locations. (#6554)
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-07-31 15:58:07 +08:00
Daniel Jiang
3e631ca466 Merge pull request #6555 from yanggangtony/clean-server
Delete redundance checkNodeAgent code
2023-07-31 14:42:21 +08:00
Daniel Jiang
462022ce72 Merge pull request #6541 from yanggangtony/fix-typos
Fix some typos for DataMovers type.
2023-07-31 14:39:31 +08:00
Tiger Kaovilai
289aae1581 GetS3Credentials pass profile from config to NewSharedCredentials
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-07-28 11:26:40 -04:00
yanggang
2f20fac78b Delete redundance checkNodeAgent code
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-07-28 16:16:26 +08:00
Anshul Ahuja
94d3494d25 Add docs for resourcemodifiers
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-27 15:28:54 +05:30
lyndon
a6d79fc272 Merge pull request #6481 from blackpiglet/6444_fix
Remove PVC's selector in backup's PVC action.
2023-07-27 15:43:27 +08:00
Xun Jiang/Bruce Jiang
f666667e5b Merge pull request #6547 from reasonerjt/del-moved-snapshot
Delete moved snapshots when the backup is deleted
2023-07-27 15:10:33 +08:00
Daniel Jiang
b0a343cd48 Delete moved snapshots when the backup is deleted
This commit introduces a deleteItemAction which writes a temporary configmap to
record the snapshot info so that the controller can trigger repo manager
to remove the snapshot

This process is a bit chatty and we should consider to refactor the code
so it's easier to connect to the repo directly in the DIA

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-07-27 13:27:33 +08:00
Xun Jiang
33b21a380c Remove PVC's selector in backup's PVC action.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-07-27 10:09:00 +08:00
Xun Jiang/Bruce Jiang
6997e4a694 Merge pull request #6476 from reasonerjt/del-inprog-dbr
Delete the expired deletebackuprequests that are stuck in "InProgress"
2023-07-26 16:13:58 +08:00
Xun Jiang/Bruce Jiang
81c916fb12 Merge pull request #6544 from allenxu404/enhance-uninstall
Check if restore crd exist before operating restore
2023-07-26 11:24:26 +08:00
yanggang
ceccd5a92c Fix some typos for DataMovers type.
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-07-25 23:11:49 +08:00
allenxu404
6dbdc54dc7 check if restore crd exist before operating restore
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-07-25 18:54:42 +08:00
lyndon
9c8275eda7 Merge pull request #6533 from Lyndon-Li/data-mover-wrong-bsl-after-sync
Data mover wrong bsl after sync
2023-07-25 14:20:10 +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
Daniel Jiang
4379b9a025 Merge pull request #6532 from yanggangtony/fix-wrong-log-controller
Fix wrong log for server controller logs.
2023-07-24 14:32:48 +08:00
Shubham Pampattiwar
eb35f127e2 Merge pull request #6524 from yanggangtony/fix-log-scheduler 2023-07-23 18:44:47 -07:00
Xun Jiang/Bruce Jiang
605eab1eb8 Merge pull request #6531 from yanggangtony/delete-io-util
delete io/ioutil package as it is deprecated
2023-07-24 09:42:55 +08:00
Mateus Oliveira
913b610196 fix: Typos and add more spell checking rules to CI (#6415)
* fix: Typos and add more spell checking rules to CI

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: Typos and add more spell checking rules to CI

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: Typos and add more spell checking rules to CI

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: Typos and add more spell checking rules to CI

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: Typos and add more spell checking rules to CI

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: Typos and add more spell checking rules to CI

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: Typos and add more spell checking rules to CI

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: Typos and add more spell checking rules to CI

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

---------

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
2023-07-21 17:25:24 -04:00
Efim Smykov
8396163e77 add missing CompletionTimestamp and metrics when restore moved into terminal phase (#6397)
Signed-off-by: Nutrymaco <efim7299@icloud.com>
2023-07-21 17:22:01 -04:00
Shubham Pampattiwar
178b073ffb Merge pull request #6530 from ywk253100/230721_changelog
Update the CHANGELOG.md
2023-07-21 14:09:00 -07:00
Xun Jiang/Bruce Jiang
7c80939d89 Merge pull request #6474 from blackpiglet/6422_doc
Add immutability supporting limitation in documents.
2023-07-21 18:13:02 +08:00
yanggang
970938c89a Fix wrong log for server controller logs.
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-07-21 16:35:26 +08:00
yanggang
bcc69f33f9 delete io/ioutil package as it is deprecated
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-07-21 15:18:31 +08:00
Wenkai Yin(尹文开)
2562e7d336 Update the CHANGELOG.md
Update the CHANGELOG.md

fixes #6401

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-07-21 09:25:27 +08:00
qiuming
32262babc4 Merge pull request #6479 from allenxu404/i2697
add restore finalizer to clean up external resources
2023-07-20 19:07:02 +08:00
danfengliu
4320cd07a2 Merge pull request #6509 from danfengliu/adapt-k8s-1.27-api
Support AP IVersion V1  for CR volumesnapshotclass in E2E test and FIx plugin parameter issue
2023-07-20 19:01:06 +08:00
danfengl
35697a9509 Support API Version V1 for CR volumesnapshotclass in E2E test
1. In K8S v1.27 API Version v1beta1 for CR volumesnapshotclass is deprcated, so E2E test should adapt both API versions to cover all K8S versio;
2. Support getting additional plugin from input;
3. Velero version and plugin map should not deprated version older than v1.10, because upgrade test will use them.

Signed-off-by: danfengl <danfengl@vmware.com>
2023-07-20 08:57:15 +00:00
Daniel Jiang
2548b20db9 Track the skipped PV in a backup and print the summary in backup log (#6496)
Partially address the requirements in #5834

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-07-20 16:13:48 +08:00
yanggang
c5af315d19 fix scheduleReconciler log info
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-07-20 13:46:08 +08:00
lyndon
b4181ef803 restict namespace to node-agent cache (#6523)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-07-19 16:23:28 -04:00
Shubham Pampattiwar
d2b5e902c5 Merge pull request #6430 from anshulahuja98/patch-4
Update tilt ubuntu image to avoid glibc error
2023-07-19 10:01:29 -07:00
allenxu404
0bb509ccdd add restore finalizer to clean up external resources
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-07-19 18:56:35 +08:00
Daniel Jiang
f234dd6f08 Merge pull request #6452 from anshulahuja98/resourcemodifier
Add support for ResourceModifier (AKA Json Substitutions) in restore flow
2023-07-19 16:11:54 +08:00
Anshul Ahuja
c8f970a4f1 Merge branch 'main' into resourcemodifier
Signed-off-by: Anshul Ahuja <anshul.ahu@gmail.com>
2023-07-19 11:11:40 +05:30
Xun Jiang
ccece7c855 Add RetentionPolicy supporting limitation in documents.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-07-19 09:36:45 +08:00
Xun Jiang/Bruce Jiang
c4286d7b34 Merge pull request #6511 from blackpiglet/improve_ut_coverage
Improve pkg/cmd/cli package UT coverage.
2023-07-18 15:42:08 +08:00
Xun Jiang
4a222b76c6 Improve backup log command UT coverage.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-07-18 14:41:55 +08:00
Xun Jiang/Bruce Jiang
e51a9d4e1e Integrate pushing to docker hub and gcr.io in one docker build and push command. (#6199)
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>
2023-07-18 08:05:57 +08:00
Xun Jiang/Bruce Jiang
55987c3093 Merge pull request #6497 from blackpiglet/6190_fix_part_2
Remove dependency of the legacy client code from pkg/cmd directory part 2
2023-07-17 17:58:34 +08:00
Xun Jiang
9e515ac397 Remove dependency of the legacy client code from pkg/cmd directory part 2.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-07-17 17:04:53 +08:00
lyndon
b5bd55fc56 fix issue 6490 (#6491)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-07-14 14:05:51 -04:00
lyndon
ddc50affa9 Merge pull request #6492 from Lyndon-Li/data-mover-restore-abort-for-existing-pvc
Data mover restore abort for existing PVC
2023-07-14 17:19:53 +08:00
lyndon
dfd7970219 Merge pull request #6469 from blackpiglet/6190_fix
Remove dependency of the legacy client code from pkg/cmd directory part 1
2023-07-14 17:15:56 +08:00
Xun Jiang
89d3ad4864 Remove dependency of the legacy client code from pkg/cmd directory.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-07-14 15:55:09 +08:00
qiuming
82e1ebbe0c Merge pull request #6493 from allenxu404/i6130
Add data upload/download metrics
2023-07-14 11:25:11 +08:00
allenxu404
084fd66586 add data upload/download metrics
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-07-14 10:47:53 +08:00
Lyndon-Li
eebb879278 data mover restore abort for existing pvc
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-07-14 10:07:33 +08:00
Anshul Ahuja
967152c406 Proposal to add support for Resource Modifier (AKA JSON Substitutions) in Restore workflow (#5880)
* Design proposal

Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>

* spell

Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>

* add kubectl reference

Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>

* patch order

Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>

---------

Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
Co-authored-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-13 17:03:12 -04:00
Anshul Ahuja
9fe7a1d136 lint
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-13 13:59:37 +05:30
Anshul Ahuja
c0ca69dc87 Improve test coverage
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-13 13:52:49 +05:30
Anshul Ahuja
f156a2cd52 add from field and enhance coverage
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-13 12:01:41 +05:30
Anshul Ahuja
7396e64409 Add separate handling for test operator with test
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-13 10:26:28 +05:30
Anshul Ahuja
16ec2db1f7 regex matchstring error parsing
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-13 10:10:37 +05:30
Anshul Ahuja
4a28b3b16f start end operator in test
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-13 09:44:03 +05:30
lyndon
17d782f2bb Merge pull request #6484 from kaovilai/unkopia-for-plugins
Move kopia logging from util/logging to remove indirect dependency in velero plugins
2023-07-13 10:42:33 +08:00
Shubham Pampattiwar
017d6ceb72 Merge pull request #6398 from draghuram/snapshot-docs
Clarify that snapshot data is not uploaded to the object storage.
2023-07-12 11:14:14 -07:00
Tiger Kaovilai
05722876b9 Moving kopia logging to remove kopia from indirect dependency in velero plugins
when running `go mod why -m github.com/kopia/kopia` in velero-plugins prior to this change you will see following

```
❯ go mod why -m github.com/kopia/kopia
github.com/konveyor/openshift-velero-plugin/velero-plugins
github.com/vmware-tanzu/velero/pkg/plugin/framework
github.com/vmware-tanzu/velero/pkg/util/logging
github.com/kopia/kopia/repo/logging
```

after
```
❯ go mod why -m github.com/kopia/kopia
(main module does not need module github.com/kopia/kopia)
```

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-07-12 10:44:33 -04:00
Anshul Ahuja
ce7d2bfc87 add more logs
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-11 11:16:44 +05:30
Anshul Ahuja
f5b6cf5b93 minor fixes
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-11 10:00:08 +05:30
lyndon
49e80580b7 Merge pull request #6461 from qiuming-best/mark-crs-failed
Mark dataupload/datadownload in cancel when velero pod restart
2023-07-11 11:16:46 +08:00
Ming
e0bfd676cc Merge branch 'main' of https://github.com/qiuming-best/velero into mark-crs-failed 2023-07-11 02:42:46 +00:00
lyndon
0945879a8a Merge pull request #6472 from Lyndon-Li/add-wait-timeout-for-expose-prepare
Add timeout for backup/restore expose
2023-07-11 09:56:49 +08:00
danfengliu
a07bbb551b Merge pull request #6447 from danfengliu/add-plugin-for-datamover-e2e-test
Support datamover test in E2E script
2023-07-10 18:16:37 +08:00
Anshul Ahuja
700a34901a fix test
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-10 15:02:45 +05:30
Lyndon-Li
9f5162ece3 add wait timeout for expose prepare
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-07-10 17:32:10 +08:00
Anshul Ahuja
4931a780f7 make optional CLI field and add test cases.
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-10 14:45:53 +05:30
Ming Qiu
480fe445b1 Mark dataupload datadownload status failed when velero pod restart
Signed-off-by: Ming Qiu <mqiu@vmware.com>
2023-07-10 07:14:24 +00:00
Daniel Jiang
f6294cc2a3 Merge pull request #6473 from draghuram/fsr
Clarify FSB restore pod status.
2023-07-10 14:25:16 +08:00
Anshul Ahuja
8db88bd392 Merge branch 'main' into resourcemodifier 2023-07-10 11:33:49 +05:30
Daniel Jiang
c500e8dc34 Delete the expired deletebackuprequests that are stuck in "InProgress"
state

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-07-10 10:15:19 +08:00
danfengl
bc8742566b Install plugin for datamover pipeline
Signed-off-by: danfengl <danfengl@vmware.com>
2023-07-10 02:02:50 +00:00
Raghuram Devarakonda
cc468873db Clarify FSB restore pod status.
Signed-off-by: Raghuram Devarakonda <draghuram@gmail.com>
2023-07-07 10:34:06 -04:00
lyndon
7deae4cbf5 Merge pull request #6459 from blackpiglet/6001_fix
Add exit code log and possible memory shortage warning log for Restic command failure
2023-07-07 09:24:16 +08:00
Anshul Ahuja
d89a8e0bdd debug e2e 2
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-06 15:09:26 +05:30
Anshul Ahuja
a1ec3b553c debug e2e tests
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-06 14:54:36 +05:30
Daniel Jiang
2ea24f65d9 Merge pull request #6467 from Lyndon-Li/add-node-name-data-mover-cr
Add node name to data mover CR
2023-07-06 15:50:57 +08:00
lyndon
f1e7931a25 Merge pull request #6464 from kayrus/openstack-cis-zone-labels
Add support for OpenStack CSI drivers topology keys
2023-07-06 15:16:58 +08:00
Shubham Pampattiwar
8cba0a05e5 Merge pull request #6465 from kaovilai/fsb-typo
typo: s/inokes/invokes
2023-07-05 23:57:57 -07:00
Lyndon-Li
8a7aa2051c add node name data mover CR
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-07-06 14:06:28 +08:00
Anshul Ahuja
4e6d31dc38 linting
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-06 11:29:33 +05:30
Anshul Ahuja
4b3f6d41cb remove comments
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-06 10:49:35 +05:30
Anshul Ahuja
3923d382fd Fix CI
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-06 10:44:33 +05:30
Anshul Ahuja
a00cf9ad2c refactor
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-06 10:31:05 +05:30
Anshul Ahuja
6307a43004 Add test case
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-06 10:14:49 +05:30
qiuming
daf20b8796 Merge pull request #6448 from zhangzhiqiangcs/fix-doc-typo
fix doc typo
2023-07-06 11:39:17 +08:00
Tiger Kaovilai
ff83d5e0c9 typo: s/inokes/invokes
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-07-05 12:37:16 -04:00
kayrus
e71ee0cc5f Add support for OpenStack CSI drivers topology keys
Signed-off-by: kayrus <kayrus@users.noreply.github.com>
2023-07-05 17:27:24 +02:00
Xun Jiang
d7f1ea4fbd Add exit code log and possible memory shortage warning log for Restic command failure.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-07-05 21:35:52 +08:00
Anshul Ahuja
ed4437ad22 initial draft
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-05 13:51:32 +05:30
Xun Jiang/Bruce Jiang
e54a8af0ad Merge pull request #6433 from blackpiglet/6010_fix
Modify DownloadRequest controller logic
2023-07-05 10:48:13 +08:00
qiuming
85c3599ac4 Merge pull request #6458 from qiuming-best/data-download-controller-ut
Add data download controller UT
2023-07-04 17:07:04 +08:00
lyndon
c55bd26e13 Merge pull request #6456 from blackpiglet/limit_label_length
Limit label "velero.io/pvc-namespace-name" length to 63.
2023-07-04 16:48:19 +08:00
Ming Qiu
2f667f5191 Add data download controller UT
Signed-off-by: Ming Qiu <mqiu@vmware.com>
2023-07-04 08:47:49 +00:00
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
Xun Jiang/Bruce Jiang
5171ab0dca Merge pull request #6434 from allenxu404/i6038
Fix hook filter display issue for backup describer
2023-07-03 17:54:40 +08:00
Xun Jiang
40b2ee1323 Modify DownloadRequest controller logic
1. Avoid patch DownloadRequest when it's deleted.
2. Add periodic enqueue resource for reconcile.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-07-03 17:11:48 +08:00
Daniel Jiang
ae27889ad9 Merge pull request #6442 from ywk253100/230630_ut_persistence
Add more unit test cases for pkg/persistence
2023-07-03 16:56:54 +08:00
Anshul Ahuja
bb20d0d2f2 add changelog
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-03 14:02:58 +05:30
Anshul Ahuja
5424b07bb3 restore flow changes
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-07-03 13:48:24 +05:30
Anshul Ahuja
cc76bc0c11 Update tilt ubuntu image to 22.04 to fix glibc issue
Signed-off-by: Anshul Ahuja <anshul.ahu@gmail.com>
2023-07-03 08:03:37 +00:00
Xun Jiang/Bruce Jiang
3bdca9fe63 Merge pull request #5774 from anshulahuja98/csimultivscprop
Design to add support for Multiple VolumeSnapshotClasses in CSI Plugin
2023-07-03 14:56:47 +08:00
lyndon
98803bbe65 Merge pull request #6446 from qiuming-best/data-path-concurrent
Fix data path concurrent
2023-07-03 09:58:13 +08:00
Zhiqiang Zhang
0416b93b07 fix doc typo
Signed-off-by: zhangzhiqiang02 <zhangzhiqiang02@megvii.com>
2023-07-01 21:53:47 +08:00
Mateus Oliveira
dcdd5f99d6 fix: Remove duplicated stale job (#6416)
* fix: Remove duplicated stale job

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: Remove duplicated stale job

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: Remove duplicated stale job

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

---------

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
2023-06-30 15:15:37 -04:00
Ming
22a99c34b9 Fix data path concurrent
Signed-off-by: Ming <mqiu@vmware.com>
2023-06-30 18:18:31 +00:00
lyndon
9652eb08e3 Merge pull request #6445 from Lyndon-Li/fix-concurrent-repo-ensure-problem
Fix concurrent repo ensure problem
2023-06-30 18:39:11 +08:00
Lyndon-Li
65cb25a74c fix concurrent repo ensure problem
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-30 14:48:51 +08:00
Xun Jiang/Bruce Jiang
84eca51d22 Merge pull request #6410 from blackpiglet/6117_fix
Retrieve DataUpload into result ConfigMap during volume snapshot restore.
2023-06-30 14:30:30 +08:00
Xun Jiang
e205e2122d Retrieve DataUpload into backup result ConfigMap during volume snapshot restore.
Fix issue #6117.
Add CSI plugin needs builder functions.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-06-30 11:18:36 +08:00
Xun Jiang/Bruce Jiang
4208208f6b Merge branch 'main' into 6117_fix
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
2023-06-30 11:15:21 +08:00
Xun Jiang
ec4bb42117 Retrieve DataUpload into backup result ConfigMap during volume snapshot restore.
Fix issue #6117.
Add CSI plugin needs builder functions.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-06-30 11:13:04 +08:00
lyndon
89ae6cc29b Merge pull request #6436 from qiuming-best/data-download-controller
Add data download controller
2023-06-30 10:12:53 +08:00
Wenkai Yin(尹文开)
f2f479fe3a Add more unit test cases for pkg/persistence
Add more unit test cases for pkg/persistence

Fixes #6340

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-06-30 09:48:21 +08:00
Peter Pan
a97d01f7e6 Fix the snapshot log wording to be more accurate (#6395)
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
2023-06-30 08:14:10 +08:00
Ming
1bfcee776c Add data download controller
Signed-off-by: Ming <mqiu@vmware.com>
2023-06-29 13:28:19 +00:00
allenxu404
75833eaa5b fix hook filter display issue for backup describer
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-06-29 16:37:34 +08:00
lyndon
bbef180a0f Merge pull request #6432 from Lyndon-Li/add-ut-for-repository
Add UT for pkg/repository
2023-06-29 16:07:11 +08:00
Lyndon-Li
38d5003c6b add ut for pkg/repository
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-29 07:40:59 +00:00
Anshul Ahuja
9ea54c81fe CRD and CLI changes
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-06-28 12:15:55 +05:30
qiuming
de83980a05 Merge pull request #6427 from Lyndon-Li/fix-main-CI-out-of-space-problem
Fix main CI out of space problem
2023-06-27 12:05:32 +08:00
Daniel Jiang
ef1908f8ff Merge pull request #6424 from reasonerjt/ut-cmd-output
Add more unit test cases for cmd/util/output
2023-06-27 11:20:52 +08:00
Xun Jiang/Bruce Jiang
c02a3b6fd0 Merge pull request #6411 from panpan0000/fix_kep_snapshot
fix 404 link in KEP
2023-06-27 10:20:57 +08:00
Xun Jiang/Bruce Jiang
5726324a92 Merge pull request #6409 from mateusoliveira43/fix/doc-lastest-release-link
Fix: Lastest release link in website
2023-06-27 10:05:19 +08:00
Lyndon-Li
b8c234a0a7 fix main CI out of space problem
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-27 09:01:35 +08:00
Daniel Jiang
4cea533865 Add more unit test cases for cmd/util/output
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-06-27 00:37:31 +08:00
lyndon
ee22125f9c Merge pull request #6423 from Lyndon-Li/data-mover-smoking-test-2
data mover smoke testing 02
2023-06-26 14:47:41 +08:00
Lyndon-Li
b1316dae23 data mover smoking test 02
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-26 04:47:40 +00:00
Xun Jiang/Bruce Jiang
9417f250f6 Merge pull request #6414 from allenxu404/gc-doc-update
Clarify the deletion frequency for gc controller
2023-06-26 11:44:22 +08:00
Daniel Jiang
cd68dd369b Add Unit test cases for pkg/cmd/util/output (#6359)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-06-26 08:16:36 +08:00
Raghuram Devarakonda
433daa18bd Clarify "update" policy in restore. (#6399)
Signed-off-by: Raghuram Devarakonda <draghuram@gmail.com>
2023-06-22 16:33:24 -04:00
allenxu404
c1ca9a0245 clarify the deletion frequency for gc controller
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-06-21 19:14:29 +08:00
danfengliu
ef443fece0 Add UT for pkg/cmd/cli/backup (#6400)
Signed-off-by: danfengl <danfengl@vmware.com>
2023-06-21 11:10:13 +08:00
Peter Pan
05da96384a fix 404 link
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
2023-06-20 20:56:52 -04:00
Wenkai Yin(尹文开)
6f3adcf728 Restore Endpoints before Services (#6315)
Restore Endpoints before Services

Fixes #6280

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-06-20 14:35:25 +08:00
Mateus Oliveira
ee27cde391 fixup! fix: Lastest release link in website
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
2023-06-19 10:54:18 -03:00
Mateus Oliveira
9c0562cb94 fix: Lastest release link in website
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
2023-06-19 10:49:25 -03:00
Xun Jiang/Bruce Jiang
d3785e529f Merge pull request #6396 from allenxu404/archive-ut
Add unit test for pkg/archive
2023-06-16 17:52:10 +08:00
Raghuram Devarakonda
545aaada8e Clarify that snapshot data is not uploaded to the object storage.
Signed-off-by: Raghuram Devarakonda <draghuram@gmail.com>
2023-06-15 13:14:58 -04:00
allenxu404
41ab949659 add unit test for pkg/archive
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-06-15 18:58:30 +08:00
lyndon
e3e0ce32ed Merge pull request #6368 from Lyndon-Li/issue-fix-6341
Add UT for pkg/util
2023-06-15 14:05:53 +08:00
Lyndon-Li
75b7599178 add UT for pkg/util 02
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-15 12:17:05 +08:00
qiuming
cace72787e Merge pull request #6394 from qiuming-best/UT-pkg/discovry
Add UT for pkg/discovery
2023-06-15 11:17:19 +08:00
Ming
e2bb5b3fe8 Add UT for pkg/discovery
Signed-off-by: Ming <mqiu@vmware.com>
2023-06-15 02:45:34 +00:00
Lyndon-Li
b00633976b Merge branch 'main' into issue-fix-6341 2023-06-15 10:11:47 +08:00
lyndon
6bbdc846ff Merge pull request #6357 from Lyndon-Li/data-mover-restore-expose-03
Data mover restore expose
2023-06-15 09:48:17 +08:00
Shubham Pampattiwar
57bcd8c8dc Merge pull request #6298 from shubham-pampattiwar/add-default-values
Add default values for defaultItemOperationTimeout and itemOperationSyncFrequency in velero CLI
2023-06-13 23:14:14 -07:00
qiuming
78025a09b6 Add UT for uploader (#6374)
Signed-off-by: Ming <mqiu@vmware.com>
2023-06-13 16:58:47 +08:00
lyndon
8cd55d1826 Merge pull request #6383 from Lyndon-Li/data-mover-backup-smoke-testing
Data mover backup smoke testing
2023-06-13 11:13:14 +08:00
Shubham Pampattiwar
c86018a0f8 Merge pull request #6377 from blackpiglet/add_warning_in_volume_snapshotter_for_data_mover
Add warning message for volume snapshotter in data mover case.
2023-06-12 06:12:45 -07:00
Xun Jiang
a5c28ad423 Add warning message for volume snapshotter in data mover case.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-06-12 17:57:01 +08:00
Lyndon-Li
f781e255c6 data mover smoke testing
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-12 15:30:06 +08:00
lyndon
7fe4dfe17a Merge pull request #6367 from Harshad112/patch-1
Improve README.md
2023-06-12 14:32:58 +08:00
Efim Smykov
aed8c8ec1b Fix typos related to Delete Item Action plugin type (#6333)
Signed-off-by: Nutrymaco <efim7299@icloud.com>
2023-06-09 15:44:03 +08:00
Nir Soffer
d90ca5928c examples: Label the deployment to get it backed up (#6348)
Following the examples instructions[1], the nginx-deployment is not
backed up or restored. Add a label to the deployment so it will be
backed up and restored.

Similar change is needed for `examples/nginx-app/with-pv.yaml` but I did
not try that example.

[1] https://velero.io/docs/v1.11/contributions/minio/

Fixes #6347

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2023-06-09 15:42:04 +08:00
Wenkai Yin(尹文开)
89c10ddcc0 Update metrics when backup failed with validation error (#6318)
Update metrics when backup failed with validation error

Fixes #6265

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-06-09 11:19:26 +08:00
danfengliu
114193ae3b add ut for pkg client factory (#6371)
Signed-off-by: danfengl <danfengl@vmware.com>
2023-06-09 09:59:19 +08:00
lyndon
5a4f2abd4f Merge pull request #6330 from wawa0210/enhance-change-image-log
[triviy] Enhanced log output when image replace action
2023-06-09 09:58:49 +08:00
Xun Jiang/Bruce Jiang
9743a7ce56 Fix #6118: Do not persist VolumeSnapshot and VolumeSnapshotContent for snapshot DataMover case. (#6366)
1. Because VolumeSnapshot and VolumeSnapshotContent CRs are not kept after backup completed,
   don't persist them in the backup metadata.
2. Add some builder methods needed by CSI plugin.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-06-08 17:05:17 +08:00
danfengliu
d7181fba55 Merge pull request #6323 from blackpiglet/psa_violation_fix_release_main
[main]Make the E2E testing pods obey the restricted pod security standard.
2023-06-08 15:16:11 +08:00
danfengliu
d2852a2bc2 Merge pull request #6370 from Lyndon-Li/issue-fix-6144
Change kopia as the default path of PVB
2023-06-08 14:34:40 +08:00
Lyndon-Li
217b1dd066 add UT for pkg/util
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-08 14:00:58 +08:00
Lyndon-Li
7175283b19 change kopia as the default path of PVB
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-08 13:57:24 +08:00
lyndon
b2f2ba0d0a Merge pull request #6365 from ywk253100/230607_cli
Add data mover related options in CLI
2023-06-08 09:28:34 +08:00
Harshad Yelpale
151b9aab26 Improve README.md
just added words to the new line so we get suboptions as fast 

Signed-off-by: Harshad Yelpale <94516714+Harshad112@users.noreply.github.com>
2023-06-08 00:02:12 +05:30
danfengliu
99513583df Add ut for pkg/client/config (#6364)
Signed-off-by: danfengl <danfengl@vmware.com>
2023-06-07 17:36:45 +08:00
Wenkai Yin(尹文开)
9f2f563568 Add data mover related options in CLI
Add data mover related options in CLI

Fixes #6128

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-06-07 16:34:40 +08:00
Xun Jiang/Bruce Jiang
4227a824cd Merge pull request #6327 from blackpiglet/6099_fix
Remove Wait VolumeSnapshot to ReadyToUse logic.
2023-06-07 14:56:26 +08:00
Xun Jiang/Bruce Jiang
ad8f69bcb1 Merge pull request #6337 from qiuming-best/data-upload-controller
Data upload controller
2023-06-07 11:32:23 +08:00
danfengliu
d1a935e3b1 Merge pull request #6363 from danfengliu/add-ut-for-pkg-client
add ut for pkg/client
2023-06-07 11:04:36 +08:00
danfengl
98ee5add04 add ut for pkg/client
Signed-off-by: danfengl <danfengl@vmware.com>
2023-06-07 02:36:32 +00:00
Lyndon-Li
2ea6ffb63f data mover restore expose
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-06 16:14:58 +08:00
Shubham Pampattiwar
2aaa85bc58 add default values for defaultItemOperationTimeout and itemOperationSyncFrequency in velero CLI
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

add changelog

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

update default value for itemOperationsSyncFrequency

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2023-06-06 00:25:08 -07:00
Ming
b3e99a7eb2 Add Dataupload controller
Signed-off-by: Ming <mqiu@vmware.com>
2023-06-06 05:46:38 +00:00
qiuming
a015caced9 Merge pull request #6351 from ywk253100/230602_ut_install
Improve the unit test coverage for pkg/install
2023-06-06 13:28:32 +08:00
lyndon
243dd05ced Merge pull request #6356 from Lyndon-Li/fix-main-CI-failure
Fix main CI failure
2023-06-06 10:36:49 +08:00
Lyndon-Li
8bfd6359f5 fix main CI failure
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-06 09:58:58 +08:00
Wenkai Yin(尹文开)
914ccdf4c6 Improve the unit test coverage of pkg/cmd/server package (#6342)
Improve the unit test coverage of pkg/cmd/server package

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-06-05 23:15:24 +08:00
lyndon
ebe064f693 Merge pull request #6336 from Lyndon-Li/issue-fix-6255
Fix issue 6255
2023-06-05 21:44:17 +08:00
Daniel Jiang
358f388030 Merge pull request #6331 from ywk253100/230531_ut_flag
Add unit test cases for pkg/cmd/util/flag package
2023-06-05 14:20:07 +08:00
lyndon
c8071986b3 Merge pull request #6332 from danfengliu/prepare-for-dm-test
Prepare E2E test of data movement feature and other fixes
2023-06-05 11:19:31 +08:00
Wenkai Yin(尹文开)
2d6f4e5462 Improve the unit test coverage for pkg/install
Improve the unit test coverage for pkg/install

Fixes #6339

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-06-05 10:57:43 +08:00
danfengl
028e784eb6 Prepare E2E test of data movement feature
1. Bumpup velero version to the latest 2 versions in upgrade script;
2. Bumpup velero verioin to the latest 1 vesion in migration script;
3. Bring B/R with restic test back in vSphere pipeline since vSphere plugin issue fix was included
in v1.5;
4. Disable nodeport test in AWS pipeline since AWS k8s version bumpup;
5. Prepare for data mover test, allow object store provider diffrent from cloud provider.

Signed-off-by: danfengl <danfengl@vmware.com>
2023-06-05 01:49:08 +00:00
Lyndon-Li
45d7cc9783 fix issue 6255
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-02 16:11:23 +08:00
Xun Jiang
7491ab1ec5 Remove Wait VolumeSnapshot to ReadyToUse logic.
Due to the logic moving to plugin, and the plugin cannot read the
Velero server's resourceTimeout setting, add the resourceTimeout
in the backup annotation to pass to plugin.
Remove VolumeSnapshotContent reset code from Velero server.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-06-02 14:43:43 +08:00
lyndon
8427a9fdb3 Merge pull request #6308 from Lyndon-Li/data-mover-backup-expose-02
Data mover backup expose
2023-06-02 12:07:37 +08:00
Lyndon-Li
25624d3030 data mover backup expose
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-02 11:51:36 +08:00
Xun Jiang/Bruce Jiang
80db04e08b Merge pull request #6320 from blackpiglet/6302-fix
Include namespace resource needed by namespaced-scope resource in backup
2023-06-02 09:46:59 +08:00
Xun Jiang
8766a4dbd4 Make namespace resource doesn't honor label selector filters anymore.
For some use cases, namespaced-scope resources are inluded into backup,
but the namespaces are not included due to filters setting.
To do this, removing label selector filter from namespace resource.
Namespace resource only honor namespace exclude/include filters.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2023-06-01 16:59:18 +08:00
lyndon
59965af775 Merge pull request #6296 from Lyndon-Li/issue-fix-6258
Fix issue 6258
2023-06-01 16:03:52 +08:00
danfengliu
f689dc13e9 Merge pull request #6287 from qiuming-best/e2e-velero-installation
E2E velero installation optimization
2023-06-01 15:42:11 +08:00
Ming
2f6899e5a7 Optimize Velero install
Signed-off-by: Ming <mqiu@vmware.com>
2023-06-01 07:09:38 +00:00
Lyndon-Li
7243efdb7c fix issue 6258
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-06-01 14:27:10 +08:00
Wenkai Yin(尹文开)
e92047c43e Add unit test cases for pkg/cmd/util/flag package
Add unit test cases for pkg/cmd/util/flag package

Fixes #6253

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-06-01 10:29:11 +08:00
wawa0210
95d8a93a9c Enhanced log output when mirroring is replaced
Signed-off-by: wawa0210 <zhangxiao@xiaozhangs-MacBook-Pro.local>
2023-06-01 09:02:26 +08:00
lyndon
d6f5e3832a Merge pull request #6326 from Lyndon-Li/issue-fix-6297
Enhance code for issue 6297
2023-05-31 17:05:22 +08:00
Lyndon-Li
97fbc52cfb fix-issue-6297
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-31 16:48:11 +08:00
qiuming
f37645c0ed Merge pull request #6314 from ywk253100/230529_ut_builder
Skip running unit test for pkg/builder package
2023-05-31 14:18:04 +08:00
Daniel Jiang
4322ae14e3 Skip updating status when CRDs are restored (#6325)
This commit skips updating the restore progress, in the first loop for
restoration when CRDs are handled, so that the misleading "totalItem"
will not appear in the CR.
Fixes #5990

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-05-31 11:45:57 +08:00
Xun Jiang
754f02c40d Make the E2E testing pods obey the restricted pod security standard.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-05-30 15:36:44 +08:00
danfengliu
9467d7c7fc Merge pull request #6307 from pheianox/main
Add PITS Global Data Recovery Services to the adopters list
2023-05-29 14:43:14 +08:00
Wenkai Yin(尹文开)
4d28a1a2a3 Skip running unit test for pkg/builder package
Skip running unit test for pkg/builder package

fixes #6251

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-05-29 09:26:12 +08:00
qiuming
f9057bdb96 Merge pull request #6311 from danfengliu/debug-restic
Fix nightly upgrade test issue and checkpoint issue in restic test
2023-05-26 10:43:14 +08:00
danfengl
3222df9ae6 Debug restic
Signed-off-by: danfengl <danfengl@vmware.com>
2023-05-25 10:31:17 +00:00
lyndon
3ad091dc38 Merge pull request #5968 from Lyndon-Li/velero-data-movement-design
Volume Snapshot Data Movement Design
2023-05-24 08:33:20 +08:00
pheianox
d87134ae99 Add PITS Global Data Recovery Services to the list of adopters
Signed-off-by: pheianox <77569421+pheianox@users.noreply.github.com>
2023-05-23 11:59:25 -04:00
pheianox
fc0d9d87ad Add files via upload
Signed-off-by: pheianox <77569421+pheianox@users.noreply.github.com>
2023-05-23 11:56:21 -04:00
lyndon
53623a75ff Merge pull request #6303 from Lyndon-Li/data-mover-generic-data-path-issue-fix
Fix PVR issue for generic data path
2023-05-23 18:09:07 +08:00
Lyndon-Li
6c16020a3e fix pvr issue for generic data path
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-23 15:20:13 +08:00
Shubham Pampattiwar
7fa91060bd Merge pull request #6276 from kkothule/backupstatusprogressupdate
Fix status.progress not getting updated for backup
2023-05-22 11:38:33 -04:00
Daniel Jiang
5cb721764f Merge pull request #6283 from Lyndon-Li/issue-fix-5875
Fix issue 5875
2023-05-22 13:46:00 +08:00
lyndon
25fb08b3c2 Merge pull request #6226 from Lyndon-Li/data-mover-generic-data-path
Add code change for async generic data path
2023-05-22 09:47:47 +08:00
danfengliu
c34880ebcc Merge pull request #6291 from blackpiglet/make_e2e_workload_obey_restricted_psa_1
Add file system group setting for deployment and pod used in E2E test.
2023-05-20 09:40:27 +08:00
Shubham Pampattiwar
40d6130c8f Merge pull request #6289 from ywk253100/230519_ut_label
Improve the UT coverage for pkg/label
2023-05-19 18:32:53 -04:00
Tiger Kaovilai
a845ea4d57 lint: pkg/backup/backup_pv_action.go:79: unnecessary trailing newline (whitespace)
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-05-19 15:10:04 -04:00
Tiger Kaovilai
785e1aa5d3 Speedup update-1fmt.sh by removing xargs, printf.
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-05-19 11:51:15 -04:00
Daniel Jiang
42c639fad7 Merge pull request #6270 from jonasrosland/update-foot2
Add required footer links and update .gitignore
2023-05-19 17:27:44 +08:00
Xun Jiang
98baaa9e2f Add file system group setting for deployment and pod used in E2E test.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-05-19 11:30:44 +08:00
Wenkai Yin(尹文开)
28b9e15912 Improve the UT coverage for pkg/label
Improve the UT coverage for pkg/label

Fixes #6259

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-05-19 10:33:38 +08:00
kkothule
6a569ca5b5 Fix status.progress not getting updated for backup
Signed-off-by: kkothule <kkothule@catalogicsoftware.com>
2023-05-18 15:31:07 +05:30
Lyndon-Li
660fbfab71 Merge branch 'main' into issue-fix-5875 2023-05-18 16:04:00 +08:00
Lyndon-Li
124e142583 fix issue 5875
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-18 15:48:08 +08:00
Daniel Jiang
b8910749d2 Merge pull request #6111 from eemcmullan/pvc-dataref
Remove dataSource from PVC on backup for prior CSI restore case
2023-05-18 14:31:43 +08:00
danfengliu
72142a9f0f Merge pull request #6278 from qiuming-best/e2e-context
Adjust E2E context
2023-05-18 09:50:09 +08:00
Xun Jiang/Bruce Jiang
7417e5b5f7 Make the E2E testing pods obey the restricted pod security standard. (#6279)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-05-17 10:25:38 -04:00
Ming
54d6cffb45 Adjust E2E context
Signed-off-by: Ming <mqiu@vmware.com>
2023-05-17 14:05:15 +00:00
qiuming
7ed286d886 Merge pull request #6274 from qiuming-best/e2e-time-optimize
Adjust Sleep time in E2E
2023-05-17 15:59:03 +08:00
Lyndon-Li
9ab85892a7 add shared generic data path 02
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-17 15:04:04 +08:00
Lyndon-Li
5f008d18fa Merge branch 'main' into data-mover-generic-data-path 2023-05-17 10:15:52 +08:00
lyndon
5b75f35262 Add data mover CRD under v2alpha1 (#6176)
* add data mover CRD under v1alpha1

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

* data mover CRDs to v2alpha1

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

* data mover crd changes

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

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-16 15:09:54 -04:00
Lyndon-Li
dd40f7b777 velero data movement design
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-16 18:42:58 +08:00
Ming
c12a0ac731 Adjust Sleep time in E2E
Signed-off-by: Ming <mqiu@vmware.com>
2023-05-16 03:33:51 +00:00
Xun Jiang/Bruce Jiang
fe5182d74c Merge pull request #6264 from qiuming-best/e2e-codes-optimize
Adjust E2E test codes
2023-05-16 10:42:35 +08:00
Shubham Pampattiwar
7f204fa49d Merge pull request #6260 from reasonerjt/add-orlabel-schedule-api
Add "orLabelSelectors" to schedule API doc
2023-05-15 16:37:29 -04:00
Jonas Rosland
56fecc2b29 Add required footer links and update .gitignore
Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2023-05-15 09:33:08 -04:00
lyndon
384091f5e6 Merge pull request #6268 from Lyndon-Li/issue-fix-5123
Issue fix 5123
2023-05-15 14:41:18 +08:00
Xun Jiang/Bruce Jiang
a4ba2c3627 Merge pull request #6247 from Shashank1306s/main
Change rbac.authorization.k8s.io/v1beta1 to rbac.authorization.k8s.io/v1 in deployment.yml
2023-05-15 14:29:46 +08:00
danfengliu
527bbacc94 Merge pull request #6267 from qiuming-best/fix-GetPluginConfig
Fix PluginConfigLabelSelector bug
2023-05-15 14:00:28 +08:00
Ming
a16c17b1e3 Adjust E2E test codes
Signed-off-by: Ming <mqiu@vmware.com>
2023-05-15 03:28:56 +00:00
Lyndon-Li
78db01753e add change log
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-15 11:19:08 +08:00
Lyndon-Li
08d899e09e Merge branch 'main' into issue-fix-5123 2023-05-15 10:58:52 +08:00
Ming
f03e73bfc2 Fix PluginConfigLabelSelector bugs
Signed-off-by: Ming <mqiu@vmware.com>
2023-05-15 02:46:24 +00:00
lyndon
ea4e49f503 Merge pull request #6248 from Lyndon-Li/bump-up-kopia-v0.13
Bump up kopia v0.13
2023-05-15 10:44:19 +08:00
Lyndon-Li
307b82a2ec bump up kopia v0.13.0
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-15 07:23:38 +08:00
Lyndon-Li
623da51494 add shared generic data path
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-12 12:01:59 +08:00
Daniel Jiang
a9c247048f Add "orLabelSelectors" to schedule API doc
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-05-11 13:18:43 +08:00
Lyndon-Li
725d8fb35d fix issue 5123
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-10 12:09:16 +08:00
Lyndon-Li
9fea274fca bump up kopia v0.13.0
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-10 10:26:10 +08:00
Shashank Singh
26cc521240 Change rbac.authorization.k8s.io/v1beta1 to rbac.authorization.k8s.io/v1 in deployment.yml
Signed-off-by: Shashank Singh <shashasingh@microsoft.com>
2023-05-09 16:04:53 +05:30
Xun Jiang/Bruce Jiang
12a14d11e9 Modify Docker's maintainer label. (#6238)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-05-09 09:27:32 +08:00
Shubham Pampattiwar
c1d38fa11d Merge pull request #6232 from kaovilai/podvolumebackuplog
log volumes to backup to help debug why `IsPodRunning` is called.
2023-05-08 12:19:03 -04:00
qiuming
632290a72b Merge pull request #6234 from kaovilai/goimportsbrrrrrr
run gofmt goimports for every files in parallel
2023-05-08 14:52:28 +08:00
Tiger Kaovilai
07712f4d6a run gofmt goimports for every files in parallel
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-05-05 13:59:40 -04:00
Tiger Kaovilai
f6cea372fd log volumes to backup to help debug why IsPodRunning is called.
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-05-05 13:41:17 -04:00
Anshul Ahuja
9b920202ba Fix go get to go install in tiltfile (#6223)
Signed-off-by: Anshul Ahuja <anshul.ahu@gmail.com>
2023-05-05 13:12:35 -04:00
Orlix
4207d063df Add blog for 1.11 (#6218)
* Add blog for 1.11

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>

* Add blog for 1.11

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>

---------

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2023-05-05 13:11:26 -04:00
qiuming
4db1a781fc Merge pull request #6208 from blackpiglet/linter_errcheck
Enable errcheck linter and resolve found issues.
2023-05-05 14:43:55 +08:00
qiuming
a88163f308 Merge pull request #6198 from danfengliu/fix-context-withconcel-issue
Fix context issues for several E2E tests
2023-05-05 11:20:34 +08:00
danfengl
5f5db2eaca Fix context issues for several E2E tests
1. Fix context issues produced by previous PR, increase timeout or add case scpoed global timeout param to make  backup/restore command timeout configurable.
2. Add global param for storage class name using by test cases;
3. Fix param DefaultVolumesToFsBackup usage issue: set DefaultVolumesToFsBackup to false in backup CLI  in case it was set to true in install CLI.
4. Make namespace names of each namespace mapping test unique from being interfered by each other.

Signed-off-by: danfengl <danfengl@vmware.com>
2023-05-05 02:09:21 +00:00
Jonas Rosland
2c4aa41999 Update footer with language around website cookes and tracking (#6216)
Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2023-05-02 16:19:52 -04:00
Anshul Ahuja
d7e0f64c89 Remove restorestoragelocation (#6211)
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
Co-authored-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-04-28 10:58:08 -04:00
Xun Jiang
f051ecaee9 Enable errcheck linter and resolve found issues.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-28 09:33:42 +08:00
qiuming
fbba4e5c77 Merge pull request #6151 from kaovilai/expose-getpluginconfig
Make GetPluginConfig accessible from other packages.
2023-04-26 17:42:19 +08:00
Xun Jiang/Bruce Jiang
a8a17d725a Merge pull request #6194 from blackpiglet/linter_more
Enable more linters, and remove mal-functioned milestoned issue action.
2023-04-26 14:12:47 +08:00
Xun Jiang/Bruce Jiang
0d1c2dc831 Merge pull request #6173 from blackpiglet/linter_revive
Enable linter revive and resolve found errors: part1
2023-04-26 14:09:33 +08:00
Xun Jiang/Bruce Jiang
e106bbf06b Enable linter revive and resolve found errors: part 2. (#6177)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-26 14:05:22 +08:00
Xun Jiang
443f732e51 Enable more linters, and remove mal-functioned milestoned issue action.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-25 23:31:51 +08:00
Xun Jiang
180cc4e31d Enable linter revive and resolve found errors: part 1
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-25 23:15:15 +08:00
Xun Jiang/Bruce Jiang
a0b0b7cd9b Merge pull request #6183 from blackpiglet/linter_staticcheck
Enable staticcheck and resolve found issues.
2023-04-25 16:08:08 +08:00
Xun Jiang/Bruce Jiang
51c67089f5 Merge branch 'main' into linter_staticcheck
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
2023-04-25 15:49:05 +08:00
lyndon
30140d6b1a Merge pull request #6184 from Lyndon-Li/issue-fix-6182
Fix issue 6182
2023-04-25 15:31:08 +08:00
lyndon
d625b006ae Merge pull request #6185 from blackpiglet/linter_stylecheck
Enable stylecheck linter and resolve found issues.
2023-04-25 15:26:14 +08:00
Lyndon-Li
d928124b01 fix issue 6182
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-04-25 15:00:08 +08:00
Xun Jiang
bbc1e2e151 Enable stylecheck linter and resolve found issues.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-25 14:37:02 +08:00
Xun Jiang
cb0ada1e1c Enable staticcheck and resolve found issues.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-25 11:33:40 +08:00
Xun Jiang/Bruce Jiang
980106dc39 Merge pull request #6154 from kaovilai/govet
fix go vet warnings
2023-04-25 09:24:30 +08:00
qiuming
b38ee8ad41 Optimize APIGroup E2E test case (#6174)
Signed-off-by: Ming <mqiu@vmware.com>
2023-04-24 17:38:30 -04:00
Orlix
291149732c Algolia fix docs search (#6105)
* wip:Algolia fix 2

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>

* wip:Algolia fix 2

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>

* Algolia fix 2

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>

* Update site/layouts/partials/head-docs.html

Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Signed-off-by: Orlix <7236111+OrlinVasilev@users.noreply.github.com>

---------

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
Signed-off-by: Orlix <7236111+OrlinVasilev@users.noreply.github.com>
Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
2023-04-24 14:18:32 -04:00
Xun Jiang/Bruce Jiang
1fd28e8a36 Fix usestdlibvars and whitespace linters issues. (#6162)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-24 09:10:55 +08:00
Daniel Jiang
14f31eed8c Merge pull request #6109 from blackpiglet/modify_goreleaser
Fix goreleaser issues and add new goreleaser action.
2023-04-18 15:00:41 +08:00
Xun Jiang/Bruce Jiang
6b67504a98 Merge pull request #6158 from blackpiglet/update_golang_main
Update Golang to v1.20 for main branch.
2023-04-18 14:53:44 +08:00
Tiger Kaovilai
b7d1c3e679 golangci.yaml: comment out check-shawdowing, remove vet script
Per comment: https://github.com/vmware-tanzu/velero/pull/6154#issuecomment-1510946594

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-04-17 10:22:50 -04:00
Xun Jiang
0be3f5a3e7 Update Golang to v1.20 for main branch.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-17 13:26:46 +08:00
Daniel Jiang
f6a27f8585 Merge pull request #6136 from ywk253100/230412_mf_main
Ignore not found error during patching managedFields
2023-04-17 12:47:43 +08:00
Tiger Kaovilai
d6848ffb16 Self contain context in each high level function rather than passing around in structs
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-04-16 14:22:04 -04:00
Tiger Kaovilai
3f4b258dee defer ctxCancel
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-04-16 13:33:43 -04:00
Tiger Kaovilai
84daa36efe cancel ctx in nil, err returns
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-04-16 13:06:13 -04:00
Tiger Kaovilai
3893c46086 jsontag
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-04-16 12:49:55 -04:00
Tiger Kaovilai
da0f5d5850 Field labels for Duration, Time, client.ObjectKey, KibishiiData, VeleroCLI2Version
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-04-16 12:34:28 -04:00
Tiger Kaovilai
08f7f555f3 mv pkg/restore/pod_volume_restore_action.go/getPluginConfig pkg/plugin/framework/common/plugin_config.go/GetPluginConfig
Fixes Expose GetPluginConfig #4865

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
2023-04-15 07:04:42 +00:00
qiuming
65f99c1264 Merge pull request #6108 from qiuming-best/resource-policies-e2e
Add resource policies E2E test
2023-04-14 14:09:26 +08:00
Ming
e4c05f2ddf Merge branch 'main' of https://github.com/qiuming-best/velero into resource-policies-e2e 2023-04-14 04:08:52 +00:00
Scott Seago
d298c6d0a2 Merge pull request #6097 from danfengliu/add-e2e-test-for-schedule-backup-creation
Add E2E test for schedule backup creation principle
2023-04-12 13:14:38 -04:00
Emily McMullan
61c8e58fef remove datasource from pvc if prior csi restore
Signed-off-by: Emily McMullan <emcmulla@redhat.com>
2023-04-12 10:52:30 -04:00
danfengl
504b1cba30 Add E2E test for schedule backup creation principle
Signed-off-by: danfengl <danfengl@vmware.com>
2023-04-12 10:31:20 +00:00
Wenkai Yin(尹文开)
b4aa0b8f5f Ignore not found error during patching managedFields
Ignore not found error during patching managedFields

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-04-12 17:17:13 +08:00
Ming
45a639b16c Add resource policies E2E test
Signed-off-by: Ming <mqiu@vmware.com>
2023-04-12 02:04:01 +00:00
Xun Jiang
e779cd2b76 Fix goreleaser issues and add new goreleaser action.
Fix goreleaser script's bug.
Add a new Github action to verify goreleaser related modification.

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-11 17:03:20 +08:00
qiuming
bacec117b9 Merge pull request #6094 from blackpiglet/v1.11_changelog
Add changelog for v1.11.
2023-04-07 15:43:39 +08:00
qiuming
af0d2addfc Merge pull request #6079 from danfengliu/bumpup-upgrade-path-for-1.11
Bumpup upgrade test path for v1.11
2023-04-07 15:36:13 +08:00
danfengl
35bf7a085d Bumpup upgrade test path for v1.11
Signed-off-by: danfengl <danfengl@vmware.com>
2023-04-07 07:21:40 +00:00
Xun Jiang
0c1a57af72 Add changelog for v1.11.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-07 15:19:05 +08:00
Xun Jiang/Bruce Jiang
079c76ffb5 Modify README compatibility matrix, and move the implemented design into Implemented directory. (#6087)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-07 10:56:04 +08:00
Daniel Jiang
18c6cd0400 Merge pull request #6070 from blackpiglet/v1.11_document
Add v1.11 document
2023-04-07 10:47:10 +08:00
Xun Jiang
9f460a91e7 Add v1.11 document.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-07 09:32:22 +08:00
Xun Jiang
f9a3d7e2f2 Add v1.11 document.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-07 09:25:39 +08:00
qiuming
1e31bcf406 Merge pull request #6089 from blackpiglet/update_filter_name
Modify new scope resource filters name.
2023-04-07 09:21:36 +08:00
Daniel Jiang
892e52456d Add a section to the doc about known issue regarding admission webhook. (#6092)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-04-07 08:41:29 +08:00
Xun Jiang
56f93393d8 Modify new scope resource filters name.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-06 18:11:55 +08:00
Xun Jiang/Bruce Jiang
3a09e8aa23 Merge pull request #6071 from qiuming-best/upgrade-doc
Add v1.11 upgrade doc
2023-04-06 09:53:06 +08:00
Ming
0fb64fa581 add upgrade to 1.11 doc
Signed-off-by: Ming <mqiu@vmware.com>
2023-04-06 01:41:02 +00:00
qiuming
d932b3dcbb Merge pull request #6069 from qiuming-best/describe-backup
Add display of resource policies name in describe backup output
2023-04-06 09:14:21 +08:00
Daniel Jiang
73f1740407 Merge pull request #6062 from blackpiglet/5862_fix
Make Velero not exits when EnableCSI is on and CSI snapshot not installed
2023-04-04 15:52:48 +08:00
Xun Jiang/Bruce Jiang
86df02f7f6 Merge pull request #6055 from qiuming-best/csi-policy-fix
Fix csi contidion policy matching issue
2023-04-04 15:33:40 +08:00
Ming
f1ddf0a6a2 Add display of resource policies name in describe backup output
Signed-off-by: Ming <mqiu@vmware.com>
2023-04-04 07:28:35 +00:00
lyndon
f0ca2ae7ad Merge pull request #6039 from blackpiglet/update_golang_version_new
Update Golang version to v1.19 for branch main
2023-04-04 14:35:30 +08:00
Xun Jiang/Bruce Jiang
42ec72146d Merge branch 'main' into update_golang_version_new
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-04 05:56:05 +00:00
Xun Jiang
fc692c49e6 Update Golang version to v1.19 for branch main.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-04 12:00:19 +08:00
Ming
d429d38ea1 Fix csi contidion policy match
Signed-off-by: Ming <mqiu@vmware.com>
2023-04-03 06:16:44 +00:00
Xun Jiang/Bruce Jiang
491664e10d Merge pull request #6057 from ywk253100/230331_restore
Restore Services before Clusters
2023-04-03 11:33:14 +08:00
qiuming
2e121ac360 Add resource policies doc (#6031)
Signed-off-by: Ming <mqiu@vmware.com>
2023-04-03 11:31:58 +08:00
qiuming
c0366bb8fb Merge pull request #6067 from reasonerjt/refine-log-bia-skip
Refine the log message when BIA is skipped
2023-04-03 11:29:02 +08:00
Daniel Jiang
95c674b23a Refine the log message when BIA is skipped
The log message should be clarified, otherwise when a user chooses to do
the backup via podvolme there will be confusing logs, but actually it's
just skipping the BIA for CSI plugin.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-04-02 23:31:19 +08:00
Xun Jiang
c1acd9c6c5 Make Velero server continue to work, when CSI feature is enabled and Snapshot CRD group is missing.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-31 17:47:27 +08:00
Wenkai Yin(尹文开)
cccbd2f8c0 Restore Services before Clusters
Restore Services before Clusters so they can be adopted by AKO-operator and no new Services will be created for the same clusters

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-03-31 14:26:07 +08:00
Daniel Jiang
b428b09a78 Merge pull request #6041 from sseago/async-backup-deletion
Fixed backup deletion bug related to async operations
2023-03-31 11:28:12 +08:00
Scott Seago
05c4e35ae7 Fixed backup deletion bug related to async operations
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-29 09:27:04 -04:00
Xun Jiang/Bruce Jiang
f031121214 Merge pull request #6050 from qiuming-best/vSphere-snapshot-fix
Fix resource policies not work for vSphere plugin
2023-03-29 16:46:35 +08:00
Ming
83f176e4ac Fix resource policies not work for vSphere plugin
Signed-off-by: Ming <mqiu@vmware.com>
2023-03-29 04:14:34 +00:00
qiuming
c9af70aff3 Merge pull request #6047 from danfengliu/debug-azure-issue
Add changing PVC selected node E2E test
2023-03-29 09:58:16 +08:00
danfengl
112775f924 Add changing PVC selected node E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2023-03-29 01:36:45 +00:00
Xun Jiang/Bruce Jiang
7e9896807d Merge pull request #6034 from blackpiglet/e2e_support_check_vsphere_csi_version
Make E2E test adopt vSphere CSI version update
2023-03-29 08:25:01 +08:00
Xun Jiang
478fb27a0e E2E test can read VC credential secret according to vSphere CSI driver version.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-28 11:18:49 +08:00
qiuming
5b8ec80ad8 Merge pull request #6030 from danfengliu/add-wait-for-migration-on-vsphere
Add wait time for migration E2E test on vsphere pipeline
2023-03-24 17:47:25 +08:00
danfengl
096330df16 Add wait time for migration on vsphere pipeline
Signed-off-by: danfengl <danfengl@vmware.com>
2023-03-24 09:29:20 +00:00
Xun Jiang/Bruce Jiang
caaf87c478 Merge pull request #6028 from Lyndon-Li/issue-fix-5972
Fix issue 5972
2023-03-24 17:10:56 +08:00
Lyndon-Li
2dc8a920ca fix issue 5972
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-03-24 14:41:22 +08:00
Xun Jiang/Bruce Jiang
15d44724e7 Modify golangci.yaml file. Resolve found lint issues. (#6008)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-24 12:15:08 +08:00
Daniel Jiang
82358666c8 Merge pull request #6009 from qiuming-best/resource-policies
Adjust match resource policies
2023-03-24 10:48:50 +08:00
Ming
a3cef5b0d3 Adjust match resource policies
Signed-off-by: Ming <mqiu@vmware.com>
2023-03-23 03:48:26 +00:00
qiuming
4de4d37833 Merge pull request #5915 from danfengliu/add-changing-sc-e2e-test
Add E2E test of PV/PVC storage class can be changed during restores
2023-03-22 15:52:50 +08:00
Daniel Jiang
a0137e2eca Merge pull request #6014 from reasonerjt/update-doc
Update doc
2023-03-22 14:27:39 +08:00
Daniel Jiang
838af53d3a Update doc
Update README to clarify the backward compatibility.
Trivial update to the support process to reflect how issues are labeled
as for now.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-03-22 14:07:17 +08:00
Daniel Jiang
58ad42871b Merge pull request #6012 from sseago/itemoperation-new-phase
BIA/RIAv2 -- distinguish between New and InProgress operations
2023-03-22 11:33:18 +08:00
Scott Seago
433d2d5e57 BIA/RIAv2 -- distinguish between New and InProgress operations
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-21 18:55:59 -04:00
qiuming
29b5894be6 Merge pull request #6005 from draghuram/restore-error
Slight improvement of error messages.
2023-03-21 18:31:29 +08:00
lyndon
2ad43194aa Merge pull request #5900 from blackpiglet/5416_limit_concurrent_goroutine
Limit the concurrent number for backup's VolumeSnapshot operation
2023-03-21 18:07:27 +08:00
qiuming
086dbd344f Handle backup of volume by resource policies (#5901)
* Handle backup of volume by resource policies

Signed-off-by: Ming <mqiu@vmware.com>
2023-03-21 14:39:25 +08:00
qiuming
ec88dc5203 Merge pull request #5942 from abserari/patch-1
Fix file rename: hack/download-restic.sh -> hack/build-restic.sh
2023-03-21 10:46:32 +08:00
Daniel Jiang
36f9ae6983 Merge pull request #6006 from Lyndon-Li/fix-deprecate-code-merge-back
Remove merged back deprecate code
2023-03-21 10:22:04 +08:00
Daniel Jiang
ac87154348 Merge pull request #6003 from blackpiglet/remove_not_equal
Replace != with notin for --selector.
2023-03-21 10:18:42 +08:00
Lyndon-Li
115f32cae5 remove merged back deprecate code
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-03-21 09:56:52 +08:00
Daniel Jiang
458560795b Remove Reference of itemsnapshotter (#5997)
It will be removed as we choose to use BIAv2 for progress monitoring.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-03-21 09:05:29 +08:00
Raghuram Devarakonda
e4f2f52392 Slight improvement of error messages.
Signed-off-by: Raghuram Devarakonda <draghuram@gmail.com>
2023-03-20 14:59:23 -04:00
Shubham Pampattiwar
2c26c1d5fe Merge pull request #5996 from sseago/biav2-second-followon
minor fixes for backup_operations_controller:
2023-03-20 08:42:33 -07:00
Shubham Pampattiwar
5c4b5509c2 Merge pull request #5993 from sseago/riav2-controller
RIAv2 async operations controller work
2023-03-20 08:40:43 -07:00
Scott Seago
e500e2d8e5 minor fixes for backup_operations_controller:
1) default frequency 10s
2) per-reconcile log is now Debug not info
3) added predicate to reduce reconcile events

Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-20 09:42:15 -04:00
Xun Jiang
446e43d018 Replace != with notin for --selector.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-20 17:22:15 +08:00
lyndon
81bee240fe Merge pull request #5982 from qiuming-best/fix-empty-volume-id
Fix take snapshot for PV with empty volume ID
2023-03-20 16:33:49 +08:00
lyndon
29f3557bb4 Merge pull request #5992 from R3DRUN3/main
Add latest release badge
2023-03-20 15:04:28 +08:00
Ming
10ae2b3e3a Fix take snapshot for PV without volume ID
Signed-off-by: Ming <mqiu@vmware.com>
2023-03-20 06:38:16 +00:00
Scott Seago
2155b2b215 RIAv2 async operations controller work
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-17 14:30:39 -04:00
Xun Jiang/Bruce Jiang
5505110c4a Merge pull request #5987 from ywk253100/230315_unittest
Skip running unit test for test package
2023-03-17 10:57:16 +08:00
r3drun3
2c21cec7e4 docs(readme): add latest release badge
Signed-off-by: r3drun3 <simone.ragonesi@kiratech.it>
2023-03-16 10:04:47 +01:00
Xun Jiang
c677c433e0 Limit the concurrent number of go routine for VolumeSnapshot and VolumeSnapshotContent operations.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-16 11:42:38 +08:00
lyndon
117d5e846f Merge pull request #5916 from allenxu404/i5200
Add warning/error result to cmd `velero backup describe`
2023-03-16 10:28:08 +08:00
杨刚 (成都)
ad9c6e8dee delete io/ioutil package. (#5955)
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-03-16 09:25:58 +08:00
Wenkai Yin(尹文开)
c58854fc41 Skip running unit test for test package
Skip running unit test for test package

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-03-15 17:49:24 +08:00
allenxu404
a0dac73c95 Add warning/error result to cmd velero backup describe
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-03-15 14:20:47 +08:00
杨刚 (成都)
1d8ca4f2ef delete unused parms for UpdateVolumeSnapshotLocationWithCredentialConfig (#5954)
Signed-off-by: yanggang <gang.yang@daocloud.io>
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
Co-authored-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
2023-03-15 13:50:54 +08:00
lyndon
f527a1fc62 Merge pull request #5933 from sseago/additional-items-ready-main
Wait for additional items to be ready before restoring current item
2023-03-15 11:00:41 +08:00
Daniel Jiang
d6a3da2929 Merge pull request #5838 from blackpiglet/add_new_resource_filters
Add new resource filters can separate cluster and namespace scope res…
2023-03-15 08:57:10 +08:00
Anshul Ahuja
22c1f9f3d6 cleanup
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-03-14 09:34:12 +00:00
Anshul Ahuja
c9ae1d4dc2 change approach
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-03-14 09:29:38 +00:00
Xun Jiang
a1e4f54488 Add new resource filters can separate cluster and namespace scope resources.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-14 07:07:22 +00:00
Daniel Jiang
eeee4e06d2 Merge pull request #5971 from sseago/biav2-follow-on
Follow-on fixes for BIAv2 controller work
2023-03-14 09:47:32 +08:00
Scott Seago
a2621caa74 Wait for additional items to be ready before restoring current item
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-13 15:26:45 -04:00
Scott Seago
dd63e8182c Follow-on fixes for BIAv2 controller work
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-13 10:29:36 -04:00
Xun Jiang/Bruce Jiang
36163c9a0e Merge pull request #5926 from eemcmullan/server-timeouts
Add server setting for resource timeouts
2023-03-13 09:34:31 +08:00
Emily McMullan
ec4a7072b3 add server setting for default timeouts
Signed-off-by: Emily McMullan <emcmulla@redhat.com>
2023-03-10 10:15:09 -05:00
qiuming
54042c3b01 Merge pull request #5773 from qiuming-best/volumes-filter-design
Design for Handling backup of volumes by resources filters
2023-03-10 09:19:37 +08:00
lyndon
085493a830 Merge pull request #5967 from blackpiglet/5965_fix
Update HorizontalPodAutoscaler version in velero.io
2023-03-10 09:12:27 +08:00
Xun Jiang/Bruce Jiang
7d7e3fff0d Refoctor backup controller with controller-runtime. (#5969)
Signed-off-by: Ming <mqiu@vmware.com>
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Ming <mqiu@vmware.com>
2023-03-10 08:59:40 +08:00
Xun Jiang/Bruce Jiang
6d8f086283 Merge pull request #5956 from Lyndon-Li/issue-fix-5935
Fix issue 5935
2023-03-09 15:28:47 +08:00
Lyndon-Li
40aae5ebdd fix issue 5935
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-03-09 14:24:51 +08:00
Shubham Pampattiwar
c6059a93d2 Merge pull request #5873 from blackpiglet/add_psa_support 2023-03-08 17:41:53 -08:00
qiuming
7d8cb990e0 Merge pull request #5960 from danfengliu/turn-on-velero-debug-log-switch
Add control on Velero pod log verbosity to E2E test
2023-03-08 15:18:11 +08:00
Xun Jiang
6a295cb0bb Update HorizontalPodAutoscaler version in velero.io
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-08 10:32:44 +08:00
杨刚 (成都)
38a7707ce3 Unify pkg/install deployment args array. (#5961)
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-03-08 10:29:30 +08:00
lyndon
2dab3446d8 Merge pull request #5964 from Lyndon-Li/fix-client-wait-problem
Fix client wait problem after async operation change
2023-03-08 09:59:13 +08:00
Lyndon-Li
28d636bd71 fix client wait problem
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-03-08 09:29:16 +08:00
danfengl
44a065bd3f Turn Velero debug log flag on
Signed-off-by: danfengl <danfengl@vmware.com>
2023-03-07 04:07:55 +00:00
Shubham Pampattiwar
8bed159023 Merge pull request #5849 from sseago/async-backup-controller
BIAv2 async operations controller work
2023-03-06 18:10:08 -08:00
DingRui Yang
e80584f1a9 Fix GOARM=""
Signed-off-by: DingRui Yang <abserari@gmail.com>
2023-03-06 16:35:46 +08:00
DingRui Yang
018ea42bd0 Merge branch 'main' into patch-1
Signed-off-by: DingRui Yang <abserari@gmail.com>
2023-03-06 16:33:20 +08:00
qiuming
6d635a9454 Merge pull request #5944 from abserari/patch-2
Fix tilt up: missing ${GOARM}" parameter in build-restic.sh
2023-03-06 14:48:21 +08:00
Daniel Jiang
0acc698ddf Merge pull request #5939 from ywk253100/230228_distroless
Switch the base image to distroless/base-nossl-debian11 to reduce the CVE triage efforts
2023-03-06 10:12:40 +08:00
DingRui Yang
9d42c1a408 Update Tiltfile
Signed-off-by: DingRui Yang <abserari@gmail.com>
2023-03-03 17:43:46 +08:00
DingRui Yang
c6c6908b1a Update build-restic.sh
Signed-off-by: DingRui Yang <abserari@gmail.com>
2023-03-03 17:42:58 +08:00
DingRui Yang
3c671a7c09 Fix miss ${GOARM}" parameter in build-restic.sh
Signed-off-by: DingRui Yang <abserari@gmail.com>
2023-03-02 21:11:45 +08:00
DingRui Yang
d23307b403 Fix file rename: hack/download-restic.sh -> hack/build-restic.sh
In fc0c470395 rename the file. But not sync the update in tiltfile

Signed-off-by: DingRui Yang <abserari@gmail.com>
2023-03-02 20:40:49 +08:00
Ming
d72e88a74b Add API Design
Signed-off-by: Ming <mqiu@vmware.com>
2023-03-02 07:53:28 +00:00
Wenkai Yin(尹文开)
99c622331a Switch the base image to distroless/base-nossl-debian11 to reduce the CVE triage efforts
Switch the base image to distroless/base-nossl-debian11 to reduce the CVE triage efforts

Fixes #5902

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-03-02 15:45:08 +08:00
Scott Seago
c3d1d83da5 BIAv2 async operations controller work
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-03-01 11:49:17 -05:00
Xun Jiang/Bruce Jiang
94fec66bc8 Merge pull request #5927 from Lyndon-Li/fix-main-CI-problem
[Main]fix main CI no space problem
2023-02-28 16:44:36 +08:00
qiuming
7b3b2c28d2 Merge pull request #5907 from kaovilai/client-go-v0.25.0
Upgrade to k8s.io/client-go v0.25.6
2023-02-28 16:43:39 +08:00
Daniel Jiang
357a917c4e Merge pull request #5899 from anshulahuja98/goreleaser
upgrade and fix goreleaser issue
2023-02-28 16:40:48 +08:00
Lyndon-Li
e671615e58 [Main]fix main CI no space problem
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-02-28 12:33:40 +08:00
lyndon
da17641433 Merge pull request #5867 from ywk253100/230202_restore
Add restored resource list in the output of restore describe command
2023-02-28 11:39:42 +08:00
Wenkai Yin(尹文开)
eb4ecd3767 Add restored resource list in the output of restore describe command
Add restored resource list in the output of restore describe command

Fixes #5199

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-02-28 10:43:03 +08:00
Shubham Pampattiwar
c6fba5556e Merge pull request #5864 from blackpiglet/restore_controller_use_controller_runtime 2023-02-25 13:25:15 -08:00
Xun Jiang
c2ac76165e Make restore controller adopting the controller-runtime framework.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-02-25 11:55:02 +08:00
danfengl
8c7363d6a7 Add E2E test of changing PV and PVC can be changed during restores
Signed-off-by: danfengl <danfengl@vmware.com>
2023-02-24 09:54:55 +00:00
Xun Jiang/Bruce Jiang
a467488f1a Merge pull request #5894 from Lyndon-Li/issue-fix-5881
Fix issue 5881
2023-02-24 17:23:10 +08:00
Tiger Kaovilai
6163df5da2 go get k8s.io/client-go@v0.25.6 && go mod tidy
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-02-23 16:41:29 -05:00
Shubham Pampattiwar
b23c541010 Merge pull request #5859 from hezhizhen/clock
Replace k8s.io/apimachinery/pkg/util/clock with k8s.io/utils/clock
2023-02-23 13:37:33 -08:00
qiuming
4b1488bbc3 Merge pull request #5911 from blackpiglet/fix_dependabot_alert
Fix Dependabot alerts. Update Dockerfile. Modify Trivy daily scan.
2023-02-23 17:11:06 +08:00
lyndon
707001e9d4 Merge pull request #5904 from danfengliu/rollback-velero-client-factory-code
Roll back pkg client code for Velero server
2023-02-23 14:42:41 +08:00
Xun Jiang
0a2aed8967 Fix Dependabot alerts. Update Dockerfile. Modify Trivy daily scan.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-02-23 14:04:59 +08:00
danfengl
979fb9ccab Roll back pkg client code for Velero server
Signed-off-by: danfengl <danfengl@vmware.com>
2023-02-22 14:11:02 +00:00
Anshul Ahuja
1730f8bcb4 upgrade and fix goreleaser issue
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-02-22 06:36:51 +00:00
qiuming
d7defa7fb5 Merge pull request #5893 from reasonerjt/sa-rb
Do not create the rolebinding if user customize the service account
2023-02-22 14:35:06 +08:00
Lyndon-Li
08b8498afb fix issue 5881
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-02-21 19:17:38 +08:00
Daniel Jiang
42a92e9b3d Do not create the rolebinding if user customize the service account
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-02-21 18:20:38 +08:00
Xun Jiang/Bruce Jiang
5555f7d4e7 Merge pull request #5865 from allenxu404/issue4816
Add a json output to velero backup describe
2023-02-21 18:19:06 +08:00
allenxu404
16bf3e2d90 Add a json output to velero backup describe
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-02-21 17:16:34 +08:00
Zhizhen He
fb1dc110f2 Replace k8s.io/apimachinery/pkg/util/clock with k8s.io/utils/clock
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-02-21 11:56:17 +08:00
Scott Seago
5f039b7f7c Merge pull request #5224 from kaovilai/patch-3
gh-issue-template: Comment out the subheading description
2023-02-20 10:14:39 -05:00
Xun Jiang
6be07a1df3 Add labels for created namespace during velero installation to adopt k8s v1.25's PSS and PSA.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-02-20 21:27:04 +08:00
danfengliu
a83c153ca1 Merge pull request #5831 from danfengliu/add-snapshot-volumes-as-default-behavior-e2e-test
Add snapshotvolumes default behavior E2E test
2023-02-20 10:27:57 +08:00
Wenkai Yin(尹文开)
4d0c3ac83f Restore finalizer and managedFields (#5853)
Restore finalizer and managedFields of metadata during the restoration

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-02-20 10:26:45 +08:00
danfengl
beed887eeb Add snapshotvolumes default behavior E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2023-02-19 09:05:20 +00:00
Scott Seago
fa58a775e8 Merge pull request #5576 from anshulahuja98/backupresults
Publish backup results to enhance error info
2023-02-18 17:00:49 -05:00
Anshul Ahuja
8c3ddf0f73 Publish backup results extracted from backup logs
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-02-16 09:57:53 +05:30
Anshul Ahuja
2f3fa9699f Spelling fix
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-02-14 16:49:35 +05:30
Anshul Ahuja
0b243bc4bc Address PR feedback
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-02-14 16:32:36 +05:30
lyndon
c5efb542d0 Merge pull request #5786 from qiuming-best/unsupport-type-error
Set Kopia IgnoreUnknownTypes in ErrorHandlingPolicy to True
2023-02-13 15:08:48 +08:00
lyndon
44bcc0959e Merge pull request #5840 from kaovilai/pvb-pvr-should-fail-during-startup
move UpdatePVXStatusToFailed to controller pkg
2023-02-13 13:58:43 +08:00
Xun Jiang/Bruce Jiang
8f76907aff Merge pull request #5843 from ywk253100/230208_secret
Add secret restore item action to handle service account token secret
2023-02-13 11:57:32 +08:00
Fish-pro
ef05af13bf Clean up unused variables and functions (#5818)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-09 10:53:24 +08:00
Scott Seago
0be05c9bc8 Merge pull request #5788 from blackpiglet/enable_staticcheck
Enable staticcheck linter. Disable check for folder /pkg and /test by…
2023-02-08 19:26:22 -05:00
Anshul Ahuja
7bf5b507f7 Design to add support for Multiple VolumeSnapshotClasses in CSI Plugin
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-02-08 16:31:24 +05:30
Wenkai Yin(尹文开)
731a484275 Add secret restore item action to handle service account token secret
Add secret restore item action to handle service account token secret:
1. Skip the restoration for the auto-created service account token secret
2. Remove several fields for non-auto-created service account token secret to make sure the secret can be restored

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-02-08 15:52:11 +08:00
lyndon
7139daf07a Merge pull request #5769 from Lyndon-Li/issue-fix-5458
Issue fix 5458
2023-02-08 09:59:15 +08:00
Daniel Jiang
6257060bb6 Merge pull request #5333 from blackpiglet/5120_seperate_exlude_include_resource_parameter
Proposal to separate resource filter into cluster scope and namespace…
2023-02-08 09:11:51 +08:00
Tiger Kaovilai
3be7c33d3b move UpdatePVXStatusToFailed to controller pkg
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-02-07 10:20:30 -05:00
lyndon
53c3f4b436 Issue fix 5226 (#5768)
* fix issue 5226

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-02-07 17:47:25 +08:00
lyndon
0933dd906f Merge pull request #5736 from blackpiglet/4901_restore_hook
Add info about using shell and using environment variables in restore…
2023-02-07 17:24:26 +08:00
Ming
0fd5af3300 Set Kopia IgnoreUnknownTypes in ErrorHandlingPolicy to True for ignoring backup unknown file type
Signed-off-by: Ming <mqiu@vmware.com>
2023-02-07 08:30:58 +00:00
Scott Seago
5db9437f5e Merge pull request #5540 from wenterjoy/main
change image repository by configmap
2023-02-06 20:31:47 -05:00
Scott Seago
19b855660a Merge pull request #5828 from kaovilai/pvb-pvr-should-fail-during-startup
Use updated PVB/PVR for patching Failed Phase during startup
2023-02-06 15:08:59 -05:00
Scott Seago
53f3d13d7c Merge pull request #5807 from shubham-pampattiwar/update-crd-desc
Update CRD descriptions for SnapshotVolumes and restorePVs
2023-02-06 14:56:28 -05:00
Xun Jiang/Bruce Jiang
218fd76411 Add mapped selected-node existence check. (#5806)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-02-06 17:03:35 +08:00
Fish-pro
a761111ba1 Optimize string contrast judgment (#5821)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-06 14:52:01 +08:00
Fish-pro
843c70959f Clean up unnecessary convert (#5819)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-06 14:50:31 +08:00
Tiger Kaovilai
d7738532c8 Use updated PVB/PVR for patching Failed Phase during startup
Use the same pvb/pvr update functions across pkg/controller and pkg/cli/nodeagent for consistency of behavior

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-02-03 14:22:56 -05:00
Xun Jiang/Bruce Jiang
0b6b841f2a Remove redundant client from restore controller. (#5759)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-02-03 15:57:43 +08:00
Xun Jiang/Bruce Jiang
745d573dfa Merge pull request #5812 from Lyndon-Li/bump-up-golang-net
[Main] bump up golang net
2023-02-02 17:10:02 +08:00
wenterjoy
9d1ccedd44 modified according to review comments
Signed-off-by: wenterjoy <zhaoxin26@lenovo.com>
2023-02-02 02:27:31 +00:00
Daniel Jiang
8b0afa3c44 Add option "--service-account-name" to install cmd (#5802)
The option "--service-account-name" is to be added to that user can use
an existing service account for velero and node-agent pods.  This is
helpful for users who wanna use IRSA.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-02-01 17:12:24 +08:00
Lyndon-Li
2b043f7bdf bump up golang net
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-02-01 15:33:53 +08:00
Ming
a0891c6f44 add channgelog
Signed-off-by: Ming <mqiu@vmware.com>
2023-02-01 06:30:09 +00:00
qiuming
51568525cb Merge pull request #5779 from allenxu404/issue-matrics
add prometheus metrics to record warning total and last status of backups
2023-01-31 16:02:30 +08:00
Shubham Pampattiwar
428415c004 update CRD descriptions for SnapshotVolumes and restorePVs
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

add changelog file

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2023-01-31 00:01:40 -08:00
allenxu404
a5a165b0c3 add prometheus metrics to record warning total and last status of backups
Signed-off-by: allenxu404 <qix2@vmware.com>
2023-01-30 15:40:59 +08:00
lyndon
358e3b8554 Merge pull request #5778 from Fish-pro/fix/statement
Increase readability by reformat table in the document
2023-01-30 14:43:54 +08:00
Xun Jiang
fb5ee2e7bf Proposal to add resource filters for backup can distinguish whether resource is cluster scope or namespace scope.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-20 15:29:03 +08:00
Xun Jiang
955eec7033 Enable staticcheck linter. Disable check for folder /pkg and /test by now.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-20 13:52:13 +08:00
Shubham Pampattiwar
d14879ff74 Merge pull request #5752 from sseago/itemoperations-json
Define itemoperations.json format and update DownloadRequest API.
2023-01-19 13:24:24 -05:00
lyndon
b0a16ceac1 Merge pull request #5760 from Lyndon-Li/issue-fix-5043
Issue fix 5043
2023-01-19 16:44:14 +08:00
lyndon
71b459dff9 Merge pull request #5784 from qiuming-best/bump-up-restic
Bump up Restic version to 0.15.0
2023-01-19 14:37:20 +08:00
Ming
e6c8f3afa5 Bump up restic version to 0.15.0
Signed-off-by: Ming <mqiu@vmware.com>
2023-01-19 02:43:09 +00:00
Shubham Pampattiwar
cf2b482c97 Merge pull request #5569 from sseago/riav2-impl
Restore Item Action v2 API implementation
2023-01-18 10:09:27 -05:00
Fish-pro
dd847c2846 Reformat table in the document
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-01-18 11:11:16 +08:00
lyndon
a1027eeb52 Merge pull request #5771 from blackpiglet/add_go_arm
Add GOARM in Restic builder.
2023-01-18 09:11:30 +08:00
Lyndon-Li
d23418b5b5 add change log
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-01-17 18:23:43 +08:00
Xun Jiang
601f4a9985 Add GOARM in Restic builder. Add PR container build action.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-17 17:24:21 +08:00
Ming
5899287399 Merge branch 'main' of https://github.com/qiuming-best/velero into main 2023-01-17 07:13:08 +00:00
Ming
eb284fd5d1 Design for Handle backup of volumes by resources filters
Signed-off-by: Ming <mqiu@vmware.com>
2023-01-17 07:12:33 +00:00
Lyndon-Li
2574229fb0 add change log for 5769
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-01-16 19:15:49 +08:00
Lyndon-Li
2c4cfe5611 Merge branch 'main' into issue-fix-5458 2023-01-16 17:46:58 +08:00
Daniel Jiang
598333dca1 Merge pull request #5767 from blackpiglet/fix_container_builder_env
Remove container-builder-env section.
2023-01-16 17:42:13 +08:00
Xun Jiang
d1608e7723 Remove container-builder-env section.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-16 16:17:59 +08:00
qiuming
46bcdb2c50 Merge pull request #5764 from blackpiglet/add_restic_builder
[cherry-pick][main] Add restic builder
2023-01-13 16:35:51 +08:00
Xun Jiang
01c4e9b0c9 Fix Dockerfile issue.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-13 14:37:55 +08:00
Xun Jiang
7d916485ec Add Restic builder in Dockerfile.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-13 14:32:22 +08:00
Lyndon-Li
fc98268181 Merge branch 'main' into issue-fix-5043 2023-01-12 16:54:50 +08:00
Shubham Pampattiwar
e8ea414af7 Merge pull request #5740 from blackpiglet/add_trivy_nightly_scan
Add Trivy nightly scan.
2023-01-12 01:43:49 -05:00
Scott Seago
9f6f13f0c5 RestoreItemAction v2 API implementation
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-01-10 16:26:28 -05:00
Shubham Pampattiwar
ab642ffff2 Merge pull request #5442 from sseago/biav2-impl2
BackupItemAction v2 API implementation
2023-01-10 09:34:03 -05:00
Daniel Jiang
700d9dcc36 Update the default reviewers (#5751)
Update the group members of "maintainers" and "tech-writer" to reflect
the change in the team.
As for the group "tech-writer" I just selected a few members from
maintains team who has been working on velero for a relatively longer
time.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2023-01-10 17:25:19 +08:00
Scott Seago
9a54142257 BackupItemAction v2 API implementation
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-01-09 18:36:47 -05:00
Scott Seago
70b4238013 Define itemoperations.json format and update DownloadRequest API.
This is to support uploading async operation metadata to
object storage to support progress monitoring.

Signed-off-by: Scott Seago <sseago@redhat.com>
2023-01-09 18:19:21 -05:00
Xun Jiang
10a1428e00 Add info about using shell and using environment variables in restore InitContainer/Exec hooks.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-09 20:17:50 +08:00
lyndon
c27c395d50 Merge pull request #5730 from yanggangtony/log
fix log info : pkg/util/kube/isProvisionedByCSI
2023-01-09 14:27:42 +08:00
Xun Jiang
b10503b351 Add Trivy nightly scan.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-05 20:06:21 +08:00
dependabot[bot]
95fcd8f63c Bump github.com/Azure/azure-sdk-for-go (#5709)
Bumps [github.com/Azure/azure-sdk-for-go](https://github.com/Azure/azure-sdk-for-go) from 61.4.0+incompatible to 67.2.0+incompatible.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/v61.4.0...v67.2.0)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-05 11:00:05 +08:00
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
Daniel Jiang
54427705c7 Merge pull request #5700 from sseago/async-doc-update
Minor updates to async action monitoring design
2022-12-22 22:55:37 +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
Xun Jiang/Bruce Jiang
bd370b2215 Merge pull request #5713 from qiuming-best/restic-empty-dir-fix
[Cherry-Pick]Fix error with Restic backup empty volumes
2022-12-20 19:23:12 +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
Scott Seago
69da593f37 Minor updates to async action monitoring design:
1) clarification around Cancel() return values
2) updates to itemoperation json upload to account for progress
3) update to OperationProgress struct to avoid duplicate parameter
4) update new B/R phase name to WaitingForPluginOperationsPartiallyFailed for consistency
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-12-16 17:23:32 -05: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
Shubham Pampattiwar
ffc9845fb9 Merge pull request #5421 from sseago/vsv2-design
VolumeSnapshotter v2 API design
2022-12-12 09:39:33 -05:00
Shubham Pampattiwar
30b7ed8bf1 Merge pull request #5408 from sseago/riav2-design
RestoreItemAction v2 design
2022-12-12 09:39:16 -05:00
Scott Seago
09098f879c Merge pull request #5382 from sseago/biav2-design
BackupItemAction v2 design
2022-12-08 14:03:28 -05:00
Scott Seago
2ce46bd50c Merge pull request #5108 from sseago/progress-design
Item action progress monitoring design
2022-12-06 09:16:02 -05:00
lyndon
d7f771d0f7 Merge pull request #5659 from blackpiglet/update_compability_matrix
Update Velero and k8s version compatibility matrix.
2022-12-06 10:30:11 +08:00
Xun Jiang
3a9ff2256b Update Velero and k8s version compatibility matrix.
Due to CSIDriver is checked for Restic volume mounting path, and CSIDriver is GA and moved to storage v1 group in k8s v1.18, so update Velero v1.8, v1.9 and v1.10 compatible k8s version to 1.18-latest.

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-12-05 17:40:38 +08:00
lyndon
00fe0dcaf0 Merge pull request #5648 from lukashass/fix-compatibility-matrix-link
Fix links to compatibility matrix
2022-12-05 15:44:50 +08:00
Xun Jiang/Bruce Jiang
24faca31da Merge pull request #5653 from qiuming-best/trivy-cve-fix
Fix CVEs scanned by trivy
2022-12-05 10:56:11 +08:00
Ming
2f3732fa44 Fix CVEs scanned by trivy
Signed-off-by: Ming <mqiu@vmware.com>
2022-12-02 06:57:49 +00:00
Lyndon-Li
b51a17138e fix issue 5458
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-12-01 15:12:07 +08:00
Lukas Hass
807ba7e902 Fix links to compatibility matrix
Signed-off-by: Lukas Hass <lukas@slucky.de>
2022-11-30 15:23:48 +01:00
lyndon
9c62a9be81 Merge pull request #5647 from danfengliu/add-sleep-for-refresh-crd
Add sleep before backing up new born CRD
2022-11-30 10:50:52 +08:00
danfengl
897a5e0bd8 Add sleep before backing up new born CRD
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-30 02:24:45 +00:00
lyndon
2a0ed689c8 Merge pull request #5635 from Lyndon-Li/main-cut-1.10-docs
[main] cut v1.10 docs
2022-11-25 17:27:41 +08:00
Lyndon-Li
a462bef9c3 cut v1.10 docs on main
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-11-25 17:14:52 +08:00
lyndon
d26aaeb41e Merge pull request #5634 from reasonerjt/fix-api-doc-comment
[main]: Update the api-types doc
2022-11-25 15:35:16 +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
qiuming
1f41eb49b1 Merge pull request #5629 from danfengliu/fix-crd-verification-issue
Add verification for CRD installation
2022-11-25 11:55:16 +08:00
qiuming
342dc4adf9 Merge pull request #5630 from danfengliu/fix-git-action-issue-for-setup-gcloud
Fix git action issue for setup-gcloud
2022-11-25 11:54:24 +08:00
danfengl
3c3f041bc1 Add verification for CRD installation
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-25 03:28:50 +00:00
danfengl
fda394744a Fix git action issue for setup-gcloud
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-25 03:15:32 +00:00
lyndon
9dbd9694d8 Merge pull request #5606 from jenting/bump-goreleaser
Bump goreleaser to v1.12.3
2022-11-24 16:42:03 +08:00
Xun Jiang/Bruce Jiang
270225e89b Merge pull request #5628 from Lyndon-Li/remove-versions-from-kind
[main] Remove old kubernetes versions from kind CI
2022-11-24 14:24:32 +08:00
Lyndon-Li
33517aedc5 remove versions from kind matrix
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-11-23 18:42:11 +08:00
Scott Seago
82c6ca7304 VolumeSnapshotter v2 API design
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-11-22 15:09:59 -05:00
Scott Seago
8a10b9a9e4 RestoreItemAction v2 design
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-11-22 14:31:52 -05:00
Scott Seago
73a5ee41fa BackupItemAction v2 design
This includes necessary changes to support async item action monitoring.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-11-22 14:11:43 -05:00
Daniel Jiang
069c9a0751 Merge pull request #5617 from ywk253100/221122_main_order
Restore ClusterBootstrap before Cluster
2022-11-23 00:33:05 +08:00
danfengliu
6eccaa4cf5 Add pause/unpause schedule e2e test (#5609)
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-22 17:38: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
Xun Jiang/Bruce Jiang
11ea0d7561 Merge pull request #5611 from qiuming-best/main
[Main Cherry-Pick]Enhance upgrade velero bash script
2022-11-22 17:20:15 +08:00
JenTing Hsiao
31e2137154 Bump goreleaser to v1.12.3
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-11-22 13:34:11 +08:00
Ming
a7efd657f4 [Main Cherry-Pick]Enhance upgrade velero bash script
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-22 02:28:08 +00:00
Daniel Jiang
9d3600623e Merge pull request #5608 from nikhilbagdi/main
Update the Valero channel hash-name for Kubernetes Slack.
2022-11-21 15:01:06 +08:00
Nikhil Maheshwari
59bb4df0db Update the Valero channel hash-name for Kubernetes Slack.
Signed-off-by: Nikhil Maheshwari <nikhil.m2498@gmail.com>
2022-11-21 01:48:59 +05:30
Xun Jiang/Bruce Jiang
a8f04de955 Merge pull request #5602 from Lyndon-Li/update-1.10-release-notes
update 1.10 release notes
2022-11-18 09:56:53 +08:00
Lyndon-Li
16ecc7c7b1 update 1.10 release notes
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-11-17 16:46:45 +08:00
lyndon
7936dc2a9a Merge pull request #5593 from qiuming-best/perf-guidance
Add Velero File System Backup Performance Guide
2022-11-17 11:29:37 +08:00
Ming
9ae29f747e Add Velero File System Backup Performance Guide
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-17 02:28:39 +00:00
lyndon
67d6116835 Merge pull request #5590 from blackpiglet/add_behind_proxy_document
[main] Add Velero behind proxy document.
2022-11-15 16:33:20 +08:00
Xun Jiang
a80cfcdb8c Add Velero behind proxy document.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-11-14 19:27:32 +08:00
Xun Jiang/Bruce Jiang
180366bc01 Merge pull request #5584 from Lyndon-Li/1.10-readme
Update 1.10 compatibility matrix
2022-11-11 20:48:33 +08:00
Lyndon-Li
738d1ea0ac update 1.10 readme
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-11-11 20:32:18 +08:00
lyndon
efb4002522 1.10 changelog and doc (#5583)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-11-11 19:37:44 +08:00
danfengliu
1ea1d4df67 Save vvelero image tarball only for velero namespace in docker registry (#5581)
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-11 09:29:11 +08:00
lyndon
1f0b835560 Merge pull request #5524 from danfengliu/update-upgrade-test
Update upgrade test
2022-11-10 14:44:44 +08:00
danfengl
78dae45c52 Update upgrade test for 1.10
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-10 03:18:01 +00:00
danfengl
a411130256 debug opt in out
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-10 02:53:58 +00:00
Scott Seago
23c69f46ab Item action progress monitoring design
This design combines the requirements for the previously-merged
Upload Progress Monitoring design with the requirements for the
(not submitted but discussed in meetings and slack) proposed asynchronous
item action plugins into one integrated proposal.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-11-09 17:00:55 -05:00
Jiaolin Yang
c24855129a Merge pull request #5579 from qiuming-best/restic-cross-compile
[cherry-pick]Fix restic cross platform compile
2022-11-09 21:29:47 +08:00
Ming
9a5ba8f08b Fix restic cross platform compile
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-09 12:42:44 +00:00
lyndon
7137c65e92 Merge pull request #5573 from danfengliu/rename-gcs-secret-name
Rename secret for Google cloud storage
2022-11-09 15:59:47 +08:00
Xun Jiang/Bruce Jiang
8799359a27 Merge pull request #5574 from qiuming-best/restic-build-main
[cherry-pick]Add compile restic binary for CVE fix
2022-11-09 15:51:52 +08:00
Ming
fc0c470395 Add compile restic binary for CVE fix
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-09 07:29:18 +00:00
danfengl
4ab2712f6b Rename secret for Google cloud storage
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-09 07:17:25 +00:00
Xun Jiang/Bruce Jiang
cd371419e3 Merge pull request #5572 from qiuming-best/log-fix
Fix controller problematic log output
2022-11-09 15:11:39 +08:00
Ming
bf1122b633 Fix controller problematic log output
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-09 06:46:45 +00:00
Xun Jiang/Bruce Jiang
7ea1e93849 Merge pull request #5565 from danfengliu/upload-velero-image-to-gcs
Upload Velero build package saved from build image to Google cloud st…
2022-11-09 14:19:01 +08:00
danfengl
0b6df61eca Upload Velero build package saved from build image to Google cloud storage
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-08 13:44:04 +00:00
lyndon
5c98e8805b Merge pull request #5559 from Lyndon-Li/remove-gofrs-uuid
Remove dependency on gofrs/uuid
2022-11-07 16:44:24 +08:00
Lyndon-Li
b06cb9ec60 remove gofrs uuid
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-11-07 16:28:33 +08:00
Xun Jiang/Bruce Jiang
7ae269950f Merge pull request #5554 from qiuming-best/dependabot-tmp
Modify dependabot rules by only fix security issues
2022-11-07 10:38:22 +08:00
Xun Jiang/Bruce Jiang
c4c5f016f6 Merge pull request #5468 from qiuming-best/upgrade-doc
Add v1.10 velero upgrade doc
2022-11-07 10:08:07 +08:00
Ming
bfe4ac0d67 Modify dependabot rules by only fix security issues
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-04 09:36:55 +00:00
Xun Jiang/Bruce Jiang
fc493632b9 Merge pull request #5543 from sseago/vsl-creds-docs
add VSL credentials documentation.
2022-11-04 15:07:35 +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
lyndon
b5de485866 Merge pull request #5517 from Rajpratik71/Rajpratik71-patch-1
feat: dependabot workflow automation for updating dependency
2022-11-04 10:09:05 +08:00
Scott Seago
ad4fc0b1e4 add VSL credentials documentation.
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-11-03 17:12:05 -04:00
Orlix
a9e7439b49 Merge pull request #5513 from OrlinVasilev/update-community-meetings 2022-11-03 17:00:06 +02: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
Xun Jiang/Bruce Jiang
efcb63a20d Fix GCP StorageClass used for E2E testing's YAML syntax error. (#5536)
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-11-03 10:55:59 +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
OrlinVasilev
52c8785e79 Update Community meetings times
https://github.com/vmware-tanzu/velero/discussions/5091

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-11-02 11:43:00 +02:00
OrlinVasilev
7c16103987 Update Community meetings times
https://github.com/vmware-tanzu/velero/discussions/5091

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-11-02 11:42:53 +02: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
OrlinVasilev
70edb5bdfa Update Community meetings times
https://github.com/vmware-tanzu/velero/discussions/5091

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-11-01 16:58:07 +02: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
lyndon
e6ba774841 remove restic in docs (#5499)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-11-01 18:11:21 +08:00
OrlinVasilev
63788aaf8f Update Community meetings times
https://github.com/vmware-tanzu/velero/discussions/5091

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-11-01 11:49:55 +02:00
Ming
f848f50b37 add note for left over resources
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-01 07:43:15 +00:00
lyndon
76d3321917 Merge pull request #5526 from qiuming-best/insecurity-skip-fix
fix restic backup failure with self-signed certification backend storage
2022-11-01 15:29:43 +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
lyndon
502b058282 Merge pull request #5521 from blackpiglet/add-credential-store-in-back-deletion-controller
Add credential file store in the backup deletion controller.
2022-11-01 09:16:57 +08:00
OrlinVasilev
058c44fe10 Update Community meetings times
https://github.com/vmware-tanzu/velero/discussions/5091

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-10-31 18:49:09 +02:00
OrlinVasilev
734d6ca336 Update Community meetings times
https://github.com/vmware-tanzu/velero/discussions/5091

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-10-31 11:00:26 +02: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
a9cfd6604b Merge pull request #5484 from Lyndon-Li/pvbr-doc-refactor
Pod Volume Backup/Restore Refactor: refactor PVBR doc
2022-10-31 10:21:38 +08:00
Pratik Raj
8c6228adb8 feat: dependabot workflow automation for updating dependency
Signed-off-by: Pratik Raj <Rajpratik71@gmail.com>
2022-10-29 01:33:19 +05:30
OrlinVasilev
4054043c94 Update Community meetings times
https://github.com/vmware-tanzu/velero/discussions/5091

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-10-28 18:38:52 +03:00
OrlinVasilev
818953815d Update Community meetings times
https://github.com/vmware-tanzu/velero/discussions/5091

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-10-28 17:57:37 +03:00
Lyndon-Li
3efa5357aa refactor pvbr doc
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-28 16:56:11 +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
OrlinVasilev
5bd786a2f9 fix main TOC for 1.10
Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-10-26 12:17:26 +03:00
Ming
a0bf266f7f Add v1.10 velero upgrade doc
Signed-off-by: Ming <mqiu@vmware.com>
2022-10-25 09:41:11 +00: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
5f4336102a Merge pull request #5473 from dpedu/dpedu/1.7-upgrade-typo
Trivial correction to 1.7 upgrade instructions
2022-10-24 14:58:01 +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
Dave Pedu
ecee846ed5 Trivial correction to 1.7 upgrade instructions
The container name for the aws plugin is `velero-plugin-for-aws`. There was an extra `velero-` prefix in the doc.

Signed-off-by: Dave Pedu <dave@davepedu.com>
2022-10-21 08:59:08 -07:00
Wenkai Yin(尹文开)
7d5e17fe79 Change name of changelog file
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-10-21 18:21:24 +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
danfengliu
11a7c796eb Fix label naming issue for restore helper (#5469)
Signed-off-by: danfengl <danfengl@vmware.com>
2022-10-20 17:49:51 +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
ae3ebf7451 Merge pull request #5344 from kaovilai/CVE-2022-28948
Upgrade gopkg.in/yaml.v3 to v3.0.1
2022-10-19 16:25:24 +08:00
Daniel Jiang
d0a6ff29ac Merge pull request #5428 from weshayutin/CVE-2022-27191
Fix CVE-2022-27191
2022-10-19 16:12:58 +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
4d85b78a0c Merge pull request #5459 from Lyndon-Li/velero-docker-image-go-1.18
Upgrade velero docker image to use go 1.18
2022-10-19 14:26:01 +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
Scott Seago
6b2cb7a841 Merge pull request #5401 from shubham-pampattiwar/add-vsc-nil-check
Add nil check before execution of csi snapshot delete
2022-10-18 15:24:16 -04: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
Lyndon-Li
df5436b380 upgrade velero docker image
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-18 20:23:42 +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
30b1ca87eb Merge pull request #5313 from gliptak/go8
Bump Go to 1.18
2022-10-18 12:17:37 +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
Xun Jiang/Bruce Jiang
7a535ea047 Merge pull request #5425 from danfengliu/fix-ctx-issue
Fix E2E test and Git action CI issues
2022-10-17 09:56:23 +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
Xun Jiang/Bruce Jiang
c0430b8964 Merge pull request #5441 from sseago/riav1-input-output
moved RIA execute input/output structs back to velero package
2022-10-13 11:10:00 +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
Wesley Hayutin
1f6785275f Fix CVE-2022-27191
https://nvd.nist.gov/vuln/detail/CVE-2022-27191
updates to:
  * golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
adds:
  * golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2

Signed-off-by: Wesley Hayutin <weshayutin@gmail.com>
2022-10-11 07:47:48 -06: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
Orlix
19e158a2a6 Merge pull request #5417 from OrlinVasilev/add-pradeepkchaturvedi 2022-10-05 18:14:24 +03:00
OrlinVasilev
1165c7e5fc Update Maintainers with the new PM pradeepkchaturvedi
Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-10-03 14:16:05 +03:00
OrlinVasilev
0ad2321078 Update Maintainers with the new PM pradeepkchaturvedi
Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-10-03 14:12:31 +03: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
abf14c2c1f Merge pull request #5410 from danfengliu/debug-opt-in
Fix issues of E2E test for API group, migration and pv opt-out backup
2022-09-30 10:10:02 +08:00
danfengl
e699a3e9f2 Fix issues of E2E test for API group, migration and pv opt-out backup
1. One of API group test failed due to other PR with fix for treat PartiallyFailed as failure to collect debugbundle without wrap the origin error;
2. Fix migration test issue of wrong velero cli for backup commmand;
3. Fix wrong pararmeter name issue for pv opt-out backup test.

Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-29 13:53:42 +00: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
82a84248a6 Merge pull request #5315 from aaronariasperez/patch-1
A little note about TTL expiration
2022-09-29 12:53:28 +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
qiuming
3b3260c1c3 Merge pull request #5394 from blackpiglet/fix_prepareBackupRequest_UT_failure
Fix Test_prepareBackupRequest_BackupStorageLocation UT failure.
2022-09-27 09:53:59 +08:00
danfengliu
5631c7c9df Merge pull request #5331 from danfengliu/add-opt-in-opt-out-pv-to-e2e-test
Add backup opt-in/opt-out E2E test
2022-09-26 21:43:59 +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
Xun Jiang/Bruce Jiang
a5eaff0eb2 Merge pull request #5372 from danfengliu/add-kopia-support-for-velero-installation-in-e2e
Add Kopia support for Velero installation in E2E test
2022-09-26 16:24:54 +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
danfengl
09240a269b Add Kopia support for Velero installation in E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-24 04:27:24 +00:00
danfengl
081b70d0eb Add backup opt-in/opt-out E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-23 09:29:32 +00:00
qiuming
9b22ca6100 Merge pull request #5387 from Lyndon-Li/issue-fix-5386
fix issue 5386
2022-09-23 17:28:14 +08:00
Lyndon-Li
6c8981b0ad fix issue 5386
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-23 16:52:38 +08:00
qiuming
66f6365988 Merge pull request #5355 from danfengliu/add-schedule-backup-timing-e2e-test
Add schedule backup timing E2E test
2022-09-23 15:51:47 +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
qiuming
100d462ec0 Merge pull request #5367 from danfengliu/fix-issue--command-return-message-checking
Fix issue of fail to get command output for test verification
2022-09-22 10:17:26 +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
lyndon
ee254c644f Merge pull request #5353 from cleverhu/add-crd-field-doc-for-schedule
add useOwnerReferencesInBackup field doc
2022-09-21 12:12:38 +08:00
danfengl
fdc23832cc Fix issue of fail to get command output for test verification
When running velero backup/restore command, if the command result is "PartiallyFailed", it won't reture error as design, but we do need to know the debug information to figure out the reason, so the command output is needed to get the command result, then further action will be taken.

Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-21 02:47:32 +00:00
danfengl
80430542df Add schedule backup timing E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-21 02:32:26 +00:00
Niu Lechuan
1ab7ebd80e add change log
Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>
2022-09-21 10:24:19 +08:00
Shubham Pampattiwar
c0920b85da Merge pull request #5312 from sseago/riav1-refactor
RestoreItemAction v1 refactoring for plugin api versioning
2022-09-20 21:49:59 -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
cleverhu
f51c8bf44b add useOwnerReferencesInBackup field doc
Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-09-19 18:50:51 +08:00
Xun Jiang/Bruce Jiang
ac2bb3ea2e Merge pull request #5359 from Lyndon-Li/issue-fix-5358
Issue fix 5358
2022-09-19 17:10:28 +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
Gábor Lipták
648d56e541 Bump Go to 1.18
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2022-09-17 13:11:09 -04: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
Tiger Kaovilai
876238e33d Resolve gopkg.in/yaml.v3 vulnerabilities
as shown from https://security.snyk.io/package/golang/gopkg.in%2Fyaml.v3

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-09-14 10:48:52 -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
Aaron Arias
901bec30dd A little note about TTL expiration
I think is necessary this little comment about TTL expiration, because it can be confusing when the expiration time has passed and the data allocated and the snapshots are not erased at that time.

Signed-off-by: Aaron Arias <33655005+aaronariasperez@users.noreply.github.com>
2022-09-08 12:40:51 +02: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
Daniel Jiang
c7bd2b9c02 Merge pull request #5252 from cleverhu/add-csiSnapshotTimeout-for-describe
add CSISnapshotTimeout for describe backup
2022-09-05 14:44:36 +08:00
Daniel Jiang
78b4914661 Merge pull request #5261 from Abirdcfly/main
chore: remove duplicate word in comments
2022-09-05 14:32:47 +08:00
lyndon
0282e65221 Kopia Pod Volume Backup/Restore (#5259)
* kopia pvbr

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-05 10:29:30 +08:00
qiuming
a5a3df193d Merge pull request #5236 from sseago/no-namespaces-fix
Check for empty ns list before checking nslist[0]
2022-09-05 09:40:19 +08:00
qiuming
4bc73f2b3c Merge pull request #5237 from danfengliu/add-enable-api-group-e2e-test
Add enable API group on k8s resources E2E test
2022-09-02 15:47:59 +08:00
lyndon
5f1bf9eb35 Merge pull request #5214 from qiuming-best/uploader-restic
Uploader Implementation: Restic backup and restore
2022-09-02 11:11:38 +08:00
Ming
eb974687a7 merge upstream code
Signed-off-by: Ming <mqiu@vmware.com>
2022-09-02 01:45:12 +00:00
Daniel Jiang
218bab987d Merge pull request #5239 from shubham-pampattiwar/fix-already-exists
Fix edge cases for already exists resources
2022-08-31 23:01:56 +08:00
Shubham Pampattiwar
94a9a7c795 Merge pull request #4943 from phuongatemc/refactor_plugin_biav1
Refactor BackupItemAction to backupitemaction/v1
2022-08-30 09:48:26 -04:00
Xun Jiang/Bruce Jiang
6fea973c57 Migrate backup sync controller from code-generator to kubebuilder (#5218)
* Migrate backup sync controller from code-generator to kubebuilder

1. use kubebuilder's reconcile logic to replace controller's old logic.
2. use ginkgo and gomega to replace testing.
3. modify BSL reconciler registration method.

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>

* Add Option for PeriodicalEnqueueSource.

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-08-30 16:55:39 +08:00
Abirdcfly
fab86caa2f chore: remove duplicate word in comments
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-30 16:34:23 +08:00
Daniel Jiang
8bc464aaa6 Update the website of velero to refelct the change of PM (#5260)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-08-30 15:25:41 +08:00
Xun Jiang/Bruce Jiang
4bc3a3a784 Merge pull request #5248 from allenxu404/gc-freq
equip gc controller with configurable frequency
2022-08-30 11:12:12 +08:00
allenxu404
a8ba4875f0 equip gc controller with configurable frequency
Signed-off-by: allenxu404 <qix2@vmware.com>
2022-08-30 10:13:06 +08:00
qiuming
c8818ec1c9 Merge pull request #5241 from blackpiglet/update_enabled_runtime_controllers
Controller refactor code modifications.
2022-08-30 09:30:35 +08:00
Shubham Pampattiwar
93a875873b fix edge cases for already exists resources
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

add changelog file

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

update changelog filename

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

change log level and error type

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2022-08-29 17:34:02 -04:00
Scott Seago
91ac570d81 some additional debug logs
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-08-29 16:55:14 -04:00
Scott Seago
71648750cc Merge pull request #5247 from divolgin/storage-class-panic
Don't panic when storageClassName is not set in stateful sets
2022-08-29 10:06:32 -04:00
Xun Jiang/Bruce Jiang
eaf9fab711 Merge branch 'main' into update_enabled_runtime_controllers 2022-08-29 20:06:31 +08:00
Ming
ed71e65486 Merge branch 'main' of https://github.com/qiuming-best/velero into uploader-restic 2022-08-29 11:33:59 +00:00
qiuming
d8cae1e91b Merge pull request #5256 from ywk253100/220829_restic_common
Move the code in pkg/restic/common.go to the proper package
2022-08-29 19:32:09 +08:00
danfengl
e6c94af358 Add enable API group on k8s resources E2E test upon issue #5146
Signed-off-by: danfengl <danfengl@vmware.com>
2022-08-29 09:44:17 +00:00
Ming
f15757a3d8 Uploader Implementation: Restic backup and restore
Signed-off-by: Ming <mqiu@vmware.com>
2022-08-29 09:33:37 +00:00
Wenkai Yin(尹文开)
4a5647a891 Move the code in pkg/restic/common.go to the proper package
Move the code in pkg/restic/common.go to the proper package

Fixes #5243

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-08-29 10:04:58 +08:00
qiuming
3e30a3d388 Merge pull request #5233 from Lyndon-Li/udmrepo-dev-06
Kopia Integration:Kopia Lib - Implementation
2022-08-28 22:33:12 +08:00
cleverhu
e77aaa32ca add CSISnapshotTimeout for describe backup
Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-08-28 15:14:03 +08:00
Xun Jiang/Bruce Jiang
86762f442a Merge pull request #5217 from lilongfeng0902/lilf-branch
check vsc null pointer
2022-08-27 10:45:13 +08:00
Daniel Jiang
8d3f17390b Merge pull request #5240 from shubham-pampattiwar/add-oadp
Add OADP to adopters list
2022-08-26 16:45:40 +08:00
Lyndon-Li
3769cd218a kopia lib
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-08-26 15:25:20 +08:00
Scott Seago
5a5a4c184e Updated plugin/framework server files to cope with protoc changes
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-08-25 21:28:07 -04:00
Scott Seago
4f2c2d2679 updated to newer protoc/protoc-gen-go
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-08-25 21:28:03 -04:00
Scott Seago
6b8353081a renamed update files so that protoc is run before CRD update.
If generating protoc go files from scratch, `make update` fails if
CRD generation happens first, since the protoc-generated
files are imported by the api go files.
protoc generation needs to happen earlier.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-08-25 17:23:35 -04:00
Hoang, Phuong
2c037b7491 Add missing file
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-08-25 17:10:14 -04:00
Hoang, Phuong
4a043bdab9 Add changelog
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-08-25 17:10:14 -04:00
Hoang, Phuong
b54424bdc6 Refactor BackupItemAction to backupitemaction/v1
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-08-25 17:10:09 -04:00
divolgin
ad4e733ef2 Don't panic when storageClassName is not set in stateful sets
Signed-off-by: divolgin <dmitriy@replicated.com>
2022-08-25 15:02:40 +00:00
Scott Seago
55bf2de15d Check for empty ns list before checking nslist[0]
In determining whether a backup includes all namespaces, item_collector
checks for an empty string in the first element of the ns list. If processing
includes+excludes results in an empty list, treat this as another case
of a not-all-namespaces backup rather than crashing velero.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-08-24 14:32:19 -04:00
Xun Jiang/Bruce Jiang
e8494418d4 Merge pull request #5215 from allenxu404/issue5023
Refactor GC controller with kubebuilder
2022-08-23 15:59:03 +08:00
Xun Jiang
71e5027bfb Controller refactor code modifications.
1. Add some refactored controllers initiation code into enabledRuntimeControllers.
2. Add reconciler struct initiation function for DownloadRequest and ServerStatusRequest controllers.

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2022-08-23 10:32:19 +08:00
Shubham Pampattiwar
5118c8ac01 add OADP to adopters list
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

fix typo

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2022-08-22 11:37:15 -04:00
qiuming
082d680d7b Merge pull request #5221 from qiuming-best/uploader-kopia
Uploader Implementation: Kopia backup and restore
2022-08-22 20:00:27 +08:00
Ming
2bf054ad0b update upstream codes
Signed-off-by: Ming <mqiu@vmware.com>
2022-08-22 09:20:47 +00:00
Tiger Kaovilai
0bee6dd9fd gh-issue-template: Comment out the subheading description
This stops subheading description from showing in posted issues by default.

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-08-22 02:59:35 -04:00
李龙峰
5cddaeae6c check vsc null pointer
Signed-off-by: 李龙峰 <lilongfeng@inspur.com>
2022-08-22 14:44:17 +08:00
lyndon
893aeb70e2 Merge pull request #5234 from reasonerjt/fix-4923
Remove reference to non-existent doc
2022-08-22 14:32:29 +08:00
allenxu404
0378020c8d refactor gc controller with kubebuilder
Signed-off-by: allenxu404 <qix2@vmware.com>
2022-08-22 12:16:56 +08:00
Scott Seago
b6cca3f7d3 Merge pull request #5210 from danfengliu/clean-backups-after-each-test
Clean backups after each test and fix exclude label test issue
2022-08-19 10:02:46 -04:00
Daniel Jiang
3e435eeb44 Remove reference to non-existent doc
fixes #4923

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-08-19 15:44:00 +08:00
Ming
839c2ed98f Merge branch 'main' of https://github.com/qiuming-best/velero into uploader-kopia 2022-08-19 06:40:58 +00:00
Ming
262de19f52 Uploader Implementation: Kopia backup and restore
Signed-off-by: Ming <mqiu@vmware.com>
2022-08-19 06:39:28 +00:00
qiuming
1ba7b3de4f Merge pull request #5231 from Lyndon-Li/udmrepo-dev-05
Kopia Integration:Kopia Lib - Initialization
2022-08-19 09:52:20 +08:00
danfengl
6e8061266c Clean backups after each test and fix exlude label test issue
1. Clean backups after each test to avoid exceeding limitation of storage capability during E2E test;
2. Fix exlude label test issue that namespace should not be included and excluded at the same time no matter by which way to config.

Signed-off-by: danfengl <danfengl@vmware.com>
2022-08-19 01:24:06 +00:00
Lyndon-Li
d58abb2477 repo init
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-08-18 19:45:49 +08:00
lyndon
775943c858 code spell check (#5230)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-08-18 18:17:39 +08:00
qiuming
a36736e10a Merge pull request #5190 from ywk253100/220808_restic
Refactor the restic repo related code for Kopia integration
2022-08-18 14:16:09 +08:00
Wenkai Yin(尹文开)
047c7531fa Refactor the restic repo related code for Kopia integration
Refactor the restic repo related code for Kopia integration

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-08-17 11:49:53 +08:00
Daniel Jiang
4e25f59dc1 Add parameter "uploader-type" to velero server (#5212)
This commit adds the parameter "uploader-type" to velero server, add exposes the
setting via "velero install" in CLI.

fixes #5062

Signed-off-by: Daniel Jiang <jiangd@vmware.com>

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-08-16 13:50:28 +08:00
qiuming
71e4430840 Merge pull request #5179 from Lyndon-Li/udmrepo-dev-02
Kopia Integration: Unified Repository Provider - Implementation
2022-08-16 09:39:40 +08:00
qiuming
5b6d361bc9 Merge pull request #5201 from danfengliu/add-namespace-mapping-e2e-test
Add namespace-mappping E2E test
2022-08-15 15:48:24 +08:00
danfengl
c8544ea212 Add namespace- mappping E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-08-11 13:24:51 +00:00
qiuming
36d8d176dd Merge pull request #5163 from qiuming-best/uploader
kopia uploader integration on shim progress uploader module
2022-08-11 17:38:21 +08:00
Ming
49e151739f Kopia Uploader integration on shim progress uploader
Signed-off-by: Ming <mqiu@vmware.com>
2022-08-10 11:35:24 +00:00
danfengliu
a71237cc64 Merge pull request #5124 from danfengliu/add-migration-e2e-test
Add migration E2E test
2022-08-10 13:38:32 +08:00
Lyndon-Li
649c3a77df unified repo provider impl
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-08-09 20:48:31 +08:00
danfengl
fb445b3c0d Add migration E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-08-09 08:31:39 +00:00
Daniel Jiang
6951875053 Merge pull request #5104 from blackpiglet/5048-CSI-snapshot-timeout-configurable
Make CSI snapshot creation timeout configurable for backup and schedule.
2022-08-08 19:51:38 +08:00
Xun Jiang/Bruce Jiang
a5f4f8f9fc Merge branch 'main' into 5048-CSI-snapshot-timeout-configurable 2022-08-08 17:18:44 +08:00
Xun Jiang
f8d9cfdb84 Make CSI snapshot creation timeout configurable for backup and schedule.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-08-08 17:07:26 +08:00
Xun Jiang/Bruce Jiang
201c43d683 Merge pull request #5178 from allenxu404/i2413
fix issue#2413: treat namespaces with exclude label as excludedNamespaces
2022-08-08 13:35:38 +08:00
allenxu404
e5d828a2a4 modify variables defination and expose err
Signed-off-by: allenxu404 <qix2@vmware.com>
2022-08-08 12:05:08 +08:00
Daniel Jiang
ba50458ae2 Merge pull request #5181 from blackpiglet/restic-volume-path-change
Add annotation "pv.kubernetes.io/migrated-to" for CSI checking.
2022-08-08 12:03:47 +08:00
Xun Jiang
7af1e23614 Add annotation "pv.kubernetes.io/migrated-to" for CSI checking.
1. Also checking annotation "pv.kubernetes.io/migrated-to" to find out whether volume is provisioned by CSI.
2. Add UT cases.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-08-08 10:59:41 +08:00
Xun Jiang/Bruce Jiang
cea5e7f218 Merge pull request #5174 from blackpiglet/reduce-crd-size-new
Reduce CRD size.
2022-08-05 18:46:29 +08:00
Wenkai Yin(尹文开)
092fc01e8d Splic pkg/restic package (#5143)
This commit splits the pkg/restic package into several packages to support Kopia integration works

Fixes #5055

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-08-05 17:15:38 +08:00
allenxu404
eb08bdeb62 fix issue#2413 by treating namespaces with exclude label as excludedNamespaces
Signed-off-by: allenxu404 <qix2@vmware.com>
2022-08-04 20:00:11 +08:00
lyndon
088eb9b83c repo credentials (#5167)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-08-04 15:20:02 +08:00
qiuming
701256d296 Merge pull request #5172 from qiuming-best/multi-bsl-fix
Fix restic backups to multiple backup storage locations bug
2022-08-03 14:35:42 +08:00
Xun Jiang
e8da5df57a Reduce CRD size.
1. Make the Restore hook.InitConatianer server side field pruing disable.
2. Remove restore patch in update-generate-crd-code.sh.
3. Modify related testcases.
4. Add Container fields validation in Restore Init hook.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-08-02 19:45:01 +08:00
Ming
828e28aa43 Fix restic backups to multiple backup storage locations bug
Signed-off-by: Ming <mqiu@vmware.com>
2022-08-02 10:26:23 +00:00
Daniel Jiang
108c81d84c Skip registering "crd-remap-version" plugin when feature flag (#5165)
"EnableAPIGroupVersions" is set

The crd-remap-version plugin will always backup v1b1 resource for some
CRD. It impacts the feature flag `EnableAPIGroupVersions` which means to
backup all versions, and make migration fail.

In this commit the featureSet was removed from plugin server struct b/c
it blocks the parm `--features` to be populated correctly.  This change
should not have negative impact b/c the attribute in server struct is never used.

Fixes #5146

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-08-02 15:47:57 +08:00
Daniel Jiang
2b0d0959da Merge pull request #5148 from blackpiglet/vsl-refactor
VolumeSnapshotLocation refactor with kubebuilder.
2022-08-01 21:14:18 +08:00
lyndon
52fd18e9db Kopia Integration Change - Storage Configuration (#5142)
* unified repo storge config

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

* add UT

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-07-29 16:06:18 +08:00
qiuming
f2ef40c983 Merge pull request #5157 from blackpiglet/modify-changelog-check-action-condition
Add labeled and unlabeled events for PR changelog check action.
2022-07-29 16:00:33 +08:00
Xun Jiang
cd643bbac9 Add labeled and unlabeled events for PR changelog check action.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-07-28 17:45:26 +08:00
Daniel Jiang
5f15f02812 Merge pull request #5151 from OrlinVasilev/fix-zoom-link
Fix zoom link for new meeting
2022-07-27 09:05:03 +08:00
OrlinVasilev
a109a11851 Fix zoom link for new meeting
Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-07-26 14:46:42 +03:00
qiuming
f68ae92fd0 Merge pull request #5145 from blackpiglet/5140-fix-restic-backup-with-customize-CA
Delay CA file deletion in PVB controller
2022-07-26 10:32:59 +08:00
Xun Jiang
396e68b810 VolumeSnapshotLocation refactor with kubebuilder.
1. modify VSL CRD API file name. Add kubebuilder related marker.
2. Add Labels init code for VSL create command.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-07-25 15:46:43 +08:00
Daniel Jiang
b5583bc2d9 Merge pull request #5129 from kaovilai/initialize-typo
comment typo initialise -> initialize
2022-07-25 13:45:00 +08:00
Xun Jiang
82ac228a01 Delay CA file deletion in PVB controller
Fix #5140.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-07-22 19:36:17 +08:00
Daniel Jiang
abe601042c Merge pull request #5135 from reasonerjt/update-crd-for-kopia
Update the CRD for kopia integration
2022-07-22 10:04:08 +08:00
Daniel Jiang
f562a7ce2b Update the CRD for kopia integration
This commit adds additional fields to podvolumebackup
and podvolumerestore.  The resticrepository will be renamed to
backuprepository

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-07-22 00:10:24 +08:00
lyndon
67d98fe12c Merge pull request #4926 from Lyndon-Li/main
Unified Repository Design
2022-07-21 09:42:42 +08:00
lyndon
be820e09ba Merge branch 'vmware-tanzu:main' into main 2022-07-21 09:07:21 +08:00
Lyndon-Li
c845f0c5ea fix typo
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-07-20 18:05:28 +08:00
Lyndon-Li
7a38aa5e0f fix alignment
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-07-20 17:50:14 +08:00
Lyndon-Li
3a802e160b change storage config
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-07-20 17:42:06 +08:00
Xun Jiang/Bruce Jiang
68730cbe3a Merge pull request #5122 from sseago/bsl-validation4
Modify BackupStoreGetter to avoid BSL spec changes
2022-07-19 11:27:57 +08:00
qiuming
2464fcd717 Merge pull request #5128 from reasonerjt/make-shell-goproxy
Let "make shell xxx" respect GOPROXY
2022-07-19 10:57:20 +08:00
Tiger Kaovilai
9a5c3aceff typo initialise -> initialize
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-07-18 12:05:10 -04:00
Scott Seago
64a8c44104 Modify BackupStoreGetter to avoid BSL spec changes
Pass in a new copy of the map of config values rather than
modifying the BSL Spec.Config and then pass in that field.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-07-18 10:31:35 -04:00
Daniel Jiang
9173ac117e Let "make shell xxx" respect GOPROXY
This commit mitigates the issue for running "make update" locally when
the network is not friendly for accessing the default "proxy.golang.org"

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-07-18 19:22:50 +08:00
qiuming
56939937a8 Merge pull request #5107 from danfengliu/fix-doc-issue-of-resource-filtering
Fix resource filtering command issue in Doc
2022-07-18 10:59:27 +08:00
Xun Jiang/Bruce Jiang
eaf97e7510 Merge pull request #5110 from reasonerjt/plugin-panic-trace
Dump stack trace when the plugin server handles panic
2022-07-11 22:47:17 +08:00
Daniel Jiang
9102f53131 Dump stack trace when the plugin server handles panic
Mitigate the issue mentioned in #4782
When there's a bug or misconfiguration that causes nil pointer there
will be more stack trace information to help us debug.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-07-11 02:01:13 +08:00
Scott Seago
77c1549d4d Merge pull request #5101 from ywk253100/220628_bsl
Fix bsl validation bug
2022-07-08 15:32:51 -04:00
danfengl
bf8d135876 Fix resource filtering command issue in Doc
Signed-off-by: danfengl <danfengl@vmware.com>
2022-07-08 09:35:07 +00:00
Wenkai Yin(尹文开)
f550f8e3cd Fix bsl validation bug
Fix bsl validation bug: the BSL is validated continually and doesn't respect the validation period configured

Fixes #5056

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-07-06 14:20:03 +08:00
qiuming
267db7a931 Merge pull request #5051 from niulechuan/fix-typo-in-doc
Fix typo in doc (https://velero.io/docs/main/restore-reference/ "Restore order" section)
2022-07-04 14:55:07 +08:00
niulechuan
fb897471c0 Move 'velero.io/exclude-from-backup' label string to const (#5053)
* move 'velero.io/exclude-from-backup' label name to const

Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>

* add changelog file (in changelogs/unreleased) of this PR

Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>
2022-07-04 14:31:20 +08:00
Daniel Jiang
ff556c848b Merge pull request #5065 from reasonerjt/yonghui-as-maintainer
Propose Yonghui as a maintainer
2022-07-02 07:40:47 +08:00
Daniel Jiang
c633f68ac0 Propose Yonghui as a maintainer
Yonghui joined the velero team earlier this year.

He has been leading the effort for kopia integration, and delivered the
comprehensive comparison report for kopia .vs. restic
https://docs.google.com/document/d/1BMLuRzEpYWYE-Ci_eLg8gWbjDv4DSyqj/edit

and the detailed design for using kopia as the unified repository:
https://github.com/vmware-tanzu/velero/pull/4926

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-06-30 18:14:16 +08:00
Lyndon-Li
fd31336c4a add user perspective
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-06-30 14:47:49 +08:00
Niu Lechuan
c6625d1424 add changelog file for this PR
Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>
2022-06-30 10:09:29 +08:00
Lyndon-Li
c3f8e91f73 remove storage configuration redundancy
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-06-29 19:07:25 +08:00
Lyndon-Li
b605bf4f07 add CR samples
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-06-29 11:27:14 +08:00
Lyndon-Li
d63394ff60 minor changes
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-06-28 22:30:26 +08:00
Lyndon-Li
12cdb1908e storage configuration
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-06-28 19:07:34 +08:00
Wenkai Yin(尹文开)
2778d54e3f Merge pull request #5052 from blackpiglet/modify-github-actions
Modify Github actions.
2022-06-28 14:02:23 +08:00
Lyndon-Li
a08463adba dynamic switch
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-06-28 13:36:09 +08:00
Lyndon-Li
34e6234ae0 add more details for repository CR rename
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-06-27 20:14:41 +08:00
Xun Jiang
7b320e71c9 Modify Github actions.
1. remove go.sum file from code spell check action.
2. change go version to 1.17 in CRD verify action, and add k8s 1.23 and 1.24 in verification list.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-06-27 15:15:19 +08:00
Lyndon-Li
b62a122632 Post Review Update 02
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-06-27 12:39:49 +08:00
Niu Lechuan
0470c961bf Fix typo in doc. 'Mamespace' to 'Namespace'
Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>
2022-06-27 10:11:47 +08:00
Daniel Jiang
ec5503fcc6 Merge pull request #5041 from blackpiglet/remove-issue-triage-action
Delete opened issues triage action.
2022-06-23 17:27:21 +08:00
Xun Jiang
cb273ae469 Delete opened issues triage action.
Because the column and project specified by this action do not exist anymore, and Velero team doesn't use this action to assign issue and triage anymore, remove this action.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-06-22 10:46:54 +08:00
qiuming
9f379baa52 Merge pull request #5038 from danfengliu/fix-wait-for-pod-func-in-e2e-test
Fix wait for pod func in e2e test
2022-06-21 16:13:49 +08:00
danfengl
b9fe1539f0 Wait for pod running status before timeout despite errors of accessing API server
Signed-off-by: danfengl <danfengl@vmware.com>
2022-06-21 08:03:18 +00:00
danfengl
e07b13ce8e Merge branch 'main' of https://github.com/vmware-tanzu/velero into main 2022-06-21 06:39:50 +00:00
lyndon
b135abf484 Merge branch 'vmware-tanzu:main' into main 2022-06-17 12:30:08 +08:00
Lyndon-Li
aea127652c Post Review Session Update
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-06-17 09:22:25 +08:00
Scott Seago
6378c266c3 Merge pull request #4980 from anshulahuja98/main
Add support to download CSI json from object store
2022-06-16 10:37:55 -04:00
Daniel Jiang
fb029fdd47 Merge pull request #5008 from sseago/restore-status-fix
When spec.RestoreStatus is empty, don't restore status
2022-06-16 14:48:19 +08:00
Scott Seago
79be75e183 When spec.RestoreStatus is empty, don't restore status
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-06-15 13:02:31 -04:00
Anshul Ahuja
d581ab6571 fix crds.go
Signed-off-by: GitHub <noreply@github.com>
2022-06-15 14:17:35 +00:00
Anshul Ahuja
a27b74a004 auto generated file
Signed-off-by: GitHub <noreply@github.com>
2022-06-15 14:17:35 +00:00
Anshul Ahuja
7b51bfe03d Merge branch 'main' into main 2022-06-15 14:16:38 +05:30
Wenkai Yin(尹文开)
c2d1e5f99d Merge pull request #4999 from qiuming-best/tag-release
Fix tag release script error
2022-06-14 18:00:27 +08:00
Ming
ef02113b49 Fix tag release error
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-14 09:34:05 +00:00
Xun Jiang/Bruce Jiang
d4083fe3e2 Merge pull request #4996 from danfengliu/fix-bsl-deletion-test-bucket-issue
Fix wrong bucket issue in BSL deletion E2E test
2022-06-14 16:32:34 +08:00
qiuming
c33e8a758a Merge pull request #4995 from danfengliu/bumpup-plugin-version-for-velero-1.9
Bumpup plugin version for Velero 1.9 E2E test
2022-06-14 16:30:32 +08:00
danfengl
0c069b3098 Bumpup plugin version for Velero 1.9 E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-06-14 08:22:31 +00:00
danfengl
0d9af1017b Fix wrong bucket issue in BSL deletion E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-06-14 08:14:12 +00:00
Xun Jiang/Bruce Jiang
99b7f8f679 Merge pull request #4993 from qiuming-best/pin-images
Pin the base and golang images for v1.9.0 release and add explanation for gen-docs
2022-06-14 15:21:03 +08:00
Xun Jiang/Bruce Jiang
dde3ea2dcc Merge pull request #4994 from qiuming-best/make-docs
Add more explanation for gen-docs parameters
2022-06-14 15:17:56 +08:00
Ming
3bb6252d15 Pin the base image and golang image for v1.9.0 release
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-14 07:07:52 +00:00
Ming
feb411cc3f Add more explanation for gen-docs parameters
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-14 07:06:27 +00:00
Ming
c78b10e150 Add more explanation for gen-docs parameters
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-14 06:47:18 +00:00
Xun Jiang/Bruce Jiang
0224816714 Merge pull request #4991 from qiuming-best/v1.9-doc-fix
Amend doc 1.9 version
2022-06-14 11:02:06 +08:00
Ming
8a8b9d07db Amend doc 1.9 version
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-14 10:22:27 +08:00
Anshul Ahuja
fad4b0e99f auto generated file
Signed-off-by: GitHub <noreply@github.com>
2022-06-13 16:00:17 +00:00
Xun Jiang/Bruce Jiang
03e3401c96 Merge pull request #4989 from danfengliu/enhance-checkpoint-for-bsl-deletion
Enhance checkpoint of bsl deletion
2022-06-13 23:43:59 +08:00
Anshul Ahuja
a30b61b3d7 Add changelog
Signed-off-by: GitHub <noreply@github.com>
2022-06-13 13:37:47 +00:00
Anshul Ahuja
a0ff46a3de Add kubebuilder annotation for autogen
Signed-off-by: GitHub <noreply@github.com>
2022-06-13 13:28:26 +00:00
Anshul Ahuja
735d506a7d Add support to download CSI json from object store
Signed-off-by: GitHub <noreply@github.com>
2022-06-13 13:28:26 +00:00
Daniel Jiang
5bb1cf550f Merge pull request #4990 from qiuming-best/docs-v1.9
Add Changelog and Docs for v1.9
2022-06-13 20:24:17 +08:00
Ming
423e7f9f63 Add Changelog and Docs for v1.9
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-13 09:25:59 +00:00
danfengl
463202951d Enhance checkpoint of bsl deletion
Signed-off-by: danfengl <danfengl@vmware.com>
2022-06-13 08:32:31 +00:00
qiuming
7519014125 Merge pull request #4988 from blackpiglet/add-more-info-for-get-path-or-snapshot-fail-by-restic
Add more information for failing to get path or snapshot in restic ba…
2022-06-13 14:38:41 +08:00
Xun Jiang
806234e043 Add more information for failing to get path or snapshot in restic backup and restore.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-06-13 11:32:55 +08:00
qiuming
fee46d4f38 Merge pull request #4986 from reasonerjt/update-release-instruction
Update release instruction
2022-06-13 10:08:06 +08:00
Xun Jiang/Bruce Jiang
778bbffc35 Merge pull request #4981 from ywk253100/220610_status
Bugs fixing: use patch to update status and set default GC period
2022-06-13 09:20:01 +08:00
Daniel Jiang
dd984031f4 Update release instruction
Update the release steps to reflect the change in the `tag-release.sh`,
that the release branch must be created manually before RC is tagged.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-06-13 01:13:16 +08:00
Wenkai Yin(尹文开)
d16bdf1f80 Bugs fixing: use patch to update status and set default GC period
1. Use patch rather status patch in backup sync controller as we have disable status as sub resource
2. Set the GC period with default value if it isn't set

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-06-10 17:15:19 +08:00
Wenkai Yin(尹文开)
c3a32a116f Merge pull request #4976 from reasonerjt/vsc-policy-reset-undo
Undo setting the VSC's deletion policy during backup
2022-06-10 09:12:46 +08:00
Daniel Jiang
f5649bcc1f Undo setting the VSC's deletion policy during backup
It's not necessary to set the deletion policy as the delete item action
plugin in CSI plugin will set it to Delete when the backup is deleted.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-06-09 16:26:05 +08:00
Wenkai Yin(尹文开)
18f847fb7d Merge pull request #4972 from ywk253100/220607_subresource
Disable status as sub resource in CRDs
2022-06-09 14:50:06 +08:00
Wenkai Yin(尹文开)
262c9a5fa4 Merge pull request #4975 from qiuming-best/shedule-order-test-fix
Fix ordered resources cmd Stdout already set error
2022-06-09 13:52:19 +08:00
Ming
c2ddc6ead4 Fix ordered resources cmd Stdout already set error
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-09 03:52:34 +00:00
Wenkai Yin(尹文开)
34087fe5f4 Disable status as sub resource in CRDs
When enabling the status as sub resource in CRD, the status will be ignored when creating the CR with status, this will cause issues when syncing backups/pvbs

Fixes #4950

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-06-09 07:52:08 +08:00
Daniel Jiang
de9ee22e26 Merge pull request #4966 from ywk253100/220606_mark_failed
Mark in-progress CRs as failed when starting the server
2022-06-08 14:29:37 +08:00
Daniel Jiang
59c2eaf3dd Merge pull request #4968 from blackpiglet/4949-backups-deletion-restic-failure
Fix E2E test [Backups][Deletion][Restic] on GCP
2022-06-08 10:58:47 +08:00
Xun Jiang
febe79f334 Fix E2E test [Backups][Deletion][Restic] on GCP.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-06-08 09:23:58 +08:00
Wenkai Yin(尹文开)
6fa4d7d606 Mark in-progress CRs as failed when starting the server
Mark in-progress CRs as failed when starting the server

Fixes #4953

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-06-07 17:02:17 +08:00
Wenkai Yin(尹文开)
d4e54f29aa Merge pull request #4965 from qiuming-best/nightly-fix
Fix nightly running failure
2022-06-06 17:41:20 +08:00
Ming
56f72797db Fix nightly running failure
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-06 06:47:01 +00:00
Daniel Jiang
9af031b84a Merge pull request #4940 from shubham-pampattiwar/shubham-pampattiwar-maintainer
Add site bio/img for maintainer/contributor shubham-pampattiwar
2022-05-30 11:57:08 +08:00
Abigail McCarthy
22e0afaa2a Add more details about restore workflow (#4928)
* Add more details about restore workflow

Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-30 10:58:21 +08:00
Shubham Pampattiwar
0df7dc5070 add site bio/img for maintainer/contributor shubham-pampattiwar
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2022-05-26 22:54:16 -04:00
Lyndon-Li
9bb0ed5e42 Add Installation Examples
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-05-26 20:29:04 +08:00
Xun Jiang/Bruce Jiang
5c48307b5a Merge pull request #4932 from reasonerjt/csi-doc-change
Update the doc of CSI support
2022-05-26 14:23:08 +08:00
qiuming
4e166e21b0 Merge pull request #4936 from ywk253100/220525_kind
Bump up kind version to support Kubernetes 1.24
2022-05-26 09:30:03 +08:00
Daniel Jiang
383eec1eed Update the doc of CSI support
We have made a few changes to the CSI plugin to provide official support
for AWS/Azure.  This commit makes change to the docs to reflect those
changes.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-05-25 23:20:41 +08:00
Wenkai Yin(尹文开)
e5821f19d2 Bump up kind version to support Kubernetes 1.24
Bump up kind version to support Kubernetes 1.24

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-05-25 16:34:57 +08:00
lyndon
970f05260d Merge branch 'vmware-tanzu:main' into main 2022-05-25 10:51:22 +08:00
qiuming
e020b76346 Merge pull request #4934 from a-mccarthy/add-vsl-details
Add details about using multiple volume snapshot locations and restic
2022-05-25 10:19:48 +08:00
qiuming
dfca4dba15 Merge pull request #4911 from a-mccarthy/fixes-1919
Add note about restoring when resource scaled to 0
2022-05-25 10:05:50 +08:00
Scott Seago
a79c1a5877 Merge pull request #4785 from RafaeLeal/restore-status
Add ability to restore status on selected resources
2022-05-24 09:41:18 -04:00
qiuming
5ab51e83fc Merge pull request #4927 from sseago/shubham-maintainer
Propose Shubham Pampattiwar as a maintainer
2022-05-24 19:56:32 +08:00
Rafael Leal
200769a077 Add changelog
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-24 00:14:02 -03:00
Rafael Leal
7e8f1dcf6f Add docs
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-24 00:11:53 -03:00
Abigail McCarthy
8a156d69b9 Add details about using multiple volume snapshot locations and restic
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-23 22:19:10 -04:00
Rafael Leal
e0e3016efa Cleanup resetStatus
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-23 17:53:32 -03:00
Scott Seago
471e357952 Merge pull request #4914 from blackpiglet/4912-fix-completion-zsh
Make velero completion zsh command output can be used by `source` com…
2022-05-23 10:05:12 -04:00
qiuming
3552350780 Merge pull request #4925 from a-mccarthy/fix-4848
Update docs for flag to skip TLS validation
2022-05-23 14:52:52 +08:00
Daniel Jiang
271aa500b2 Merge pull request #4906 from a-mccarthy/fix-4846
Update compatibility matrix for 1.9
2022-05-21 03:45:48 +08:00
Xun Jiang/Bruce Jiang
4b274be78a Merge pull request #4919 from a-mccarthy/fix-2167
Update cluster migration scenario with more details
2022-05-20 15:39:51 +08:00
Abigail McCarthy
61b0d990fa fix flag typo
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-19 22:37:02 -04:00
Rafael Leal
131c8a920f Remove break line
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-19 17:36:21 -03:00
Scott Seago
0aafba2cd8 Propose Shubham Pampattiwar as a maintainer
Shubham Pampattiwar has made several contributions to Velero,
most recently in designing and implementing two v1.9
features, including the following:
- [Add design for enabling multiple label support](https://github.com/vmware-tanzu/velero/pull/4619)
- [Add multiple label selector support to Velero Backup and Restore APIs](https://github.com/vmware-tanzu/velero/pull/4650)
- [Add design for enabling support for ExistingResourcePolicy to restore API](https://github.com/vmware-tanzu/velero/pull/4613)
- [Add existingResourcePolicy to Restore API](https://github.com/vmware-tanzu/velero/pull/4628)

Shubham has also been driving forward the data mover requirements and design discussions for velero 1.10:
- [Add datamover design](https://github.com/vmware-tanzu/velero/pull/4768)

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-05-19 11:35:20 -04:00
Abigail McCarthy
20da7c8bca Include moer details
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-19 10:12:27 -04:00
Lyndon-Li
bf467e3ac3 Unified Repository Design
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-05-19 16:48:34 +08:00
Abigail McCarthy
95ccbb617a Update docs for flag to skip TLS validation
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-18 23:20:00 -04:00
Rafael Leal
69b8de86dc Merge pull request #1 from RafaeLeal/lyndon-li-suggestions
Refactor to simplify
2022-05-18 23:51:46 -03:00
Wenkai Yin(尹文开)
51de990a8a Merge pull request #4913 from qiuming-best/order-resources-test
Add schedule ordered resources E2E test
2022-05-18 16:32:35 +08:00
Daniel Jiang
a1c999f214 Merge pull request #4882 from a-mccarthy/fix-4730
Update headers in supported providers page
2022-05-18 15:37:32 +08:00
Daniel Jiang
f6eb5c1321 Merge pull request #4921 from a-mccarthy/fix-3136
Adds information about resticRepoPrefix
2022-05-18 15:30:54 +08:00
Daniel Jiang
1634d21824 Merge pull request #4903 from a-mccarthy/fix-4285
Add supported versions statment to support process page
2022-05-18 15:30:37 +08:00
qiuming
8240079e8a Merge pull request #4918 from a-mccarthy/fix-4116
Add resource limits testing information
2022-05-18 14:00:24 +08:00
Abigail McCarthy
c6d568ad12 Make updates from review
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-17 23:02:28 -04:00
Abigail McCarthy
c46199c880 Adds informaiton about resticRepoPrefix
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-17 13:05:17 -04:00
Abigail McCarthy
864cba69e2 Fix typos
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-17 12:14:33 -04:00
Abigail McCarthy
0e649b9d3f Fix typos
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-17 12:09:49 -04:00
Ming
6b9b13790e Add schedule ordered resources test
Signed-off-by: Ming <mqiu@vmware.com>
2022-05-17 14:10:05 +00:00
Rafael Leal
bcef5e1d5e Refactor to simplify
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-17 10:39:14 -03:00
Xun Jiang/Bruce Jiang
2dfeb0f077 Merge pull request #4920 from ywk253100/220516_flag
Enhance the map flag to support parsing input value contains entry delimiters
2022-05-17 16:19:00 +08:00
Wenkai Yin(尹文开)
44199db79d Enhance the map flag to support parsing input value contains entry delimiters
Enhance the map flag to support parsing input value contains entry delimiters

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-05-17 13:56:41 +08:00
Xun Jiang
3db40a58a4 Make velero completion zsh command output can be used by source command.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-05-17 10:01:46 +08:00
Abigail McCarthy
be040fca39 Update cluster migration scenario with more details
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-16 13:27:51 -04:00
Abigail McCarthy
dcf056235c Add resource limits testing information
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-16 11:08:24 -04:00
Abigail McCarthy
a7ebaa0506 Update wording and add more useful links
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-16 09:39:54 -04:00
Abigail McCarthy
1a325a6706 Merge pull request #4729 from kaovilai/doc_failed_orphaned
Clarify backups that get deleted via object storage sync
2022-05-16 09:13:46 -04:00
Xun Jiang/Bruce Jiang
15851ac9aa Merge pull request #4884 from a-mccarthy/fix-3806
Update resource filtering page
2022-05-16 13:21:40 +08:00
Wenkai Yin(尹文开)
9577ded2fd Merge pull request #4881 from a-mccarthy/fix-4500
Add aws limitation for migration and add limitation section
2022-05-16 10:22:09 +08:00
Xun Jiang/Bruce Jiang
74d36e548e Merge pull request #4896 from danfengliu/add-backup-ttl-e2e-test
Add setting TTL in backup E2E test
2022-05-16 09:32:15 +08:00
JenTing Hsiao
d111cc5fc4 Remove jenting from maintainers (#4888)
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-05-15 09:07:13 +02:00
Rafael Leal
1537bf5d62 Update CRD
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-13 15:36:03 -03:00
Abigail McCarthy
8f31bff1b5 Add note about restoring when resource scaled to 0
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-13 12:37:58 -04:00
danfengl
18621a0e13 Add setting TTL in backup E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-05-13 06:52:47 +00:00
Rafael Leal
d85ed612cb Cleanup
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 12:01:00 -03:00
Rafael Leal
206709b978 Cleanup
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 12:01:00 -03:00
Rafael Leal
8ecc11fad2 Add restore status to cli
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 12:00:34 -03:00
Rafael Leal
7f22974719 Update CRDs
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 11:59:49 -03:00
Rafael Leal
278bee1269 Update codegen
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 11:59:05 -03:00
Rafael Leal
04aa7a849f Fixes tests hopefully
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 11:59:05 -03:00
Rafael Leal
0b9d6ae73d Add restore status mechanism
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 11:59:05 -03:00
Rafael Leal
7f1f881c28 Add resource status
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 11:58:47 -03:00
Rafael Leal
e374eb9da4 Add StatusUpdater
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 11:57:41 -03:00
Rafael Leal
6a721403fb Fix DeepEqual when status is updated
Signed-off-by: Rafael Leal <rafaelealdias@gmail.com>
2022-05-12 10:47:24 -03:00
Daniel Jiang
89907bd141 Merge pull request #4872 from big-appled/cleanup-restic
cleanup restic helper folder when done
2022-05-12 09:28:30 +08:00
Daniel Jiang
9b5257663a Merge pull request #4650 from shubham-pampattiwar/add-label-selectors
Add multiple label selector support to Velero Backup and Restore APIs
2022-05-11 23:16:28 +08:00
Shubham Pampattiwar
bfdb68a35a add multiple label selector support to backup API
Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

remove backup CLI bits

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

labelselectors spec option for velero restore

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

add changelog file

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

update spec name to OrLabelSelectors

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

minor fixes

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

add validations for labelSelector and orLabelSelectors

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

update crds.gp after fixing conflicts

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

fix CI and add unit tests

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

updated OrLabelSelector spec description and added validation failure unit tests

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

add comments and change log level

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

update site docs

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

wrap pager client calls in a function

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

resolve confilcts and update crds.go

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

rebase and update crds.go

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

combine listing items for a given label

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>
2022-05-11 09:57:47 -04:00
Wenkai Yin(尹文开)
879d03398b Merge pull request #4894 from blackpiglet/bsl-refactor
Refactor BSL controller with periodical enqueue source
2022-05-11 19:23:51 +08:00
Xun Jiang
989a1e3ebb Refactor BSL controller with periodical enqueue source.
Add filter functions for PeriodicalEnqueueSource.
Move BSL's valication frequency check test case to PeriodicalEnqueueSource's test.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-05-11 15:31:47 +08:00
qiuming
d48e1d9db7 Merge pull request #4897 from ywk253100/220609_gc
Make garbage collection for expired backups configurable
2022-05-11 10:46:03 +08:00
Wenkai Yin(尹文开)
6a551e546e Make garbage collection for expired backups configurable
Make garbage collection for expired backups configurable

Fixes #4875

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-05-11 10:33:59 +08:00
Abigail McCarthy
4013c92afb Update compatibility matrix for 1.9
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-10 13:46:52 -04:00
Daniel Jiang
e51865eec1 Merge pull request #4628 from shubham-pampattiwar/add-restore-policy
Add `existingResourcePolicy` to Restore API
2022-05-10 20:28:25 +08:00
Xun Jiang/Bruce Jiang
99e49c6936 Merge pull request #4898 from ywk253100/220509_distroless
Bump up the version of distroless to base-debian11
2022-05-10 14:48:53 +08:00
Abigail McCarthy
35ac28741f fix typo
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-09 14:18:56 -04:00
Abigail McCarthy
ec9a797c63 Add supported versions statment to support process page
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-09 14:07:27 -04:00
Shubham Pampattiwar
e3106f3e10 add existingResourcePolicy to Restore API
add updateall policy option

fix updating labels

dump updateAll policy option

remove updateAll policy refs

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

add changelog file

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

update docs

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

patch labels for sa if policy is update

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

fix existingResourcePolicy for serviceaccounts

modularize changes and add unit tests

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

fix conflicts and update crds.go

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

change log level from info to error

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

update crds.go

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>
2022-05-09 13:36:24 -04:00
Orlix
db99b6ea73 Merge pull request #4899 from OrlinVasilev/update-team
Add Orlin and Abigail in the team on the site
2022-05-09 16:05:11 +03:00
OrlinVasilev
2d69c647d6 Add Orlin and Abigail in the team on the site
Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-05-09 12:59:08 +03:00
Xun Jiang/Bruce Jiang
40a36d2941 Merge pull request #4859 from qiuming-best/restic-repo-tmp
Convert Restic Repository resource/controller to the Kubebuilder framework
2022-05-09 17:57:01 +08:00
Wenkai Yin(尹文开)
ed43e8de30 Bump up the version of distroless to base-debian11
Bump up the version of distroless to base-debian11

Fixes #4867

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-05-09 17:08:34 +08:00
Ning Ding
e09c31e559 changes according to review comments
Signed-off-by: Ning Ding <834652870@qq.com>
2022-05-09 15:55:14 +08:00
Wenkai Yin(尹文开)
1d8d2bdb4f Merge pull request #4890 from sseago/restoreitemaction-label-fix
continue rather than return for non-matching restore action label
2022-05-09 14:34:03 +08:00
Ming
ef7e5a8388 change func name and repository description
Signed-off-by: Ming <mqiu@vmware.com>
2022-05-09 13:57:02 +08:00
qiuming
419f9ddc39 Merge pull request #4836 from danfengliu/add-csi-checkpoint
Add snapshot checkpoint for E2E test
2022-05-09 10:16:50 +08:00
Xun Jiang/Bruce Jiang
62dde34f86 Merge pull request #4893 from ywk253100/220506_restart
Make in-progress PVB/PVR as failed when restic controller restarts to avoid hanging backup/restore
2022-05-07 17:32:40 +08:00
Wenkai Yin(尹文开)
034cda2571 Make in-progress PVB/PVR as failed when restic controller restarts to avoid hanging backup/restore
Make in-progress PVB/PVR as failed when restic controller restarts to avoid hanging backup/restore

Fixes #4772

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-05-07 16:51:06 +08:00
danfengl
33bf59a910 Add snapshot checkpoint for CSI E2E test and fix CSI snapshot name issue
1. Add checkpoint in snapshot E2E test to verify snapshot CR should be created and snapshot should be created in cloud side after backup completion;
2. Fix snapshot name issue that CSI snapshot name in cloud side is not the same with other non-CSI cloud snapshots;

Signed-off-by: danfengl <danfengl@vmware.com>
2022-05-07 08:49:34 +00:00
Daniel Jiang
ab876acd87 Merge pull request #4886 from a-mccarthy/fix-3118
Add info about enviroment variables in pre/post hooks
2022-05-06 16:43:45 +08:00
Ming
752b28166f Merge branch 'main' of https://github.com/qiuming-best/velero into restic-repo-tmp 2022-05-06 14:43:00 +08:00
Daniel Jiang
8411c735f6 Merge pull request #4870 from ywk253100/220428_grpc2
Bump up the version of library go-plugin
2022-05-06 13:12:40 +08:00
Daniel Jiang
d6d9a0ec08 Merge pull request #4858 from blackpiglet/4761-remove-volumesnapshot-after-backup
Remove VolumeSnapshot created during backup
2022-05-06 10:27:12 +08:00
Abigail McCarthy
dd0b5fea2b Add wording for using commands in hooks
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-05 14:24:57 -04:00
Scott Seago
da916846b1 continue rather than return for non-matching restore action label
When iterating over applicable restore actions, if a non-matching label
selector is found, velero should continue to the next action rather than
returning from the restoreItem func, which ends up preventing the item's
restore entirely.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-05-05 08:37:48 -04:00
Xun Jiang
a69bd8b1f3 Remove VolumeSnapshot created during backup, when the VolumeSnapshotClass's DeletionPolicy is set to Delete.
1. Delete VolumeSnapshot directly when DeletionPolicy set to Retain.
2. Change VolumeSnapshotContent's DeletionPolicy to Retain, then delete VolumeSnapshot. After that delete VolumeSnapshotContent and change VSC DeletionPolicy to Delete back, then re-create the VolumeSnapshotContent.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-05-05 18:30:59 +08:00
Wenkai Yin(尹文开)
6a42d1c4e1 Merge pull request #4889 from blackpiglet/parallel-VolumeSnapshot-ReadToUse
Make waiting VolumeSnapshot to ready process parallel.
2022-05-05 17:12:59 +08:00
Xun Jiang
6421f8ad02 Make waiting VolumeSnapshot to ready process parallel.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-05-05 14:32:55 +08:00
Wenkai Yin(尹文开)
aa71427576 Merge pull request #4887 from reasonerjt/delete-orphan-vs
Delete orphan CSI snapshots in backup sync controller
2022-05-05 11:27:44 +08:00
Daniel Jiang
89e90d9be4 Delete orphan CSI snapshots in backup sync controller
This commit makes backup sync controller delete the volumesnapshot and
volumesnapshotcontent created by the backup which is cleaned up as orphan

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-05-05 10:54:34 +08:00
Daniel Jiang
628164668f Merge pull request #4655 from ywk253100/220214_pod_volume_restore
Convert Pod Volume Restore resource/controller to the Kubebuilder framework
2022-05-05 10:33:41 +08:00
Daniel Jiang
ad7a940032 Merge pull request #4613 from shubham-pampattiwar/add-design-existing-rs-policy
Add design for enabling support for `ExistingResourcePolicy` to restore API
2022-05-04 19:33:49 +08:00
Abigail McCarthy
99486a50f7 Add info about enviroment variables in pre/post hooks
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-03 09:44:51 -04:00
Abigail McCarthy
2e1c35fe39 Update resource filtering page
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-03 05:35:16 -04:00
Abigail McCarthy
965f6b606c Update headers in supported providers page
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-02 13:38:39 -04:00
Abigail McCarthy
d20c34fe74 Add aws limitation for migration, add limitation section
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-05-02 13:26:49 -04:00
Xun Jiang/Bruce Jiang
5b49fa0b18 Merge pull request #4869 from reasonerjt/ren-dbr-test
Change the name of UT to be more consistent
2022-04-30 10:43:54 +08:00
Xun Jiang/Bruce Jiang
03ae5723c7 Merge pull request #4619 from shubham-pampattiwar/add-design-backup-selectors
Add design for enabling multiple label support
2022-04-30 10:40:18 +08:00
Wenkai Yin(尹文开)
325feae5d4 Merge pull request #4873 from OrlinVasilev/roadmap-wiki
Update ROADMAP.md with link to wiki and wiki guidance
2022-04-29 11:30:54 +08:00
Ming
06d3d731ed Refactor restic repository
Signed-off-by: Ming <mqiu@vmware.com>
2022-04-29 10:26:00 +08:00
Ning Ding
bc15fe8d9c cleanup restic helper folder when done
Signed-off-by: Ning Ding <834652870@qq.com>
2022-04-28 20:29:46 +08:00
OrlinVasilev
19c3bf5c37 Update ROADMAP.md with link to wiki and wiki guidance
Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
2022-04-28 15:25:20 +03:00
Wenkai Yin(尹文开)
3049f6ec8c Bump up the version of library go-plugin
Bump up the version of library go-plugin to avoid blocking issue #4863

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-28 17:04:04 +08:00
Daniel Jiang
ad6c5a5ad6 Change the name of UT to be more consistent
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-04-28 14:47:37 +08:00
Shubham Pampattiwar
3589ab57e2 Add multiple label selector support to Velero backup /restore API
add initial design for enabling  multiple label support for backing up resources

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

update solution approach

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

add restore API bits

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

remove CLI bits and update examples

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

update spec name to OrLabelSelector

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

update high level design

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>
2022-04-28 02:42:31 -04:00
Xun Jiang/Bruce Jiang
001229a8b3 Merge pull request #4855 from reasonerjt/bak-delete-refact
Refactor backup deletion controller based on kubebuilder
2022-04-28 10:48:11 +08:00
Wenkai Yin(尹文开)
d42e353610 Merge pull request #4866 from reasonerjt/clusterclass-restore-order
Add ClusterClasses to the restore priority list
2022-04-28 09:04:41 +08:00
Shubham Pampattiwar
d449ca06ef design for enabling existing resource policy
add design doc for existing resource policy

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

add use-cases and update non-goals

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

update approach-1 and add policy-action table

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

minor updates

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

fix typos

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

add CLI details

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

dump updateAll option

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>

add implementation decision

Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>
2022-04-27 15:23:49 -04:00
Scott Seago
58a8371ca2 Merge pull request #4833 from ywk253100/220413_restart
Make in-progress backup/restore as failed when doing the reconcile
2022-04-27 11:45:01 -04:00
Daniel Jiang
74fd158a1c Refactor backup deletion controller based on kubebuilder
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-04-27 17:00:54 +08:00
Daniel Jiang
f89691c5c1 Add ClusterClasses to the restore priority list
Make sure ClusterClasses are stored before Clusters.
Fixes #4767

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-04-27 15:53:55 +08:00
Scott Seago
40261dce25 Merge pull request #4684 from jenting/issue-3679
Document steps to update helm chart for each Velero GA release
2022-04-26 13:19:59 -04:00
Wenkai Yin(尹文开)
c2c211fefb Convert Pod Volume Restore resource/controller to the Kubebuilder framework
Convert Pod Volume Restore resource/controller to the Kubebuilder framework

Fixes #4134

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-26 16:23:38 +08:00
qiuming
f7a05ceb04 Merge pull request #4850 from a-mccarthy/fixes-1712
Add docs for deleting backups
2022-04-26 14:14:09 +08:00
Wenkai Yin(尹文开)
dfc86566b8 Make in-progress backup/restore as failed when doing the reconcile
Make in-progress backup/restore as failed when doing the reconcile to avoid hanging in in-progress status

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-26 11:05:03 +08:00
Daniel Jiang
35e9d2ff96 Merge pull request #4854 from blackpiglet/add-metric-for-csi-snapshot
Modify CSI VolumeSnapshot metric related code.
2022-04-26 10:25:13 +08:00
JenTing Hsiao
7aba37f92b Document steps to update helm chart for each Velero GA release
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2022-04-26 09:40:50 +08:00
Abigail McCarthy
dca7497d5c Remove DeletedBackupRequest information
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-04-25 10:53:46 -04:00
Xun Jiang
22dd0b2ebb Modify CSI VolumeSnapshot metric related code.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-23 12:59:56 +08:00
Daniel Jiang
3ec96e2eac Merge pull request #4838 from ywk253100/220418_marker
Use controller-gen to generate the deep copy methods for objects
2022-04-21 14:00:48 +08:00
Abigail McCarthy
8f08d9923a Add docs for deleting backups
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-04-20 14:58:26 -04:00
Xun Jiang/Bruce Jiang
ff4f63b6e3 Merge pull request #4844 from ywk253100/220418_schedule
Return the error when running reconcile to trigger the handling logic again
2022-04-20 17:57:20 +08:00
Wenkai Yin(尹文开)
9e786d681b Merge pull request #4832 from reasonerjt/fix-rm-csi-bak-tmp
Make the vsc created by backup sync controller deletable
2022-04-20 17:19:09 +08:00
Scott Seago
de17605c62 Merge pull request #4769 from jibutech/4754-fix
Skip povdolumerestore creation when restore excludes pv/pvc
2022-04-19 11:54:30 -04:00
Abigail McCarthy
4d9feeaf47 Merge pull request #4490 from kaovilai/patch-2
Clarify restore hook includedResources when not specified
2022-04-19 09:59:31 -04:00
Daniel Jiang
4f9e445142 Make the vsc created by backup sync controller deletable
Fixes #4760

This commit make changes in 2 parts:
1) When a volumesnapshotcontent is persisted during backup, velero will reset its
   `Source` field to remove the VolumeHandle, so that the
   csi-snapshotter will not try to call `CreateSnapshot` when its synced
   to another cluster with a backup.
2) Make sure the referenced volumesnapshotclasses are persisted and
   synced with the backup, so that when the volumesnapshotcontent is
   deleted the storage snapshot is also removed.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-04-19 15:06:59 +08:00
qiuming
2f83bb8b2b Merge pull request #4839 from blackpiglet/add-skip-tls-verify-for-restic
Update integrated Restic version and add insecureSkipTLSVerify for Re…
2022-04-19 14:21:09 +08:00
Wenkai Yin(尹文开)
fb48c5a301 Return the error when running reconcile to trigger the handling logic again
Return the error when running reconcile to trigger the handling logic again

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-19 09:23:40 +08:00
Tiger Kaovilai
82fab3f275 Update site/content/docs/main/api-types/restore.md
Co-authored-by: JenTing Hsiao <jenting@gitpod.io>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-04-18 16:03:42 -04:00
Xun Jiang
8064421e83 Update integrated Restic version and add insecureSkipTLSVerify for Restic CLI
1. Add --insecure-tls for ResticManager's commands.
2. Add --insecure-tls in PodVolumeBackup and PodVolumeRestore controller.
3. Upgrade integrated Restic version to v0.13.1
4. Change --last flag in Restic command to --latest=1 due to Restic version update.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-18 21:29:33 +08:00
Wenkai Yin(尹文开)
28bc8b7eef Use controller-gen to generate the deep copy methods for objects
As we are refactoring controllers with kubebuilder, use the controller-gen rather than code-generator to generate the deep copy methods for objects

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-18 21:18:00 +08:00
qiuming
65db2585fb Merge pull request #4822 from yuvalman/patch-1
fix: use the right kind in getRestartableProcess logger
2022-04-15 16:58:46 +08:00
qiuming
9373c8a383 Merge pull request #4818 from blackpiglet/2499-add-metric-for-csi-snapshot
Add CSI VolumeSnapshot related metrics.
2022-04-15 16:55:37 +08:00
Xun Jiang
9aa4e9e860 Update according to comments. Remove csiVolumeSnapshotsStorageTotal related code.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-15 08:05:56 +00:00
Xun Jiang/Bruce Jiang
22189e8e19 Merge pull request #4436 from codegold79/3454-convert-pod-volume-backup-controller-to-kubebuilder-v3-framework
Convert Pod Volume Backup resource/controller to the Kubebuilder V3 framework
2022-04-15 15:07:09 +08:00
Xun Jiang/Bruce Jiang
dcc7b939a4 Merge pull request #4817 from yuvalman/deleteEmptyBackup
fix: delete empty backups
2022-04-15 14:32:44 +08:00
Wenkai Yin(尹文开)
8ddbe5120e Merge pull request #4831 from qiuming-best/fix-ttl
Fix default-backup-ttl not work
2022-04-15 14:30:37 +08:00
Xun Jiang/Bruce Jiang
c115a37b27 Merge pull request #4797 from blackpiglet/4758-avoid-duplicate-snapshot-for-csi
Avoid duplicated snapshotting, when CSI is enabled
2022-04-14 19:49:34 +08:00
Ming
c17172f4ef Fix default-backup-ttl not work
Signed-off-by: Ming <mqiu@vmware.com>
2022-04-14 15:11:44 +08:00
I538157
74db20993b fix: delete empty backups
Signed-off-by: Yuval Manor <yuvalman958@gmail.com>
2022-04-12 13:13:56 +03:00
yuvalman
4d0005640d fix: use the right kind in getRestartableProcess logger
Signed-off-by: Yuval Manor <yuvalman958@gmail.com>
2022-04-11 16:46:18 +03:00
Xun Jiang
4daeec7ab9 Update CRD and GRPC.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-09 12:35:09 +00:00
Xun Jiang/Bruce Jiang
9f83fc57c9 Merge pull request #4748 from ywk253100/220309_schedule_kubebuilder
Refactor schedule controller with kubebuilder
2022-04-09 12:00:33 +08:00
Xun Jiang
368a1ddf3c Add CSI VolumeSnapshot related metrics.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-09 00:57:28 +08:00
Xun Jiang
5c74aa22e6 Avoid duplicated snapshotting, when CSI is enabled
Fix #4758

Do not take snapshot for PV to avoid duplicated snapshotting, when CSI feature is enabled.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-07 23:32:48 +08:00
Wenkai Yin(尹文开)
016ac129c6 Refactor schedule controller with kubebuilder
Refactor schedule controller with kubebuilder

fixes #4671

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-07 17:32:52 +08:00
qiuming
20c2073428 Merge pull request #4810 from danfengliu/fix-after-each-issue
Add debug switcher for E2E test
2022-04-06 17:34:02 +08:00
Wenkai Yin(尹文开)
bb3c5f8e5a Merge pull request #4807 from kaovilai/go-install-velero
Rename binary generated by go install cmd/*
2022-04-06 16:33:05 +08:00
danfengl
7b35f94f84 Add debug switcher for E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-04-06 06:50:47 +00:00
Xun Jiang/Bruce Jiang
4f358af902 Merge pull request #4789 from danfengliu/add-csi-plugin-in-e2e-test
Add csi plugin in e2e test
2022-04-04 09:56:12 +08:00
Tiger Kaovilai
d5e299779a Rename binary generated by go install cmd/*
- go install cmd/velero/velero.go
- go install cmd/velero-restic-restore-helper/velero-restic-restore-helper.go

Will generate binary in `$(go env GOPATH)/bin/` with the correct name.

build.sh still works the same.

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-04-01 15:00:39 -04:00
danfengl
658699636d Support CSI plugin in E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-04-01 11:26:26 +00:00
Daniel Jiang
7c40949992 Merge pull request #4800 from reasonerjt/bump-up-csi-to-v1
Bump up to v1 API for CSI snapshot
2022-04-01 13:46:00 +08:00
Wenkai Yin(尹文开)
ca358809c2 Merge pull request #4798 from ywk253100/220331_build_image
Fix bug when pushing the build-image
2022-04-01 10:45:20 +08:00
Daniel Jiang
04f59ce003 Bump up to v1 API for CSI snapshot
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-03-31 22:55:03 +08:00
Wenkai Yin(尹文开)
119af85325 Fix bug when pushing the build-image
Checkout 2 commits to avoid mismatch of image tag when pushing the build-image

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-03-31 17:14:28 +08:00
half-life666
e24c8845c4 Skip podvolumerestore creation when restore excludes pv/pvc
Signed-off-by: half-life666 <half-life@jibudata.com>
2022-03-31 09:27:33 +08:00
danfengl
2c5c9246e6 Add CSI plugin in E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-03-30 13:09:26 +00:00
Wenkai Yin(尹文开)
3b75ae8ccc Merge pull request #4773 from danfengliu/add-n-2-upgrade-test
Support multi-upgrade-path in upgrade E2E test
2022-03-30 19:56:00 +08:00
danfengl
54a0ee6496 Support multi-upgrade-path in upgrade E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-03-30 07:39:24 +00:00
qiuming
cdb346f7fd Merge pull request #4778 from blackpiglet/add-kibishii-direcotry-parameter-for-e2e
Add parameter for e2e test to support modify kibishii install path.
2022-03-29 17:24:35 +08:00
Wenkai Yin(尹文开)
0b8f19e4d4 Merge pull request #4779 from reasonerjt/fix-restore-hook
Ensure the restore hook applied to new namespace based on the mapping
2022-03-29 14:07:08 +08:00
Wenkai Yin(尹文开)
f0ee3ccd0e Merge pull request #4774 from shubham-pampattiwar/add-bsl-vsl-param-links
Add backupStorageLocation and volumeSnapshotLocation parameter links
2022-03-28 14:27:25 +08:00
Daniel Jiang
2939914113 Ensure the restore hook applied to new namespace based on the mapping
fixes #4720

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-03-28 10:24:47 +08:00
Xun Jiang
fa646888ef Add parameter for e2e test to support modify kibishii install path.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-03-27 20:33:26 +08:00
Scott Seago
8e4f88db68 Merge pull request #4295 from mercedes-benz/tobiasgiese/items-metrics
Add metrics backup_items_total and backup_items_errors
2022-03-25 16:40:43 -04:00
Shubham Pampattiwar
2ae502481f add bsl and vsl parameter links
Signed-off-by: Shubham Pampattiwar <shubhampampattiwar7@gmail.com>
2022-03-25 13:09:01 -04:00
Tiger Kaovilai
d1fdaecc94 Add labels to expired backups failing garbage collection. (#4757)
* Add bsl related TTL gc errors to labelSelectors
* if backup label map is nil, make map
* clear label if not BSL error

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-03-25 17:01:55 +08:00
Wenkai Yin(尹文开)
2f0d0ac456 Merge pull request #4771 from jonasrosland/update-community-mgr
Update community managers in MAINTAINERS.md
2022-03-25 11:09:09 +08:00
Jonas Rosland
1577a817fd Update community managers in MAINTAINERS.md
Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2022-03-23 11:20:32 -04:00
Wenkai Yin(尹文开)
38c83d608a Merge pull request #4736 from danfengliu/add-e2e-test-of-bsl-deletion
Add E2E test of bsl deletion
2022-03-23 14:34:00 +08:00
Wenkai Yin(尹文开)
33026a0fbe Merge pull request #4766 from LinuxSuRen/fix-var-collides
Fix the golang lint error: Variable 'session' collides with imported package name
2022-03-23 14:30:16 +08:00
Tobias Giese
1b8da68fc2 metrics: add items gauges
Signed-off-by: Tobias Giese <tobias.giese@daimler.com>
2022-03-22 18:36:55 +01:00
rick
bd17d32885 Fix the golang lint error: Variable 'session' collides with imported package name
Signed-off-by: rick <1450685+LinuxSuRen@users.noreply.github.com>
2022-03-22 21:44:43 +08:00
Xun Jiang/Bruce Jiang
9df0394359 Merge pull request #4740 from phuongatemc/add-priorityclass-to-podaction-plugin
Add priorityclass to podaction plugin
2022-03-22 19:43:04 +08:00
Hoang, Phuong
0171a91366 Correct copyright comment and string compare
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-21 12:01:26 -04:00
Jonas Rosland
e7a1c3d4dc Remove blocking indexing of our versioned docs (#4750)
Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2022-03-21 16:58:13 +08:00
Scott Seago
09ec3ba994 Insert all restore errors and warnings into restore log (#4743)
This allows a user inspecting the restore logs to see any
errors or warnings generated by the restore so that they
will be seen even without having to use the describe cli.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-03-21 14:29:03 +08:00
Daniel Jiang
0e0d42b5f2 Plugin versioning design (#4698)
* Add plugin versioning design doc

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>

* Use more generic versions in scenarios section

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>

* Address code review

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>

* Address code review

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>

* Modify design to allow other interface changes

The previous design assumed that only method addition would be
supported. It now includes guidance for making changes such as method
removal or signature changes.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>

Co-authored-by: Bridget McErlean <bmcerlean@vmware.com>
2022-03-18 11:16:23 +08:00
Scott Seago
541f40d654 Merge pull request #4749 from reasonerjt/rm-zubron-from-reviewers
Remove Bridget from maintainer list
2022-03-17 09:52:43 -04:00
Tiger Kaovilai
9133ee7038 clarify date/time (#4745)
* clarify date/time

Co-authored-by: Scott Seago <sseago@redhat.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-03-17 21:45:06 +08:00
Daniel Jiang
da883962d6 Remove Bridget from maintainer list
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-03-17 21:35:33 +08:00
Hoang, Phuong
b8b5427388 Fix format.
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-15 19:54:24 -04:00
Hoang, Phuong
e9d5f7121c Add unit tests, change copyright years and revert unrelated changes.
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-15 19:51:53 -04:00
Hoang, Phuong
d2ef5cbe0a Add changelog
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-15 19:05:13 -04:00
Hoang, Phuong
0741360050 Adding PriorityClass to backup podAction and restore podAction.
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-15 19:05:13 -04:00
Xun Jiang
291f0c17e8 Support multiple skip option for E2E test
The GINKGO_SKIP option is updated to string that can be separated by "." for "make test-e2e".

Signed-off-by: Xun Jiang <jxun@vmware.com>
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-15 19:05:13 -04:00
Ganesh Hubale
05d97aec2d Fixed start contributing link (#4723)
Signed-off-by: Ganesh Hubale <ganeshhubale03@gmail.com>
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-15 19:05:13 -04:00
danfengl
09cdf41d97 Add E2E test of bsl deletion
Signed-off-by: danfengl <danfengl@vmware.com>
2022-03-15 02:27:09 +00:00
Tiger Kaovilai
d0422d8ee5 Clarify backups that get deleted via object storage sync
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-03-08 19:41:37 -05:00
qiuming
3c49ec4fb4 Merge pull request #4725 from blackpiglet/4725-support-multiple-skip
Support multiple skip option for E2E test
2022-03-08 19:43:28 +08:00
Xun Jiang
d694d40919 Support multiple skip option for E2E test
The GINKGO_SKIP option is updated to string that can be separated by "." for "make test-e2e".

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-03-08 17:04:32 +08:00
Ganesh Hubale
3c607931c0 Fixed start contributing link (#4723)
Signed-off-by: Ganesh Hubale <ganeshhubale03@gmail.com>
2022-03-08 16:56:52 +08:00
Wenkai Yin(尹文开)
208d250ddc Merge pull request #4719 from ywk253100/220225_bsl
Update BSL CR as long as there is any error
2022-03-08 16:40:24 +08:00
Wenkai Yin(尹文开)
bcc9aa8d69 Update BSL CR as long as there is any error
1. Mark the BSL as "Unavailable" when gets any error
2. Add a new field "Message" to the BSL status to record the error message

Fixes #4485
Fixes #4405

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-03-07 10:25:18 +08:00
Abigail McCarthy
27f7494190 fix broken links in ibm config page (#4715)
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-03-03 09:57:31 +08:00
Wenkai Yin(尹文开)
f2542ba123 Merge pull request #4664 from danfengliu/add-e2e-verify-snapshot-in-vsl
Add e2e test to verify snapshot in vsl
2022-03-02 15:10:20 +08:00
qiuming
79037848c8 Merge pull request #4623 from blackpiglet/push-image-in-github-workflow
Add pushing image to GCR in github workflow
2022-03-01 15:52:45 +08:00
qiuming
b0cd90253b Merge pull request #4661 from blackpiglet/4499-hook-podexec-container
[fix] Avoid overwritten hook's exec.container parameter when running …
2022-03-01 15:39:54 +08:00
Xun Jiang
860e4e2c1a Remove gcp auth action. Use JSON key as docker login secret instead.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-03-01 15:16:52 +08:00
Xun Jiang
37412fe214 Change authentication method from workload identity provider to service account key.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-03-01 10:59:39 +08:00
danfengl
4ebf764ddc Add e2e for verify snapshto in VSL
Signed-off-by: danfengl <danfengl@vmware.com>
2022-03-01 02:13:55 +00:00
Xun Jiang
0503b2675f Modify according to comments.
Change hook.Container's value in test case to ""

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-28 19:28:17 +08:00
Wenkai Yin(尹文开)
0b9c704da1 Merge pull request #4677 from ywk253100/220221_main
[cherry-pick]Enable building and pushing image for release branches
2022-02-28 16:01:34 +08:00
Wenkai Yin(尹文开)
7d48e030fa Merge pull request #4704 from reasonerjt/enable-coverage
Enable coverage in test.sh and upload to codecov
2022-02-28 15:26:28 +08:00
Wenkai Yin(尹文开)
4a50306a0e Merge pull request #4697 from j4m3s-s/fix-labels
Fix labels removed in ObjectMeta
2022-02-28 14:05:02 +08:00
Daniel Jiang
9f46b10b70 Enable coverage in test.sh and upload to codecov
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-02-28 10:59:49 +08:00
Wenkai Yin(尹文开)
8aaeed4411 Merge pull request #4686 from reasonerjt/fix-4080
Bypass the remap CRD version plugin when v1beta1 CRD is not supported
2022-02-28 10:57:52 +08:00
Wenkai Yin(尹文开)
a8fb1d7e4b Merge pull request #4633 from qiuming-best/contributor
Add Ming Qiu's profile information into Velero Website's contributor list
2022-02-25 09:32:56 +08:00
Daniel Jiang
1cf61dd1aa Merge pull request #4084 from MatthieuFin/main
Add full support for setting securityContext for restic restore
2022-02-24 20:18:09 +08:00
MatthieuFin
a57298254f Fix typo on tests fields name and add another test with gesture of errors wanted on equals
Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
2022-02-24 12:09:04 +01:00
James Landrein
cb11bf1924 Fix labels removed in ObjectMeta
Signed-off-by: James Landrein <github@j4m3s.eu>
2022-02-24 10:25:49 +01:00
James Landrein
77be862b9c Add support for --pod-labels (#4694)
* Add support for --pod-labels
* Add changelog

Signed-off-by: James Landrein <github@j4m3s.eu>
2022-02-24 17:00:14 +08:00
Daniel Jiang
ea38f84c53 Merge pull request #4660 from blackpiglet/update-onwer-references-in-backup-descrip
Update --use-owner-references-in-backup description in velero command…
2022-02-24 15:47:34 +08:00
Xun Jiang/Bruce Jiang
8a0c9899c2 Merge pull request #4643 from ywk253100/220215_release_script
Don't exit when getting no match for grep
2022-02-24 14:29:42 +08:00
qiuming
17043cd5cd Merge pull request #4518 from ywk253100/220112_restic_prune
Fix bug to make the restic prune frequency configurable
2022-02-24 14:20:34 +08:00
MatthieuFin
f6bdfd09c5 Merge remote-tracking branch 'upstream/main'
Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
2022-02-23 15:03:15 +01:00
qiuming
2c359da0c3 Merge pull request #4692 from blackpiglet/skip_support_in_e2e
Add skip case support in e2e test
2022-02-23 14:48:11 +08:00
Xun Jiang
9cb81d825e Add skip case support in e2e test
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-23 14:05:22 +08:00
Wenkai Yin(尹文开)
8e1ba3e2e4 Merge pull request #4680 from blackpiglet/4663-add-regional-disk-support
[fix] Add regional PV support for GKE
2022-02-22 20:16:24 +08:00
Daniel Jiang
0070138c62 Bypass the remap CRD version plugin when v1beta1 CRD is not supported
When velero is running on clusters that don't support v1beta1 CRD, the
plugin will not try to backup v1beta1 CRD.
The plugin should be kept for backward compatibility.  It will be
removed when velero drop the support for k8s v1.21

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-02-22 18:59:47 +08:00
Xun Jiang
4c8d1c2693 Modify according to comments
1. rename zoneSeparator to gkeZoneSeparator
2. add example of regional PV's node affinity. modify test case description.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-22 16:23:10 +08:00
Daniel Jiang
e08e4f380f Merge pull request #4439 from neha-viswanathan/3940-velero-migration-doc-update
update migration across different k8s versions section
2022-02-22 12:10:57 +08:00
Xun Jiang
8c2a07b906 Update --use-owner-references-in-backup description in velero command line
Specify the risk of this parameter set to true. Add the issue first reported about this topic which includeds the google document illustrates about it.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-21 22:37:48 +08:00
Xun Jiang
7be12a9220 [fix] Add regional PV support for GKE
fix #4663.
For GKE pv, when create backup, return all zones retrived from node affinity.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-21 22:04:21 +08:00
Wenkai Yin(尹文开)
fc2760d206 Append "-dev" suffix for the image tag of release branches
Append "-dev" suffix for the image tag of release branches: release-1.0-dev

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-02-21 19:29:02 +08:00
Wenkai Yin(尹文开)
59ff57b3c6 Enable building and pushing image for release branches
Enable building and pushing image for release branches

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-02-21 17:47:06 +08:00
Abigail McCarthy
ea3c72310b Merge pull request #4666 from jonasrosland/update-community-page
Remove the office hours from the community page
2022-02-18 10:14:29 -05:00
Wenkai Yin(尹文开)
f1dea158d0 Don't exit when getting no match for grep
Don't exit when getting no match for grep

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-02-18 09:08:33 +08:00
Jonas Rosland
aedcdcccad Remove the office hours from the community page
Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2022-02-17 14:28:19 -05:00
danfengl
5220562d37 Add backup deletion e2e test
Test case description is "Deleted backups are deleted from object storage and backups deleted from object storage can be deleted locally",
in this test, only resource backup objects are target for verifition, restic repo verification is not included in this PR, and snapshot verification will be in later PR

Signed-off-by: danfengl <danfengl@vmware.com>
2022-02-17 09:41:24 +00:00
Xun Jiang
6d9004dc62 [fix] Avoid overwritten hook's exec.container parameter when running pod command executor
Fix #4499
When hook influnce multiple pods, current logic's first pod's container will overwrite the hook's exec.container parameter. That will cause the other pod fail on the hook executing.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-17 15:24:56 +08:00
Wenkai Yin(尹文开)
2cd2d83260 Merge pull request #4659 from vmware-tanzu/1.8-release-note
1.8 release note
2022-02-17 10:40:41 +08:00
Daniel Jiang
e4292965da Merge pull request #4656 from a-mccarthy/release-notes-edits
Copy edits for 1.8 release notes
2022-02-17 10:05:58 +08:00
Daniel Jiang
3db8798525 Merge pull request #4658 from dsu-igeek/dsu-changelog-1.8-update
Updates to 1.8 changelog
2022-02-17 10:00:01 +08:00
kkothule
2785807b2c Add CloudCasa to "Adopters of Velero" section on velero.io (#4588)
- Added CloudCasa logo
- Added description of CloudCasa and its integration with Velero

Signed-off-by: Kiran Kothule <kkothule@catalogicsoftware.com>
2022-02-17 08:57:02 +08:00
Xun Jiang/Bruce Jiang
e0791a7fd0 Add Xun Jiang's profile information into Velero Website. (#4620)
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-17 08:52:28 +08:00
David L. Smith-Uchida
926f40170d Updates to 1.8 changelog
Signed-off-by: David L. Smith-Uchida <dave@kasten.io>
2022-02-16 10:30:16 -08:00
Abigail McCarthy
bdcb6d3e98 Copy edits for 1.8 release notes
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-02-16 11:53:09 -05:00
Daniel Jiang
b9d4fe86cf Merge pull request #4654 from ywk253100/220216_release_note
Update release note to reflect the fix for #1980
2022-02-16 14:11:46 +08:00
Daniel Jiang
fddec92ccc Merge pull request #4653 from codegold79/1.8-release-note
Add delete BSL cleanup highlight and fixed grammar in heading
2022-02-16 10:43:41 +08:00
Wenkai Yin(尹文开)
9fd241a1a0 Update release note to reflect the fix for #1980
Update release note to reflect the fix for #1980

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-02-16 08:27:44 +08:00
Daniel Jiang
b7b339b9c9 Add more exempt labels for stalebot (#4641) 2022-02-16 05:37:21 +08:00
bynare
768a30618f restic backupper: ignore volumes of non-running pods (#4584) 2022-02-16 05:34:58 +08:00
frankly_coding
5ca5b884c1 Merge branch '1.8-release-note' into 1.8-release-note 2022-02-15 10:56:31 -08:00
F. Gold
e3685786fa Add delete BSL cleanup highlight and fixed grammar in heading
Signed-off-by: F. Gold <fgold@vmware.com>
2022-02-15 10:53:46 -08:00
Daniel Jiang
552eb3c3f7 Merge pull request #4646 from reasonerjt/update-release-note
Refine the release note of v1.8
2022-02-15 23:01:28 +08:00
Daniel Jiang
70d12ea16e Refine the release note of v1.8
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-02-15 22:55:12 +08:00
qiuming
d1063bda7e Merge pull request #4639 from blackpiglet/update-e2e-test-image-to-gcr
Update e2e test image to gcr.io
2022-02-15 09:53:50 +08:00
Daniel Jiang
fad2df8740 Merge pull request #4618 from codegold79/4617-info-log-panic-default-volumes-to-restic-nil
Check for nil before logging DefaultVolumesToRestic value
2022-02-15 08:30:53 +08:00
Xun Jiang
9419aa91a7 Update e2e test image to gcr.io
By now, only busybox:latest is used by e2e. It is already upload to gcr.io/velero-gcp/busybox:latest
Change the image to gcr.io to avoid pulling rate limitation from docker hub.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-14 20:55:34 +08:00
Wenkai Yin(尹文开)
3e847fd5da Merge pull request #4634 from qiuming-best/ns-test-fix
Fix E2E backup namespaces test
2022-02-14 18:03:36 +08:00
Ming
6a61a418ca Fix E2E backup namespaces test
Signed-off-by: Ming <mqiu@vmware.com>
2022-02-14 17:41:28 +08:00
Wenkai Yin(尹文开)
69588011a2 Merge pull request #4622 from reasonerjt/tag-release-fail
Make sure the tag-release script fail on any error
2022-02-14 13:58:36 +08:00
Ming
72d53fb11e Add Ming Qiu's profile information into Velero Website's contributor list
Signed-off-by: Ming <mqiu@vmware.com>
2022-02-11 17:36:00 +08:00
Xun Jiang
01842a1552 Add GCR login actions
use google-github-actions/auth to login GCP. Login gcr.io with generated access token.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-10 15:42:18 +08:00
F. Gold
491942cf2d Simplify by assuming nil is false and use boolptr util function
Signed-off-by: F. Gold <fgold@vmware.com>
2022-02-09 16:58:07 -08:00
Xun Jiang
5844fca5af Add pushing image to GCR in github workflow
Push to GCR in github workflow to faciliate some environments that have rate limitation to docker hub, e.g. vSphere.
 <root@jxun-jumpserver.c.velero-gcp.internal>
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-09 16:27:25 +08:00
Wenkai Yin(尹文开)
0270b96a5f Merge pull request #4605 from reasonerjt/custom-plugin-update
Undeprecate the volumesnapshot plugin in the doc
2022-02-09 10:15:40 +08:00
Daniel Jiang
a251fffc69 Make sure the tag-release script fail on any error
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-02-08 10:55:19 +08:00
F. Gold
9b9aa3f308 Add changelog for PR 4436
Signed-off-by: F. Gold <fgold@vmware.com>
2022-02-07 11:41:15 -08:00
Wenkai Yin(尹文开)
ca168d41ab Merge pull request #4593 from zubron/remove-bridget-from-maintainers
Remove Bridget McErlean from maintainers
2022-02-07 09:24:44 +08:00
F. Gold
95c43d5b65 Minor change to trigger GitHub actions
Signed-off-by: F. Gold <fgold@vmware.com>
2022-02-02 17:02:22 -08:00
F. Gold
131c6de407 Check for nil before logging DefaultVolumestToRestic value
Signed-off-by: F. Gold <fgold@vmware.com>
2022-02-02 10:53:03 -08:00
Daniel Jiang
f0a29276cc Undeprecate the volumesnapshot plugin in the doc
Since Itemsnapshotter plugin is still WIP,
this commit removes the reference and the deprecation of volumeSnapshotter plugin
from the doc to avoid confusion.
We'll update the doc when it's ready and we have a reference
implementation.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-01-30 16:21:49 +08:00
qiuming
574baeb3c9 Merge pull request #4599 from danfengliu/change-1.8-e2e-plugins-version-to-release-version
Change 1.8 plugins version to release version
2022-01-29 18:30:37 +08:00
danfengl
7c4bd099d9 Change 1.8 plugins version to release version
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-29 10:11:17 +00:00
danfengliu
2ec28e3000 Merge pull request #4598 from danfengliu/fix-e2e-gcp-1.4-tag
Fix E2E gcp plugin tag name
2022-01-29 17:45:58 +08:00
danfengl
f757540c6d Fix E2E gcp plugin tag name
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-29 09:33:41 +00:00
Daniel Jiang
a33442656b Merge pull request #4595 from danfengliu/add-1.8-plugins-in-e2e-test
Add 1.8 plugins map in e2e test
2022-01-29 17:27:46 +08:00
danfengl
33219e6c4c Add 1.8 plugins map in e2e test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-29 09:14:36 +00:00
Dominic Brekau
5fa7d08fa1 Use OrderedResources in schedules (#4550)
* Use OrderedResources in schedules
Make ParseOrderedResources public for use in schedules
Add changelog

Signed-off-by: Dominic <dominic@xdnx.org>

* Rename function in comment section

Signed-off-by: Dominic <dominic@xdnx.org>
2022-01-29 15:47:55 +08:00
danfengliu
1dd421d766 Merge pull request #4591 from qiuming-best/ssr
E2E SSR test add retry mechanism and logs
2022-01-29 12:19:53 +08:00
F. Gold
ec23f3b767 Run go mod tidy
Signed-off-by: F. Gold <fgold@vmware.com>
2022-01-28 18:08:49 -08:00
F. Gold
a610194aa1 Replace r.Client.Update with patch helper
Signed-off-by: F. Gold <fgold@vmware.com>
2022-01-28 15:31:05 -08:00
Bridget McErlean
b28093ede1 Remove Bridget McErlean from maintainers
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2022-01-28 18:22:37 -05:00
Ming
e4046017db E2E SSR test add retry mechanism and logs
Signed-off-by: Ming <mqiu@vmware.com>
2022-01-28 18:51:46 +08:00
F. Gold
48827d613d Run go mod tidy
Signed-off-by: F. Gold <fgold@vmware.com>
2022-01-26 20:29:23 -08:00
F. Gold
2dd85c9c42 Convert PodVolumeBackup to Kubebuilder framework
Signed-off-by: F. Gold <fgold@vmware.com>
2022-01-26 20:09:24 -08:00
qiuming
b40bbda2d6 Merge pull request #4582 from danfengliu/add-timeout-for-ci-e2e-job
Add timeout for CI e2e job
2022-01-26 20:27:00 +08:00
danfengl
5571f25f11 Add timeout for CI e2e job
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-26 09:24:24 +00:00
Daniel Jiang
52590a4426 Nominate Xun Jiang and Ming Qiu to become maintainers (#4578) 2022-01-26 10:52:07 +08:00
Wenkai Yin(尹文开)
77fd284a9a Merge pull request #4566 from reasonerjt/fix-custom-plugin-doc
Remove reference of restic_restore_action.go from the doc
2022-01-26 10:21:25 +08:00
Daniel Jiang
04fb450e2e Merge pull request #4577 from dsu-igeek/dsu-kasten-01-24-2022
Change dsu-igeek affiliation to Kasten, requires governance vote
2022-01-26 09:00:02 +08:00
Dave Smith-Uchida
e8120f66fa Change dsu-igeek affiliation to Kasten, requires governance vote
Signed-off-by: Dave Smith-Uchida <dave@kasten.io>
2022-01-25 10:00:32 -08:00
qiuming
ae0c4c29a1 Merge pull request #4573 from danfengliu/add-continue-on-error-in-ci-e2e-test
Add continue-on-error in ci e2e test
2022-01-25 17:03:25 +08:00
danfengl
6e4194bc60 Add continue-on-error in ci e2e test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-25 08:51:24 +00:00
Daniel Jiang
a6abc03e43 Remove reference of restic_restore_action.go from the doc
fixes #4554

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-01-24 15:11:23 +08:00
Daniel Jiang
2cbb881285 Merge pull request #4497 from dkeven/filterunmountedvol
Fix: skip not mounted volumes when backing up
2022-01-24 14:40:18 +08:00
qiuming
56d625e1da Merge pull request #4555 from danfengliu/upload-debug-tarball-in-pr-ci
Upload debug tarball in PR CI E2E pipeline
2022-01-21 16:23:51 +08:00
danfengl
8bf0e05f12 Upload debug tarball in PR CI E2E pipeline
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-21 03:52:36 +00:00
Wenkai Yin(尹文开)
0f56f8e8e0 Merge pull request #4545 from qiuming-best/backup-sync-bsl
Add E2E test of backups sync from BSL
2022-01-20 15:42:57 +08:00
Rafael Brito
015e8e7db9 #4067 Initial design of the new plugins - pre-post backup and restore (#4083)
* #4067 Initial design of the new plugins - pre-post backup and restore

Signed-off-by: Rafael Brito <rbrito@vmware.com>

* Update new-prepost-backuprestore-plugin-hooks.md

* Updated design doc as per feedback

Signed-off-by: Rafael Brito <rbrito@vmware.com>

* Adding design changes as per feedback

* Update design on prepost-backup-restore plugins

* More color on how to call plugins

Signed-off-by: Rafael Brito <rbrito@vmware.com>

* Proposing annotations to skip plugin execution

Signed-off-by: Rafael Brito <rbrito@vmware.com>
2022-01-19 14:57:10 -08:00
Ming
caa80db92c Add E2E test of backups sync from BSL
Signed-off-by: Ming <mqiu@vmware.com>
2022-01-19 15:09:02 +08:00
dkeven
1e44edce67 Fix: skip not mounted volumes when backing up
Signed-off-by: dkeven <keven@kubesphere.io>
2022-01-18 17:53:01 +08:00
Tiger Kaovilai
2734bac900 Clarify restore hook includedResources when not specified
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

Rearrange for clarity

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-01-15 14:55:19 -05:00
Daniel Jiang
459365013c Update changelog for v1.8.0 (#4530)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-01-14 09:20:53 -05:00
Daniel Jiang
db466df5e5 Merge pull request #4517 from reasonerjt/1.8-doc
Update doc for v1.8
2022-01-14 22:05:22 +08:00
Daniel Jiang
7a5ae101e6 Update doc for v1.8
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-01-14 01:12:10 +08:00
qiuming
595e62ee7e Merge pull request #4521 from qiuming-best/ssr-test
E2E test on ssr object with controller namespace mix-ups
2022-01-13 14:31:56 +08:00
Ming
f36161eeee E2E test on ssr object with controller namespace mix-ups
Signed-off-by: Ming <mqiu@vmware.com>
2022-01-13 14:10:37 +08:00
qiuming
dc09fea988 Merge pull request #4519 from ywk253100/220112_ci
Support running e2e testing on k8s 1.23.0
2022-01-13 09:44:46 +08:00
Daniel Jiang
1e24d6ce71 Merge pull request #4513 from ywk253100/220111_restic
Check whether the volume is provisioned by CSI driver or not by the annotation as well
2022-01-12 19:54:55 +08:00
Wenkai Yin(尹文开)
fcad46ccdf Check whether the volume is provisioned by CSI driver or not by the annotation as well
Check whether the volume is provisioned by CSI driver or not by the annotation as well

Fixes #4496

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-01-12 19:05:33 +08:00
Wenkai Yin(尹文开)
a246be48c0 Support running e2e testing on k8s 1.23.0
Support running e2e testing on k8s 1.23.0

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-01-12 18:42:24 +08:00
qiuming
0094303fa5 Merge pull request #4510 from danfengliu/fix-e2e-upgrade-issue-by-another-pr
Fix E2E upgrade parameter issue caused by previous PR
2022-01-12 15:31:34 +08:00
Xun Jiang/Bruce Jiang
947f85790f Merge pull request #4514 from ywk253100/2220110_nodeport
Check the existence of the expected service when ignoring the NodePort already allocated error
2022-01-12 15:25:42 +08:00
Wenkai Yin(尹文开)
fb2722ffe5 Fix bug to make the restic prune frequency configurable
We introduces the installation option "--default-restic-prune-frequency" to make restic prune frequency configuration in the previous release, but there is a bug that make the option don't take effect. This commit fixes the bug by removing the evaluation part. The restic repository controller will take care the prune frequency for the repository

Fixes #3062

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-01-12 15:18:24 +08:00
Wenkai Yin(尹文开)
62779bbcc6 Check the existence of the expected service when ignoring the NodePort already allocated error
Check the existence of the expected service when ignoring the NodePort already allocated error

Fixes 2308

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-01-12 15:06:42 +08:00
danfengl
2a492ded94 Fix E2E upgrade parameter issue caused by previous PR
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-11 07:23:01 +00:00
Daniel Jiang
a91483c55c Merge pull request #4491 from ywk253100/220105_label
Initialize the labels field of `velero backup-location create` option
2022-01-10 23:03:09 +08:00
qiuming
7bdbf30856 Merge pull request #4507 from danfengliu/bumpup-version-in-upgrade-test
Bump up velero version in upgrade test
2022-01-10 09:53:25 +08:00
Wenkai Yin(尹文开)
5c5947f0d9 Merge pull request #4489 from a-mccarthy/fix-4363
Update CSI docs
2022-01-10 09:18:05 +08:00
danfengl
3af149afae Bump up velero version in upgrade test
Velero 1.8 is releasing soon, upgrade test covers the last release version to the main code.

Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-09 02:38:07 +00:00
Scott Seago
a2b6d06f61 Merge pull request #4502 from a-mccarthy/fix-3518
Add Velero-Kubernetes version matrix
2022-01-07 14:31:09 -05:00
Abigail McCarthy
4cca3996f5 add links to plugin repos
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-01-07 09:34:36 -05:00
Abigail McCarthy
f0542047b8 minor typo fixes
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-01-07 09:20:27 -05:00
Neha Viswanathan
d17db327f7 update migration across different Kubernetes versions section
Signed-off-by: Neha Viswanathan <itsnehavis@gmail.com>
2022-01-06 19:45:36 -08:00
Abigail McCarthy
527af08315 readme changes
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-01-06 14:21:32 -05:00
Abigail McCarthy
b82559fe7c Add kubernetes version compatability matrix
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-01-06 14:20:41 -05:00
Wenkai Yin(尹文开)
6c1f16a735 Initialize the labels field of velero backup-location create option
Initialize the labels field of `velero backup-location create` option to avoid #4484

Fixes #4484

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-01-06 10:35:39 +08:00
Abigail McCarthy
7e76bb9f98 Update CSI docs with more context
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2022-01-05 13:43:39 -05:00
Wenkai Yin(尹文开)
b6992101a4 Merge pull request #4480 from qiuming-best/optimize-ns-test
Fix e2e 2500 namespaces scale test timeout problem
2022-01-04 16:22:00 +08:00
Ming
97b106d1a3 Fix e2e 2500 namespaces scale test timeout problem
Signed-off-by: Ming <mqiu@vmware.com>
2022-01-04 15:24:14 +08:00
Wenkai Yin(尹文开)
3feb259235 Merge pull request #4401 from danfengliu/add-backup-deletion-e2e-test-to-main
Add backup deletion e2e test
2021-12-24 16:04:08 +08:00
danfengl
29b2cd1883 Add backup deletion e2e test
Test case description is "Deleted backups are deleted from object storage and backups deleted from object storage can be deleted locally",
in this test, only resource backup objects are target for verifition, restic repo verification is not included in this PR, and snapshot verification will be in later PR

Signed-off-by: danfengl <danfengl@vmware.com>
2021-12-23 12:45:31 +00:00
Wenkai Yin(尹文开)
72fc1d2c0b Parse resource from backup tarball directly rather than resolving it via discovery service to avoid #4009 (#4398) 2021-12-21 19:28:55 +08:00
qiuming
6be36c2aa4 Merge pull request #4455 from qiuming-best/rbac-test
Add rbac and annotation test cases
2021-12-21 16:12:20 +08:00
Daniel Jiang
7c2dc143d5 Merge pull request #4391 from ywk253100/211123_anno
Keep the annotation "pv.kubernetes.io/provisioned-by" when restoring PVs
2021-12-21 11:08:25 +08:00
Wenkai Yin(尹文开)
648f3ac228 Keep the annotation "pv.kubernetes.io/provisioned-by" when restoring PVs
More details please refer to https://github.com/vmware-tanzu/velero/issues/3470#issuecomment-976279606

Fixes #3470

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-12-21 09:52:56 +08:00
Wenkai Yin(尹文开)
c7cd95a374 Ignore the provided port is already allocated error when restoring the LoadBalancer service (#4462)
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-12-21 05:42:27 +08:00
Daniel Jiang
d7aa82d8ed Return the error when getting backup store in backup deletion controller (#4465)
Per discussion in
https://github.com/vmware-tanzu/velero/issues/4260#issuecomment-947721686
https://github.com/vmware-tanzu/velero/issues/4260#issuecomment-951347384

return the error to avoid a panic when downloading the backup tarball

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-12-21 05:38:13 +08:00
Wenkai Yin(尹文开)
d627362abd Merge pull request #4457 from blackpiglet/revert-4423-backup-sync-controller-to-kubebuilder
Revert "Migrate backup sync controller from code-generator to kubebui…
2021-12-20 11:10:26 +08:00
Wenkai Yin(尹文开)
26c668e511 Merge pull request #4442 from a-mccarthy/fix-4352
Add defaultVolumesToRestic to schedule api docs
2021-12-20 11:09:26 +08:00
Xun Jiang
bdde7585c8 Add changelog.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2021-12-17 16:16:03 +08:00
Xun Jiang
7ab4bfc632 Revert "Migrate backup sync controller from code-generator to kubebuilder (#4423)"
This reverts commit 5aaeb3ebbe.
2021-12-17 09:40:24 +08:00
Abigail McCarthy
37f8be093f Update code standards to direct folks to create changelogs on release… (#4443)
* Update code standards to direct folks to create changelogs on release branches
* Fix wording

Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2021-12-16 23:54:11 +08:00
Ming
be752dd8d9 Add rbac and annotation test cases
Signed-off-by: Ming <mqiu@vmware.com>
2021-12-16 18:02:24 +08:00
Box-Cube
69f6c8d0cd Fix statefulsets volumeClaimTemplates storageClassName after use Changing PV/PVC Storage Classes (#4375)
* fix statefulsets volumeClaimTemplates storageClassName after use Changing PV/PVC Storage Classes

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix (vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Change the isStorageClassExist logic

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>

* Fix StatefulSet volumeClaimTemplates storageClassName(vmware-tanzu#4373)

Signed-off-by: Box-Cube <64300761+Box-Cube@users.noreply.github.com>
2021-12-16 14:50:56 +08:00
qiuming
e350ce5bb4 Merge pull request #4440 from qiuming-best/upgrade-e2e-vsphere-plugin
Upgrade e2e test vsphere plugin
2021-12-16 09:45:06 +08:00
Ming
d8b1ed7dba Upgrade e2e test vsphere plugin
Signed-off-by: Ming <mqiu@vmware.com>
2021-12-15 17:44:57 +08:00
Xun Jiang/Bruce Jiang
5aaeb3ebbe Migrate backup sync controller from code-generator to kubebuilder (#4423)
* Migrate backup sync controller from code-generator to kubebuilder

1. use kubebuilder's reconcile logic to replace controller's old logic.
2. use ginkgo and gomega to replace testing.

Signed-off-by: Xun Jiang <jxun@vmware.com>

* Fix: modify code according to comments

1. Remove DefaultBackupLocation
2. Remove unneccessary comment line
3. Add syncPeriod default value setting logic
4. Modify ListBackupStorageLocations function's context parameter
5. Add RequeueAfter parameter in Reconcile function return value

Signed-off-by: Xun Jiang <jxun@vmware.com>

* Reconcile function use context passed from parameter

1. Use context passed from parameter, instead of using Reconciler struct's context.
2. Delete Reconciler struct's context member.
3. Modify test case accordingly.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2021-12-14 20:07:20 -05:00
Frangipani Gold
d3c7ef09cb Remove backups and restic repos associated with deleted BSL(s) (#4377)
* Remove backups and restic repos associated with deleted BSL(s)

Signed-off-by: F. Gold <fgold@vmware.com>

* add changelog

Signed-off-by: F. Gold <fgold@vmware.com>

* Add PR number to changelog

Signed-off-by: F. Gold <fgold@vmware.com>

* Fix typo

Signed-off-by: F. Gold <fgold@vmware.com>

* Only delete backups and restic repos and report success when without errors

Signed-off-by: F. Gold <fgold@vmware.com>
2021-12-13 16:09:24 -08:00
David L. Smith-Uchida
a1b48ceac5 Adds <backup-name>-itemsnapshots.gz file to backup (when provided). (#4429)
* Adds <backup-name>-itemsnapshots.gz file to backup (when provided).  Also
adds DownloadTargetKindBackupItemSnapshots type to allow downloading.
Updated object store unit test

Fixes #3758

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Removed redundant checks

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-12-13 14:47:50 -05:00
Scott Seago
3445c402a9 Merge pull request #4446 from blackpiglet/4389-remove-crds-version
fix: remove --crds-version in velero install command
2021-12-13 08:58:56 -05:00
Xun Jiang
706d142096 fix: remove --crds-version in velero install command
Due to only v1 CRD is supported in velero version 1.8, remove CRDs version choosing option.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2021-12-13 21:02:56 +08:00
David L. Smith-Uchida
5677e04bb1 Consolidated code for resolving actions and plugins into ActionResolver (#4410)
* Consolidated code for resolving actions and plugins into ActionResolver.  Added BackupWithResolvers and
RestoreWithResolvers.  Introduces ItemSnapshooterResolver to bring ItemSnapshotter plugins into backup and
restore.  ItemSnapshotters are not used yet.

Added action_resolver_test

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Addressed review comments

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-12-10 12:53:47 -05:00
Abigail McCarthy
4173c54662 Add defaultVolumesToRestic to schedule api docs
Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
2021-12-10 09:19:44 -05:00
Wenkai Yin(尹文开)
ab7efe7794 Merge pull request #4438 from qiuming-best/resource-filtering-test
Fix e2e test failures for the inappropriate optimaze of velero install
2021-12-10 14:00:38 +08:00
ming qiu
d1e2c7b476 Fix e2e test failures for the inappropriate optimaze of velero install
Signed-off-by: ming qiu <mqiu@mqiu-a01.vmware.com>
2021-12-10 11:10:51 +08:00
Wenkai Yin(尹文开)
edbd2f7231 Merge pull request #4437 from qiuming-best/resource-filtering
Limit backup namespaces on test resource filtering cases
2021-12-09 14:15:18 +08:00
ming qiu
c58fc1445e Limit backup namespaces on test resource filtering cases
Signed-off-by: ming qiu <mqiu@mqiu-a01.vmware.com>
2021-12-09 11:48:32 +08:00
Wenkai Yin(尹文开)
769af3f7b8 Merge pull request #4416 from dsu-igeek/dsu-upload-progress-feature-flag-12-01-2021
Added UploadProgressFeature flag to enable UploadProgressMonitoring
2021-12-08 09:33:36 +08:00
Dave Smith-Uchida
d0e660f435 Added UploadProgressFeature flag to enable UploadProgressMonitoring and ItemSnapshotters
Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-12-07 00:06:36 -08:00
Scott Seago
d9f8abcd27 Merge pull request #4431 from reasonerjt/bump-up-go-1.17
Bump up Go to 1.17
2021-12-06 11:48:16 -05:00
Abigail McCarthy
2f8931ed22 Merge pull request #4221 from JGodin-C2C/main
feat: improve documentation for reverse selector
2021-12-06 11:31:13 -05:00
Julien Godin
3e86bf0cc8 feat: improve documentation for reverse selector
Signed-off-by: Julien Godin <julien.godin@camptocamp.com>
2021-12-06 14:36:31 +01:00
Daniel Jiang
a3d196ee85 Bump up Go to 1.17
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-12-06 20:16:24 +08:00
qiuming
ebccca0f1b Merge pull request #4404 from qiuming-best/resource-filtering
Add resource filtering test cases
2021-12-06 15:02:53 +08:00
Ming
0c8063cfd2 Add resoure filtering test cases
Signed-off-by: Ming <mqiu@vmware.com>
2021-12-04 22:47:46 +08:00
David L. Smith-Uchida
91ea996aaa Added ItemSnapshotter to the plugin server framework. (#4417)
Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-12-02 14:01:40 -05:00
Neha Viswanathan
dd3206c544 update documentation (#4378)
Signed-off-by: Neha Viswanathan <itsnehavis@gmail.com>
2021-12-02 13:57:59 -05:00
Wenkai Yin(尹文开)
74e9c43514 Merge pull request #4397 from reasonerjt/fix-3516
Add restoreactionitem plugin to handle admission webhook configurations
2021-12-01 14:13:16 +08:00
Daniel Jiang
2a7d4cec6e Add restoreactionitem plugin to handle admission webhook configurations
This commit adds a restore action item plugin to reset invalid value
of "sideEffects" in resource of mutatingwebhookconfiguration and
validating webhookconfiguration.

To fix the problem the "sideEffects" is illegal for resource migrated
from v1beta1.

fixes #3516

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-12-01 00:48:06 +08:00
Aditya Sharma
47aa093a16 Build for darwin_arm64 (#4409)
Signed-off-by: Aditya Sharma <git@adi.run>
2021-11-30 11:27:29 -05:00
Daniel Jiang
02013ef335 Merge pull request #4382 from blackpiglet/4369-bsl-from-kubebuilder-v2-to-v3
feat: migrate velero controller from kubebuilder v2 to v3
2021-11-24 09:35:39 +08:00
Xun Jiang
303d3dcad3 feat: migrate kubebuilder from v2 to v3
1. remove config/crd/v1beta1
2. remove PROJECT file
3. update controller-gen and kubebuilder version
4. generate client and CRD file
5. add changelog and remove v1beta1 CRD generated code.
6. add kubebuilder test bundle setup command.
7. due to apiextensions.k8s.io/v1beta1 is not supported, only k8s after v1.16 is supported, so remove v1.15 check.
8. add CRD and k8s suppored version update in changelog.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2021-11-23 19:32:19 +08:00
Daniel Jiang
48d185985a Update issue template to reference velero debug (#4384)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-11-22 12:01:24 -05:00
Wenkai Yin(尹文开)
04cfadfb14 Merge pull request #4386 from redenval/e2e-restructure
Adjust structure of e2e test codes
2021-11-22 16:23:34 +08:00
ming qiu
58325050ec Adjust structure of e2e test codes
Put every test moduels into seperate packages and all velero install parameters integrated into one struct

Signed-off-by: Ming <mqiu@vmware.com>
2021-11-22 15:57:58 +08:00
Wenkai Yin(尹文开)
474fd61283 Merge pull request #4376 from reasonerjt/pv-zone-gcp
Add the key for GKE zone for AZ collection
2021-11-22 10:14:04 +08:00
Daniel Jiang
748cf86aa7 Add the key for GKE zone for AZ collection
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-11-20 15:58:31 +08:00
Scott Seago
5f2a32e2a7 Merge pull request #4372 from danfengliu/fix-snapshot-e2e-test-issue
Fix snapshot e2e test issue of jsonpath
2021-11-18 15:49:05 -05:00
danfengl
e09837cc4c Fix snapshot e2e test issue of jsonpath
Signed-off-by: danfengl <danfengl@vmware.com>
2021-11-18 08:54:57 +00:00
Wenkai Yin(尹文开)
11abff4e8d Merge pull request #4341 from blackpiglet/3737-add-logger-for-crd-manager
Fix: add init log option for velero controller-runtime manager.
2021-11-18 13:56:14 +08:00
Xun Jiang/Bruce Jiang
fc29294552 fix: modify generated from schedule's backup name timestamp to UTC ti… (#4353)
* fix: modify generated from schedule's backup name timestamp to UTC timezone

fix #4279
When backup is created from schedule, and the backup name is not specified, a containing-timestamp generated name will be used. Due to velero client not set timezone to UTC, a local timezone will be used for the generated name.

Signed-off-by: Xun Jiang <jxun@vmware.com>

* fix: modify generated from schedule's backup name timestamp to UTC timezone

fix #4279
When backup is created from schedule, and the backup name is not specified, a containing-timestamp generated name will be used. Due to velero client not set timezone to UTC, a local timezone will be used for the generated name.

Signed-off-by: Xun Jiang <jxun@vmware.com>

* fix: modify generated from schedule's backup name timestamp to UTC timezone

fix #4279
When backup is created from schedule, and the backup name is not specified, a containing-timestamp generated name will be used. Due to velero client not set timezone to UTC, a local timezone will be used for the generated name.

Signed-off-by: Xun Jiang <jxun@vmware.com>

* modify changelog description

Reword the changelog description according to comments.

Signed-off-by: Xun Jiang <jxun@vmware.com>

Co-authored-by: jxun <jxun@jxun-a01.vmware.com>
Co-authored-by: Xun Jiang <jxun@vmware.com>
2021-11-17 09:26:49 -05:00
Xun Jiang
2c240c2830 Use logrusr instead of zap.
logrusr is a open source convertor, which can convert logrus logger into logr.
By using logrusr, velero can use exsiting formatted logrus logger, other than introducing zap as a new logger.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2021-11-17 18:10:37 +08:00
David L. Smith-Uchida
5150ce4891 ItemSnapshotter plugin APIs. Addresses #3753 (#4077)
Added ItemSnapshotter.proto
Added item_snapshotter Go interface
Added framework components for item_snapshotter
Updated plugins doc with ItemSnapshotter info
Added SnapshotPhase to item_snapshotter.go
ProgressOutputOutput now includes a phase as well as an error string for problems that occured

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-11-16 16:13:31 -05:00
Frangipani Gold
0a19b394e2 Design doc for delete associated backup and restic repos when BSL is deleted (#4297)
* Update EnableAPIGroupVersion feature design doc as implemented

Signed-off-by: F. Gold <fgold@vmware.com>

* Design doc for issue 2082 to delete associated resources when deleting BSLs

Signed-off-by: F. Gold <fgold@vmware.com>

* Changes per @dsu-igeek review comments

Signed-off-by: F. Gold <fgold@vmware.com>
2021-11-16 09:40:52 -08:00
Scott Seago
3aa204a30d Merge pull request #4350 from reasonerjt/read-pv-az-new
Read Availability zone from nodeAffinity requirements
2021-11-16 08:43:27 -05:00
Xun Jiang
8eee35a62e Fix: add init log option for velero controller-runtime manager.
fix for issue #3737
add log option for velero controller-runtime manager to log return error in reconcile loop.

Signed-off-by: Xun Jiang jxun@vmware.com
Signed-off-by: Xun Jiang <jxun@vmware.com>
2021-11-16 15:42:00 +08:00
Xun Jiang
7b89950031 Fix: add init log option for velero controller-runtime manager.
fix for issue #3737
add log option for velero controller-runtime manager to log return error in reconcile loop.

Signed-off-by: Xun Jiang jxun@vmware.com
Signed-off-by: Xun Jiang <jxun@vmware.com>
2021-11-16 15:37:43 +08:00
Daniel Jiang
5878a52843 Read Availability zone from nodeAffinity requirements
Velero to read the AZ info from `NodeAffinity` of a PV when it's taking
the snapshot.

Fixes #4332

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-11-16 09:44:12 +08:00
Bruce
71d482360f Use factory.Namespace() to replace hardcoded velero namespace (#4346)
* Use factory.Namespace() to replace hardcoded velero namespace

Signed-off-by: half-life666 <half-life@jibudata.com>

* Add change log for pr 4346

Signed-off-by: half-life666 <half-life@jibudata.com>
2021-11-15 20:36:29 -05:00
Wenkai Yin(尹文开)
7c4e03e9f9 Ignore the provided port is already allocated error when restoring the NodePort service (#4336)
Fixes #2308

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-11-15 20:25:04 +08:00
Daniel Jiang
130602d723 Return the error if velero failed to detect S3 region for restic repo (#4343)
The error should be returned explicitly, because when the default URL is
used S3 will return a 301 and the response can't be handled by restic.

Fixes #4178

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-11-15 20:20:27 +08:00
jxun
4a1943f6c9 Fix: add init log option for velero controller-runtime manager.
fix for issue #3737
add log option for velero controller-runtime manager to log return error in reconcile loop.

Signed-off-by: Xun Jiang jxun@vmware.com
Signed-off-by: jxun <jxun@jxun-a01.vmware.com>
2021-11-15 14:07:27 +08:00
Scott Seago
983489073f PV remapClaimRefNS was being skipped when there was no snapshot (#3708)
Signed-off-by: Scott Seago <sseago@redhat.com>
2021-11-09 20:30:16 -05:00
Wenkai Yin(尹文开)
27f3a6d8d8 Check the failed phases either when uploading the snapshot in E2E testing (#4162)
When the snapshot uploading is failed, it should not be treat as completed and continue.
This commit covers both the phases of in progress and failed when uploading snapshot with vSphere plugin

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-11-09 17:13:30 -08:00
Bridget McErlean
e4019f26c1 Only set BSL credential field if provided (#4322)
Previously, the BSL credential field would always be set when using the
`create` command, even if no credential details were provided. This
would result in an empty `SecretKeySelector` in the BSL which would
cause operations using this BSL to fail as Velero would attempt to fetch
a `Secret` with an empty name from the K8s API server.

With this change, the `Credential` field is only set if credential
details have been specified. This change also includes some refactoring
to allow the change to be tested.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-11-09 17:04:58 -08:00
Wenkai Yin(尹文开)
6801ddc9ac Merge pull request #4306 from alaypatel07/fix-paging
fix buggy pager func
2021-11-10 07:53:58 +08:00
Alay Patel
569fc1dc5b add 4306 changelog
Signed-off-by: Alay Patel <alay1431@gmail.com>
2021-11-09 10:34:26 -05:00
Alay Patel
b2fe7fe304 - fix buggy pager func
fix paging items in to use list options passed by the paging function

The client-go pager sets the Limit options for the list call
to paginate the request[1]. This PR fixes the paging function
to use the options passed by the pager instead of shadowed options
This is required for the pagination to work correctly.

- simplify the pager list implementation by using pager.List()
The List() function already implements a lot of the logic that was
needed for paging here, using it simplifies the code.

1. 3f40906dd8/staging/src/k8s.io/client-go/tools/pager/pager.go (L219)

Signed-off-by: Alay Patel <alay1431@gmail.com>
2021-11-09 10:34:26 -05:00
MatthieuFin
08e4138c16 Fix lint issue and test failed
Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
2021-08-31 17:43:09 +02:00
MatthieuFin
338af4e584 update dependancies
Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
2021-08-31 17:27:18 +02:00
MatthieuFin
c4e53b9365 add changelog
Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
2021-08-31 17:25:20 +02:00
MatthieuFin
b0fb9f799b Add doc for new secCtx cm key and missing secCtxAllowPrivilegeEscalation.
Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
2021-08-31 17:21:12 +02:00
MatthieuFin
effa09a42f Add full support for setting securityContext for restic restore container
Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
2021-08-31 17:03:25 +02:00
1395 changed files with 139161 additions and 24606 deletions

View File

@@ -5,15 +5,18 @@ about: Tell us about a problem you are experiencing
---
**What steps did you take and what happened:**
[A clear and concise description of what the bug is, and what commands you ran.)
<!--A clear and concise description of what the bug is, and what commands you ran.-->
**What did you expect to happen:**
**The following information will help us better understand what's going on**:
**The output of the following commands will help us better understand what's going on**:
(Pasting long output into a [GitHub gist](https://gist.github.com) or other pastebin is fine.)
_If you are using velero v1.7.0+:_
Please use `velero debug --backup <backupname> --restore <restorename>` to generate the support bundle, and attach to this issue, more options please refer to `velero debug --help`
_If you are using earlier versions:_
Please provide the output of the following commands (Pasting long output into a [GitHub gist](https://gist.github.com) or other pastebin is fine.)
- `kubectl logs deployment/velero -n velero`
- `velero backup describe <backupname>` or `kubectl get backup/<backupname> -n velero -o yaml`
- `velero backup logs <backupname>`
@@ -22,7 +25,7 @@ about: Tell us about a problem you are experiencing
**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]
<!--Miscellaneous information that will assist in solving the issue.-->
**Environment:**

View File

@@ -5,15 +5,15 @@ about: Suggest an idea for this project
---
**Describe the problem/challenge you have**
[A description of the current limitation/problem/challenge that you are experiencing.]
<!--A description of the current limitation/problem/challenge that you are experiencing.-->
**Describe the solution you'd like**
[A clear and concise description of what you want to happen.]
<!--A clear and concise description of what you want to happen.-->
**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]
<!--Miscellaneous information that will assist in solving the issue.-->
**Environment:**

View File

@@ -9,15 +9,19 @@ reviewers:
groups:
maintainers:
- zubron
- dsu-igeek
- jenting
- sseago
- reasonerjt
- ywk253100
- blackpiglet
- qiuming-best
- shubham-pampattiwar
- Lyndon-Li
tech-writer:
- a-mccarthy
- sseago
- reasonerjt
- ywk253100
- Lyndon-Li
files:
'site/**':

12
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
version: 2
updates:
# Dependencies listed in go.mod
- package-ecosystem: "gomod"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
labels:
- "kind/changelog-not-required"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]

View File

@@ -9,5 +9,5 @@ Fixes #(issue)
# Please indicate you've done the following:
- [ ] [Accepted the DCO](https://velero.io/docs/v1.5/code-standards/#dco-sign-off). Commits without the DCO will delay acceptance.
- [ ] [Created a changelog file](https://velero.io/docs/v1.5/code-standards/#adding-a-changelog) or added `/kind changelog-not-required`.
- [ ] [Created a changelog file](https://velero.io/docs/v1.5/code-standards/#adding-a-changelog) or added `/kind changelog-not-required` as a comment on this pull request.
- [ ] Updated the corresponding documentation in `site/content/docs/main`.

38
.github/stale.yml vendored
View File

@@ -1,38 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14
# Issues with these labels will never be considered stale
exemptLabels:
- Epic
- Area/CLI
- Area/Cloud/AWS
- Area/Cloud/Azure
- Area/Cloud/GCP
- Area/Cloud/vSphere
- Area/CSI
- Area/Design
- Area/Documentation
- Area/Plugins
- Enhancement/User
- kind/tech-debt
- Needs investigation
- P0 - Hair on fire
- P1 - Important
- P2 - Long-term important
- P3 - Wouldn't it be nice if...
- Product Requirements
- Restic - GA
- Restic
- release-blocker
- Security
# Label to use when marking an issue as stale
staleLabel: staled
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Closing the stale issue.

View File

@@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: '1.20.10'
id: go
# Look for a CLI that's made for this PR
- name: Fetch built CLI
@@ -49,7 +49,7 @@ jobs:
run: |
make local
# Check the common CLI against all kubernetes versions
# Check the common CLI against all Kubernetes versions
crd-check:
needs: build-cli
runs-on: ubuntu-latest
@@ -57,14 +57,13 @@ jobs:
matrix:
# Latest k8s versions. There's no series-based tag, nor is there a latest tag.
k8s:
- 1.15.12
- 1.16.15
- 1.17.17
- 1.18.15
- 1.19.7
- 1.20.2
- 1.21.1
- 1.22.0
- 1.23.6
- 1.24.2
- 1.25.3
# All steps run in parallel unless otherwise specified.
# See https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#creating-dependent-jobs
steps:
@@ -82,7 +81,7 @@ jobs:
velero-${{ github.event.pull_request.number }}-
- uses: engineerd/setup-kind@v0.5.0
with:
version: "v0.11.1"
version: "v0.17.0"
image: "kindest/node:v${{ matrix.k8s }}"
- name: Install CRDs
run: |

View File

@@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: '1.20.10'
id: go
# Look for a CLI that's made for this PR
- name: Fetch built CLI
@@ -53,28 +53,26 @@ jobs:
run: |
IMAGE=velero VERSION=pr-test make container
docker save velero:pr-test -o ./velero.tar
# Run E2E test against all kubernetes versions on kind
# Run E2E test against all Kubernetes versions on kind
run-e2e-test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
k8s:
# doesn't cover 1.15 as 1.15 doesn't support "apiextensions.k8s.io/v1" that is needed for the case
#- 1.15.12
- 1.16.15
- 1.17.17
- 1.18.15
- 1.19.7
- 1.20.2
- 1.21.1
- 1.22.0
- 1.19.16
- 1.20.15
- 1.21.12
- 1.22.9
- 1.23.6
- 1.24.0
- 1.25.3
fail-fast: false
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: '1.20.10'
id: go
- name: Check out the code
uses: actions/checkout@v2
@@ -83,7 +81,7 @@ jobs:
docker run -d --rm -p 9000:9000 -e "MINIO_ACCESS_KEY=minio" -e "MINIO_SECRET_KEY=minio123" -e "MINIO_DEFAULT_BUCKETS=bucket,additional-bucket" bitnami/minio:2021.6.17-debian-10-r7
- uses: engineerd/setup-kind@v0.5.0
with:
version: "v0.11.1"
version: "v0.17.0"
image: "kindest/node:v${{ matrix.k8s }}"
- name: Fetch built CLI
id: cli-cache
@@ -115,10 +113,22 @@ jobs:
aws_access_key_id=minio
aws_secret_access_key=minio123
EOF
# Match kubectl version to k8s server version
curl -LO https://dl.k8s.io/release/v${{ matrix.k8s }}/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
GOPATH=~/go CLOUD_PROVIDER=kind \
OBJECT_STORE_PROVIDER=aws BSL_CONFIG=region=minio,s3ForcePathStyle="true",s3Url=http://$(hostname -i):9000 \
CREDS_FILE=/tmp/credential BSL_BUCKET=bucket \
ADDITIONAL_OBJECT_STORE_PROVIDER=aws ADDITIONAL_BSL_CONFIG=region=minio,s3ForcePathStyle="true",s3Url=http://$(hostname -i):9000 \
ADDITIONAL_CREDS_FILE=/tmp/credential ADDITIONAL_BSL_BUCKET=additional-bucket \
GINKGO_FOCUS=Basic VELERO_IMAGE=velero:pr-test \
make -C test/e2e run
GINKGO_FOCUS='Basic\]\[ClusterResource' VELERO_IMAGE=velero:pr-test \
make -C test/e2e run
timeout-minutes: 30
- name: Upload debug bundle
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: DebugBundle
path: /home/runner/work/velero/velero/test/e2e/debug-bundle*

View File

@@ -1,18 +0,0 @@
name: Add issues with a milestone to the milestone's board
on:
issues:
types: [milestoned]
jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: alex-page/github-project-automation-plus@v0.3.0
with:
# Do NOT add PRs to the board, as that's duplication. Their corresponding issue should be on the board.
if: ${{ !github.event.issue.pull_request }}
project: "${{ github.event.issue.milestone.title }}"
column: "To Do"
repo-token: ${{ secrets.GH_TOKEN }}

View File

@@ -0,0 +1,36 @@
name: Trivy Nightly Scan
on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
jobs:
nightly-scan:
name: Trivy nightly scan
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# maintain the versions of Velero those need security scan
versions: [main]
# list of images that need scan
images: [velero, velero-restore-helper]
permissions:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/velero/${{ matrix.images }}:${{ matrix.versions }}'
severity: 'CRITICAL,HIGH,MEDIUM'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'

View File

@@ -1,15 +0,0 @@
name: Move new issues into Triage
on:
issues:
types: [opened]
jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: alex-page/github-project-automation-plus@v0.3.0
with:
project: "Velero Support Board"
column: "New"
repo-token: ${{ secrets.GH_TOKEN }}

View File

@@ -1,5 +1,9 @@
name: Pull Request Changelog Check
on: [pull_request]
# by setting `on: [pull_request]`, that means action will be trigger when PR is opened, synchronize, reopened.
# Add labeled and unlabeled events too.
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
jobs:
build:

View File

@@ -4,11 +4,13 @@ jobs:
build:
name: Run CI
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: '1.20.10'
id: go
- name: Check out the code
uses: actions/checkout@v2
@@ -21,3 +23,10 @@ jobs:
${{ runner.os }}-go-
- name: Make ci
run: make ci
- name: Upload test coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
verbose: true
fail_ci_if_error: true

View File

@@ -14,7 +14,44 @@ jobs:
uses: codespell-project/actions-codespell@master
with:
# ignore the config/.../crd.go file as it's generated binary data that is edited elswhere.
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go
ignore_words_list: iam,aks,ist,bridget,ue
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go,./config/crd/v2alpha1/crds/crds.go,./go.sum,./LICENSE
ignore_words_list: iam,aks,ist,bridget,ue,shouldnot,atleast
check_filenames: true
check_hidden: true
- name: Velero.io word list check
shell: bash {0}
run: |
IGNORE_COMMENT="Velero.io word list : ignore"
FILES_TO_CHECK=$(find . -type f \
! -path "./.git/*" \
! -path "./site/content/docs/v*" \
! -path "./changelogs/CHANGELOG-*" \
! -path "./.github/workflows/pr-codespell.yml" \
! -path "./site/static/fonts/Metropolis/Open Font License.md" \
! -regex '.*\.\(png\|jpg\|woff\|ttf\|gif\|ico\|svg\)'
)
function check_word_in_files() {
local word=$1
xargs grep -Iinr "$word" <<< "$FILES_TO_CHECK" | \
grep -v "$IGNORE_COMMENT" | \
grep -i --color=always "$word" && \
EXIT_STATUS=1
}
function check_word_case_sensitive_in_files() {
local word=$1
xargs grep -Inr "$word" <<< "$FILES_TO_CHECK" | \
grep -v "$IGNORE_COMMENT" | \
grep --color=always "$word" && \
EXIT_STATUS=1
}
EXIT_STATUS=0
check_word_case_sensitive_in_files ' kubernetes '
check_word_in_files 'on-premise\b'
check_word_in_files 'back-up'
check_word_in_files 'plug-in'
check_word_in_files 'whitelist'
check_word_in_files 'blacklist'
exit $EXIT_STATUS

37
.github/workflows/pr-containers.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: build Velero containers on Dockerfile change
on:
pull_request:
branches:
- 'main'
- 'release-**'
paths:
- 'Dockerfile'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
# Although this action also calls docker-push.sh, it is not triggered
# by push, so BRANCH and TAG are empty by default. docker-push.sh will
# only build Velero image without pushing.
- name: Make Velero container without pushing to registry.
if: github.repository == 'vmware-tanzu/velero'
run: |
./hack/docker-push.sh

29
.github/workflows/pr-goreleaser.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Verify goreleaser change
on:
pull_request:
branches:
- 'main'
- 'release-**'
paths:
- '.goreleaser.yml'
- 'hack/release-tools/goreleaser.sh'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout
- name: Verify .goreleaser.yml and try a dryrun release.
if: github.repository == 'vmware-tanzu/velero'
run: |
CHANGELOG=$(ls changelogs | sort -V -r | head -n 1)
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
REGISTRY=velero \
RELEASE_NOTES_FILE=changelogs/$CHANGELOG \
PUBLISH=false \
make release

View File

@@ -12,7 +12,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
with:
# The default value is "1" which fetches only a single commit. If we merge PR without squash or rebase,
# there are at least two commits: the first one is the merge commit and the second one is the real commit
# contains the changes.
# As we use the Dockerfile's commit ID as the tag of the build-image, fetching only 1 commit causes the merge
# commit ID to be the tag.
# While when running make commands locally, as the local git repository usually contains all commits, the Dockerfile's
# commit ID is the second one. This is mismatch with the images in Dockerhub
fetch-depth: 2
- name: Build
run: make build-image

View File

@@ -2,7 +2,9 @@ name: Main CI
on:
push:
branches: [ main ]
branches:
- 'main'
- 'release-**'
tags:
- '*'
@@ -14,13 +16,24 @@ jobs:
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: '1.20.10'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/checkout@v3
# Fix issue of setup-gcloud
- run: |
sudo apt-get install python2.7
export CLOUDSDK_PYTHON="/usr/bin/python2"
- uses: google-github-actions/setup-gcloud@v0
with:
version: '285.0.0'
service_account_key: ${{ secrets.GCS_SA_KEY }}
export_default_credentials: true
- run: gcloud info
- name: Set up QEMU
id: qemu
@@ -35,14 +48,56 @@ jobs:
version: latest
- name: Build
run: make local
run: |
make local
# Clean go cache to ease the build environment storage pressure.
go clean -modcache -cache
- name: Test
run: make test
- name: Upload test coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
verbose: true
# Use the JSON key in secret to login gcr.io
- uses: 'docker/login-action@v2'
with:
registry: 'gcr.io' # or REGION.docker.pkg.dev
username: '_json_key'
password: '${{ secrets.GCR_SA_KEY }}'
# Only try to publish the container image from the root repo; forks don't have permission to do so and will always get failures.
- name: Publish container image
if: github.repository == 'vmware-tanzu/velero'
run: |
sudo swapoff -a
sudo rm -f /mnt/swapfile
docker image prune -a --force
# Build and push Velero image to docker registry
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
./hack/docker-push.sh
VERSION=$(./hack/docker-push.sh | grep 'VERSION:' | awk -F: '{print $2}' | xargs)
# Upload Velero image package to GCS
source hack/ci/build_util.sh
BIN=velero
RESTORE_HELPER_BIN=velero-restore-helper
GCS_BUCKET=velero-builds
VELERO_IMAGE=${BIN}-${VERSION}
VELERO_RESTORE_HELPER_IMAGE=${RESTORE_HELPER_BIN}-${VERSION}
VELERO_IMAGE_FILE=${VELERO_IMAGE}.tar.gz
VELERO_RESTORE_HELPER_IMAGE_FILE=${VELERO_RESTORE_HELPER_IMAGE}.tar.gz
VELERO_IMAGE_BACKUP_FILE=${VELERO_IMAGE}-'build.'${GITHUB_RUN_NUMBER}.tar.gz
VELERO_RESTORE_HELPER_IMAGE_BACKUP_FILE=${VELERO_RESTORE_HELPER_IMAGE}-'build.'${GITHUB_RUN_NUMBER}.tar.gz
cp ${VELERO_IMAGE_FILE} ${VELERO_IMAGE_BACKUP_FILE}
cp ${VELERO_RESTORE_HELPER_IMAGE_FILE} ${VELERO_RESTORE_HELPER_IMAGE_BACKUP_FILE}
uploader ${VELERO_IMAGE_FILE} ${GCS_BUCKET}
uploader ${VELERO_RESTORE_HELPER_IMAGE_FILE} ${GCS_BUCKET}
uploader ${VELERO_IMAGE_BACKUP_FILE} ${GCS_BUCKET}
uploader ${VELERO_RESTORE_HELPER_IMAGE_BACKUP_FILE} ${GCS_BUCKET}

View File

@@ -1,8 +1,7 @@
name: "Close stale issues and PRs"
on:
schedule:
# First of every month
- cron: "30 1 * * *"
- cron: "30 1 * * *" # Every day at 1:30 UTC
jobs:
stale:
@@ -11,14 +10,14 @@ jobs:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. If a Velero team member has requested log or more information, please provide the output of the shared commands."
close-issue-message: "This issue was closed because it has been stalled for 5 days with no activity."
days-before-issue-stale: 30
days-before-issue-close: 5
stale-issue-message: "This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands."
close-issue-message: "This issue was closed because it has been stalled for 14 days with no activity."
days-before-issue-stale: 60
days-before-issue-close: 14
stale-issue-label: staled
# Disable stale PRs for now; they can remain open.
days-before-pr-stale: -1
days-before-pr-close: -1
# Only issues made after Feb 09 2021.
start-date: "2021-09-02T00:00:00"
# Only make issues stale if they have these labels. Comma separated.
only-labels: "Needs info,Duplicate"
exempt-issue-labels: "Epic,Area/CLI,Area/Cloud/AWS,Area/Cloud/Azure,Area/Cloud/GCP,Area/Cloud/vSphere,Area/CSI,Area/Design,Area/Documentation,Area/Plugins,Bug,Enhancement/User,kind/requirement,kind/refactor,kind/tech-debt,limitation,Needs investigation,Needs triage,Needs Product,P0 - Hair on fire,P1 - Important,P2 - Long-term important,P3 - Wouldn't it be nice if...,Product Requirements,Restic - GA,Restic,release-blocker,Security"

8
.gitignore vendored
View File

@@ -38,6 +38,7 @@ _testmain.go
# Hugo compiled data
site/public
site/resources
site/.hugo_build.lock
.vs
@@ -46,5 +47,10 @@ _tiltbuild
tilt-resources/tilt-settings.json
tilt-resources/velero_v1_backupstoragelocation.yaml
tilt-resources/deployment.yaml
tilt-resources/restic.yaml
tilt-resources/node-agent.yaml
tilt-resources/cloud
# test generated files
test/e2e/report.xml
coverage.out
__debug_bin*

View File

@@ -14,7 +14,7 @@
dist: _output
builds:
- main: ./cmd/velero/main.go
- main: ./cmd/velero/velero.go
env:
- CGO_ENABLED=0
goos:
@@ -27,11 +27,9 @@ builds:
- arm64
- ppc64le
ignore:
# don't build arm/arm64 for darwin or windows
# don't build arm for darwin and arm/arm64 for windows
- goos: darwin
goarch: arm
- goos: darwin
goarch: arm64
- goos: darwin
goarch: ppc64le
- goos: windows
@@ -48,6 +46,9 @@ archives:
files:
- LICENSE
- examples/**/*
# Add the setting to resolve the DEPRECATED warning. Actually, Velero's case is not affected by the rlcp behavior change.
# https://github.com/orgs/goreleaser/discussions/3659#discussioncomment-4587257
rlcp: true
checksum:
name_template: 'CHECKSUM'
release:
@@ -56,3 +57,10 @@ release:
name: velero
draft: true
prerelease: auto
git:
# What should be used to sort tags when gathering the current and previous
# tags if there are more than one tag in the same commit.
#
# Default: `-version:refname`
tag_sort: -version:creatordate

View File

@@ -3,6 +3,7 @@
If you're using Velero and want to add your organization to this list,
[follow these directions][1]!
<a href="https://www.pitsdatarecovery.net/" border="0" target="_blank"><img alt="pitsdatarecovery.net" src="site/static/img/adopters/PITSGlobalDataRecoveryServices.svg" height="50"></a>
<a href="https://www.bitgo.com" border="0" target="_blank"><img alt="bitgo.com" src="site/static/img/adopters/BitGo.svg" height="50"></a>&nbsp; &nbsp; &nbsp;
<a href="https://www.nirmata.com" border="0" target="_blank"><img alt="nirmata.com" src="site/static/img/adopters/nirmata.svg" height="50"></a>&nbsp; &nbsp; &nbsp;
<a href="https://kyma-project.io/" border="0" target="_blank"><img alt="kyma-project.io" src="site/static/img/adopters/kyma.svg" height="50"></a>&nbsp; &nbsp; &nbsp;
@@ -14,17 +15,17 @@ If you're using Velero and want to add your organization to this list,
<a href="https://sighup.io/" border="0" target="_blank"><img alt="sighup.io" src="site/static/img/adopters/sighup.svg" height="50"></a>&nbsp; &nbsp; &nbsp;
<a href="https://mayadata.io/" border="0" target="_blank"><img alt="mayadata.io" src="site/static/img/adopters/mayadata.svg" height="50"></a>&nbsp; &nbsp; &nbsp;
<a href="https://www.replicated.com/" border="0" target="_blank"><img alt="replicated.com" src="site/static/img/adopters/replicated-logo-red.svg" height="50"></a>
<a href="https://cloudcasa.io/" border="0" target="_blank"><img alt="cloudcasa.io" src="site/static/img/adopters/cloudcasa.svg" height="50"></a>
## Success Stories
Below is a list of adopters of Velero in **production environments** that have
publicly shared the details of how they use it.
**[BitGo][20]**
BitGo uses Velero backup and restore capabilities to seamlessly provision and scale fullnode statefulsets on the fly as well as having it serve an integral piece for our kubernetes disaster-recovery story.
BitGo uses Velero backup and restore capabilities to seamlessly provision and scale fullnode statefulsets on the fly as well as having it serve an integral piece for our Kubernetes disaster-recovery story.
**[Bugsnag][30]**
We use Velero for managing backups of an internal instance of our on-premise clustered solution. We also recommend our users of [on-premise Bugsnag installations][31] use Velero for [managing their own backups][32].
We use Velero for managing backups of an internal instance of our on-premise clustered solution. We also recommend our users of [on-premise Bugsnag installations](https://www.bugsnag.com/on-premise) use Velero for [managing their own backups](https://docs.bugsnag.com/on-premise/clustered/backup-restore/). <!-- Velero.io word list : ignore -->
**[Banzai Cloud][60]**
[Banzai Cloud Pipeline][61] is a Kubernetes-based microservices platform that integrates services needed for Day-1 and Day-2 operations along with first-class support both for on-prem and hybrid multi-cloud deployments. We use Velero to periodically [backup and restore these clusters in case of disasters][62].
@@ -40,7 +41,9 @@ We have integrated our [solution with Velero][11] to provide our customers with
Kyma [integrates with Velero][41] to effortlessly back up and restore Kyma clusters with all its resources. Velero capabilities allow Kyma users to define and run manual and scheduled backups in order to successfully handle a disaster-recovery scenario.
**[Red Hat][50]**
Red Hat has developed the [Cluster Application Migration Tool][51] which uses [Velero and Restic][52] to drive the migration of applications between OpenShift clusters.
Red Hat has developed 2 operators for the OpenShift platform:
- [Migration Toolkit for Containers][51] (Crane): This operator uses [Velero and Restic][52] to drive the migration of applications between OpenShift clusters.
- [OADP (OpenShift API for Data Protection) Operator][53]: This operator sets up and installs Velero on the OpenShift platform, allowing users to backup and restore applications.
**[Dell EMC][70]**
For Kubernetes environments, [PowerProtect Data Manager][71] leverages the Container Storage Interface (CSI) framework to take snapshots to back up the persistent data or the data that the application creates e.g. databases. [Dell EMC leverages Velero][72] to backup the namespace configuration files (also known as Namespace meta data) for enterprise grade data protection.
@@ -56,8 +59,11 @@ MayaData is a large user of Velero as well as a contributor. MayaData offers a D
Okteto integrates Velero in [Okteto Cloud][94] and [Okteto Enterprise][95] to periodically backup and restore our clusters for disaster recovery. Velero is also a core software building block to provide namespace cloning capabilities, a feature that allows our users cloning staging environments into their personal development namespace for providing production-like development environments.
**[Replicated][100]**<br>
Replicated uses the Velero open source project to enable snapshots in [KOTS][101] to backup Kubernetes manifests & persistent volumes. In addition to the default functionality that Velero provides, [KOTS][101] provides a detailed interface in the [Admin Console][102] that can be used to manage the storage destination and schedule, and to perform and monitor the backup and restore process.
Replicated uses the Velero open source project to enable snapshots in [KOTS][101] to backup Kubernetes manifests & persistent volumes. In addition to the default functionality that Velero provides, [KOTS][101] provides a detailed interface in the [Admin Console][102] that can be used to manage the storage destination and schedule, and to perform and monitor the backup and restore process.<br>
**[CloudCasa][103]**<br>
[Catalogic Software][104] integrates Velero with [CloudCasa][103] - A Smart Home in the Cloud for Backups. CloudCasa is a simple, scalable, cloud-native solution providing data protection and disaster recovery as a service. This solution is built using Kubernetes for protecting Kubernetes clusters.<br>
## Adding your organization to the list of Velero Adopters
If you are using Velero and would like to be included in the list of `Velero Adopters`, add an SVG version of your logo to the `site/static/img/adopters` directory in this repo and submit a [pull request][3] with your change. Name the image file something that reflects your company (e.g., if your company is called Acme, name the image acme.png). See this for an example [PR][4].
@@ -77,8 +83,6 @@ If you would like to add your logo to a future `Adopters of Velero` section on [
[20]: https://bitgo.com
[30]: https://bugsnag.com
[31]: https://www.bugsnag.com/on-premise
[32]: https://docs.bugsnag.com/on-premise/clustered/backup-restore/
[40]: https://kyma-project.io
[41]: https://kyma-project.io/docs/components/backup/#overview-overview
@@ -86,6 +90,7 @@ If you would like to add your logo to a future `Adopters of Velero` section on [
[50]: https://redhat.com
[51]: https://github.com/fusor/mig-operator
[52]: https://github.com/fusor/mig-operator/blob/master/docs/usage/2.md
[53]: https://github.com/openshift/oadp-operator
[60]: https://banzaicloud.com
[61]: https://banzaicloud.com/products/pipeline/
@@ -110,3 +115,6 @@ If you would like to add your logo to a future `Adopters of Velero` section on [
[100]: https://www.replicated.com
[101]: https://kots.io
[102]: https://kots.io/kotsadm/snapshots/overview/
[103]: https://cloudcasa.io/
[104]: https://www.catalogicsoftware.com/

View File

@@ -1,7 +1,11 @@
## Current release:
* [CHANGELOG-1.7.md][17]
* [CHANGELOG-1.11.md][21]
## Older releases:
* [CHANGELOG-1.10.md][20]
* [CHANGELOG-1.9.md][19]
* [CHANGELOG-1.8.md][18]
* [CHANGELOG-1.7.md][17]
* [CHANGELOG-1.6.md][16]
* [CHANGELOG-1.5.md][15]
* [CHANGELOG-1.4.md][14]
@@ -20,6 +24,10 @@
* [CHANGELOG-0.3.md][1]
[21]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.11.md
[20]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.10.md
[19]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.9.md
[18]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.8.md
[17]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.7.md
[16]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.6.md
[15]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.5.md

View File

@@ -11,50 +11,72 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM --platform=$BUILDPLATFORM golang:1.16 as builder-env
# Velero binary build section
FROM --platform=$BUILDPLATFORM golang:1.20.10-bullseye as velero-builder
ARG GOPROXY
ARG BIN
ARG PKG
ARG VERSION
ARG REGISTRY
ARG GIT_SHA
ARG GIT_TREE_STATE
ARG REGISTRY
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
ENV CGO_ENABLED=0 \
GO111MODULE=on \
GOPROXY=${GOPROXY} \
GOOS=${TARGETOS} \
GOARCH=${TARGETARCH} \
GOARM=${TARGETVARIANT} \
LDFLAGS="-X ${PKG}/pkg/buildinfo.Version=${VERSION} -X ${PKG}/pkg/buildinfo.GitSHA=${GIT_SHA} -X ${PKG}/pkg/buildinfo.GitTreeState=${GIT_TREE_STATE} -X ${PKG}/pkg/buildinfo.ImageRegistry=${REGISTRY}"
WORKDIR /go/src/github.com/vmware-tanzu/velero
COPY . /go/src/github.com/vmware-tanzu/velero
RUN apt-get update && apt-get install -y bzip2
RUN mkdir -p /output/usr/bin && \
export GOARM=$( echo "${GOARM}" | cut -c2-) && \
go build -o /output/${BIN} \
-ldflags "${LDFLAGS}" ${PKG}/cmd/${BIN} && \
go build -o /output/velero-helper \
-ldflags "${LDFLAGS}" ${PKG}/cmd/velero-helper && \
go clean -modcache -cache
FROM --platform=$BUILDPLATFORM builder-env as builder
# Restic binary build section
FROM --platform=$BUILDPLATFORM golang:1.20.10-bullseye as restic-builder
ARG BIN
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
ARG PKG
ARG BIN
ARG RESTIC_VERSION
ENV GOOS=${TARGETOS} \
ENV CGO_ENABLED=0 \
GO111MODULE=on \
GOPROXY=${GOPROXY} \
GOOS=${TARGETOS} \
GOARCH=${TARGETARCH} \
GOARM=${TARGETVARIANT}
COPY . /go/src/github.com/vmware-tanzu/velero
RUN mkdir -p /output/usr/bin && \
bash ./hack/download-restic.sh && \
export GOARM=$( echo "${GOARM}" | cut -c2-) && \
go build -o /output/${BIN} \
-ldflags "${LDFLAGS}" ${PKG}/cmd/${BIN}
export GOARM=$(echo "${GOARM}" | cut -c2-) && \
/go/src/github.com/vmware-tanzu/velero/hack/build-restic.sh && \
go clean -modcache -cache
FROM gcr.io/distroless/base-debian10:nonroot
# Velero image packing section
FROM paketobuildpacks/run-jammy-tiny:0.2.5
LABEL maintainer="Nolan Brubaker <brubakern@vmware.com>"
LABEL maintainer="Xun Jiang <jxun@vmware.com>"
COPY --from=builder /output /
COPY --from=velero-builder /output /
USER nonroot:nonroot
COPY --from=restic-builder /output /
USER cnb:cnb

View File

@@ -4,14 +4,16 @@
## Maintainers
| Maintainer | GitHub ID | Affiliation |
| --------------- | --------- | ----------- |
| Bridget McErlean | [zubron](https://github.com/zubron) | [VMware](https://www.github.com/vmware/) |
| Dave Smith-Uchida | [dsu-igeek](https://github.com/dsu-igeek) | [VMware](https://www.github.com/vmware/) |
| JenTing Hsiao | [jenting](https://github.com/jenting) | [SUSE](https://github.com/SUSE/)
| Scott Seago | [sseago](https://github.com/sseago) | [OpenShift](https://github.com/openshift)
| Daniel Jiang | [reasonerjt](https://github.com/reasonerjt) | [VMware](https://www.github.com/vmware/)
| Wenkai Yin | [ywk253100](https://github.com/ywk253100) | [VMware](https://www.github.com/vmware/) |
| Maintainer | GitHub ID | Affiliation |
|---------------------|---------------------------------------------------------------|-------------------------------------------|
| Dave Smith-Uchida | [dsu-igeek](https://github.com/dsu-igeek) | [Kasten](https://github.com/kastenhq/) |
| Scott Seago | [sseago](https://github.com/sseago) | [OpenShift](https://github.com/openshift) |
| Daniel Jiang | [reasonerjt](https://github.com/reasonerjt) | [VMware](https://www.github.com/vmware/) |
| Wenkai Yin | [ywk253100](https://github.com/ywk253100) | [VMware](https://www.github.com/vmware/) |
| Xun Jiang | [blackpiglet](https://github.com/blackpiglet) | [VMware](https://www.github.com/vmware/) |
| Ming Qiu | [qiuming-best](https://github.com/qiuming-best) | [VMware](https://www.github.com/vmware/) |
| Shubham Pampattiwar | [shubham-pampattiwar](https://github.com/shubham-pampattiwar) | [OpenShift](https://github.com/openshift) |
| Yonghui Li | [Lyndon-Li](https://github.com/Lyndon-Li) | [VMware](https://www.github.com/vmware/) |
## Emeritus Maintainers
* Adnan Abdulhussein ([prydonius](https://github.com/prydonius))
@@ -21,14 +23,17 @@
* Nolan Brubaker ([nrb](https://github.com/nrb))
* Ashish Amarnath ([ashish-amarnath](https://github.com/ashish-amarnath))
* Carlisia Thompson ([carlisia](https://github.com/carlisia))
* Bridget McErlean ([zubron](https://github.com/zubron))
* JenTing Hsiao ([jenting](https://github.com/jenting))
## Velero Contributors & Stakeholders
| Feature Area | Lead |
| ----------------------------- | :---------------------: |
| Architect | Dave Smith-Uchida (dsu-igeek) |
| Technical Lead | Daniel Jiang (reasonerjt) |
| Kubernetes CSI Liaison | |
| Deployment | JenTing Hsiao (jenting) |
| Community Management | Jonas Rosland (jonasrosland) |
| Product Management | Eleanor Millman (eleanor-millman) |
| Feature Area | Lead |
|------------------------|:------------------------------------------------------------------------------------:|
| Architect | Dave Smith-Uchida [dsu-igeek](https://github.com/dsu-igeek) |
| Technical Lead | Daniel Jiang [reasonerjt](https://github.com/reasonerjt) |
| Kubernetes CSI Liaison | |
| Deployment | |
| Community Management | Orlin Vasilev [OrlinVasilev](https://github.com/OrlinVasilev) |
| Product Management | Pradeep Kumar Chaturvedi [pradeepkchaturvedi](https://github.com/pradeepkchaturvedi) |

View File

@@ -22,9 +22,11 @@ PKG := github.com/vmware-tanzu/velero
# Where to push the docker image.
REGISTRY ?= velero
GCR_REGISTRY ?= gcr.io/velero-gcp
# Image name
IMAGE ?= $(REGISTRY)/$(BIN)
GCR_IMAGE ?= $(GCR_REGISTRY)/$(BIN)
# We allow the Dockerfile to be configurable to enable the use of custom Dockerfiles
# that pull base images from different registries.
@@ -66,8 +68,10 @@ TAG_LATEST ?= false
ifeq ($(TAG_LATEST), true)
IMAGE_TAGS ?= $(IMAGE):$(VERSION) $(IMAGE):latest
GCR_IMAGE_TAGS ?= $(GCR_IMAGE):$(VERSION) $(GCR_IMAGE):latest
else
IMAGE_TAGS ?= $(IMAGE):$(VERSION)
GCR_IMAGE_TAGS ?= $(GCR_IMAGE):$(VERSION)
endif
ifeq ($(shell docker buildx inspect 2>/dev/null | awk '/Status/ { print $$2 }'), running)
@@ -82,9 +86,9 @@ see: https://velero.io/docs/main/build-from-source/#making-images-and-updating-v
endef
# The version of restic binary to be downloaded
RESTIC_VERSION ?= 0.12.1
RESTIC_VERSION ?= 0.15.0
CLI_PLATFORMS ?= linux-amd64 linux-arm linux-arm64 darwin-amd64 windows-amd64 linux-ppc64le
CLI_PLATFORMS ?= linux-amd64 linux-arm linux-arm64 darwin-amd64 darwin-arm64 windows-amd64 linux-ppc64le
BUILDX_PLATFORMS ?= $(subst -,/,$(ARCH))
BUILDX_OUTPUT_TYPE ?= docker
@@ -96,9 +100,6 @@ else
GIT_TREE_STATE ?= clean
endif
# The default linters used by lint and local-lint
LINTERS ?= "gosec,goconst,gofmt,goimports,unparam"
###
### These variables should not need tweaking.
###
@@ -112,19 +113,20 @@ GOPROXY ?= https://proxy.golang.org
# If you want to build all containers, see the 'all-containers' rule.
all:
@$(MAKE) build
@$(MAKE) build BIN=velero-restic-restore-helper
@$(MAKE) build BIN=velero-restore-helper
build-%:
@$(MAKE) --no-print-directory ARCH=$* build
@$(MAKE) --no-print-directory ARCH=$* build BIN=velero-restic-restore-helper
@$(MAKE) --no-print-directory ARCH=$* build BIN=velero-restore-helper
all-build: $(addprefix build-, $(CLI_PLATFORMS))
all-containers: container-builder-env
all-containers:
@$(MAKE) --no-print-directory container
@$(MAKE) --no-print-directory container BIN=velero-restic-restore-helper
@$(MAKE) --no-print-directory container BIN=velero-restore-helper
local: build-dirs
# Add DEBUG=1 to enable debug locally
GOOS=$(GOOS) \
GOARCH=$(GOARCH) \
VERSION=$(VERSION) \
@@ -162,6 +164,7 @@ shell: build-dirs build-env
@# under $GOPATH).
@docker run \
-e GOFLAGS \
-e GOPROXY \
-i $(TTY) \
--rm \
-u $$(id -u):$$(id -g) \
@@ -176,20 +179,6 @@ shell: build-dirs build-env
$(BUILDER_IMAGE) \
/bin/sh $(CMD)
container-builder-env:
ifneq ($(BUILDX_ENABLED), true)
$(error $(BUILDX_ERROR))
endif
@docker buildx build \
--target=builder-env \
--build-arg=GOPROXY=$(GOPROXY) \
--build-arg=PKG=$(PKG) \
--build-arg=VERSION=$(VERSION) \
--build-arg=GIT_SHA=$(GIT_SHA) \
--build-arg=GIT_TREE_STATE=$(GIT_TREE_STATE) \
--build-arg=REGISTRY=$(REGISTRY) \
-f $(VELERO_DOCKERFILE) .
container:
ifneq ($(BUILDX_ENABLED), true)
$(error $(BUILDX_ERROR))
@@ -198,6 +187,8 @@ endif
--output=type=$(BUILDX_OUTPUT_TYPE) \
--platform $(BUILDX_PLATFORMS) \
$(addprefix -t , $(IMAGE_TAGS)) \
$(addprefix -t , $(GCR_IMAGE_TAGS)) \
--build-arg=GOPROXY=$(GOPROXY) \
--build-arg=PKG=$(PKG) \
--build-arg=BIN=$(BIN) \
--build-arg=VERSION=$(VERSION) \
@@ -207,6 +198,12 @@ endif
--build-arg=RESTIC_VERSION=$(RESTIC_VERSION) \
-f $(VELERO_DOCKERFILE) .
@echo "container: $(IMAGE):$(VERSION)"
ifeq ($(BUILDX_OUTPUT_TYPE)_$(REGISTRY), registry_velero)
docker pull $(IMAGE):$(VERSION)
rm -f $(BIN)-$(VERSION).tar
docker save $(IMAGE):$(VERSION) -o $(BIN)-$(VERSION).tar
gzip -f $(BIN)-$(VERSION).tar
endif
SKIP_TESTS ?=
test: build-dirs
@@ -226,27 +223,21 @@ endif
lint:
ifneq ($(SKIP_TESTS), 1)
@$(MAKE) shell CMD="-c 'hack/lint.sh $(LINTERS)'"
@$(MAKE) shell CMD="-c 'hack/lint.sh'"
endif
local-lint:
ifneq ($(SKIP_TESTS), 1)
@hack/lint.sh $(LINTERS)
endif
lint-all:
ifneq ($(SKIP_TESTS), 1)
@$(MAKE) shell CMD="-c 'hack/lint.sh $(LINTERS) true'"
endif
local-lint-all:
ifneq ($(SKIP_TESTS), 1)
@hack/lint.sh $(LINTERS) true
@hack/lint.sh
endif
update:
@$(MAKE) shell CMD="-c 'hack/update-all.sh'"
# update-crd is for development purpose only, it is faster than update, so is a shortcut when you want to generate CRD changes only
update-crd:
@$(MAKE) shell CMD="-c 'hack/update-3generated-crd-code.sh'"
build-dirs:
@mkdir -p _output/bin/$(GOOS)/$(GOARCH)
@mkdir -p .go/src/$(PKG) .go/pkg .go/bin .go/std/$(GOOS)/$(GOARCH) .go/go-build .go/golangci-lint
@@ -338,9 +329,9 @@ changelog:
# PUBLISH=false \
# make release
#
# To run the release, which will publish a *DRAFT* GitHub release in github.com/vmware-tanzu/velero
# To run the release, which will publish a *DRAFT* GitHub release in github.com/vmware-tanzu/velero
# (you still need to review/publish the GitHub release manually):
# GITHUB_TOKEN=your-github-token \
# GITHUB_TOKEN=your-github-token \
# RELEASE_NOTES_FILE=changelogs/CHANGELOG-1.2.md \
# PUBLISH=true \
# make release
@@ -358,8 +349,8 @@ serve-docs: build-image-hugo
-v "$$(pwd)/site:/srv/hugo" \
-it -p 1313:1313 \
$(HUGO_IMAGE) \
hugo server --bind=0.0.0.0 --enableGitInfo=false
# gen-docs generates a new versioned docs directory under site/content/docs.
server --bind=0.0.0.0 --enableGitInfo=false
# gen-docs generates a new versioned docs directory under site/content/docs.
# Please read the documentation in the script for instructions on how to use it.
gen-docs:
@hack/release-tools/gen-docs.sh
@@ -367,3 +358,10 @@ gen-docs:
.PHONY: test-e2e
test-e2e: local
$(MAKE) -e VERSION=$(VERSION) -C test/e2e run
.PHONY: test-perf
test-perf: local
$(MAKE) -e VERSION=$(VERSION) -C test/perf run
go-generate:
go generate ./pkg/...

View File

@@ -1,7 +0,0 @@
domain: io
repo: github.com/vmware-tanzu/velero
resources:
- group: velero
kind: BackupStorageLocation
version: v1
version: "2"

View File

@@ -1,11 +1,13 @@
![100]
[![Build Status][1]][2] [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3811/badge)](https://bestpractices.coreinfrastructure.org/projects/3811)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/vmware-tanzu/velero)
## Overview
Velero (formerly Heptio Ark) gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. You can run Velero with a public cloud platform or on-premises. Velero lets you:
Velero (formerly Heptio Ark) gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. You can run Velero with a public cloud platform or on-premises.
Velero lets you:
* Take backups of your cluster and restore in case of loss.
* Migrate cluster resources to other clusters.
@@ -18,7 +20,7 @@ Velero consists of:
## Documentation
[The documentation][29] provides a getting started guide and information about building from source, architecture, extending Velero, and more.
[The documentation][29] provides a getting started guide and information about building from source, architecture, extending Velero and more.
Please use the version selector at the top of the site to ensure you are using the appropriate documentation for your version of Velero.
@@ -34,6 +36,26 @@ If you are ready to jump in and test, add code, or help with documentation, foll
See [the list of releases][6] to find out about feature changes.
### Velero compatibility matrix
The following is a list of the supported Kubernetes versions for each Velero version.
| Velero version | Expected Kubernetes version compatibility | Tested on Kubernetes version |
|----------------|-------------------------------------------|----------------------------------------|
| 1.12 | 1.18-latest | 1.25.7, 1.26.5, 1.26.7, and 1.27.3 |
| 1.11 | 1.18-latest | 1.23.10, 1.24.9, 1.25.5, and 1.26.1 |
| 1.10 | 1.18-latest | 1.22.5, 1.23.8, 1.24.6 and 1.25.1 |
| 1.9 | 1.18-latest | 1.20.5, 1.21.2, 1.22.5, 1.23, and 1.24 |
| 1.8 | 1.18-latest | |
Velero supports IPv4, IPv6, and dual stack environments. Support for this was tested against Velero v1.8.
The Velero maintainers are continuously working to expand testing coverage, but are not able to test every combination of Velero and supported Kubernetes versions for each Velero release. The table above is meant to track the current testing coverage and the expected supported Kubernetes versions for each Velero version. If you have a question about test coverage before v1.9, please reach out in the [#velero-users](https://kubernetes.slack.com/archives/C6VCGP4MT) Slack channel.
If you are interested in using a different version of Kubernetes with a given Velero version, we'd recommend that you perform testing before installing or upgrading your environment. For full information around capabilities within a release, also see the Velero [release notes](https://github.com/vmware-tanzu/velero/releases) or Kubernetes [release notes](https://github.com/kubernetes/kubernetes/tree/master/CHANGELOG). See the Velero [support page](https://velero.io/docs/latest/support-process/) for information about supported versions of Velero.
For each release, Velero maintainers run the test to ensure the upgrade path from n-2 minor release. For example, before the release of v1.10.x, the test will verify that the backup created by v1.9.x and v1.8.x can be restored using the build to be tagged as v1.10.x.
[1]: https://github.com/vmware-tanzu/velero/workflows/Main%20CI/badge.svg
[2]: https://github.com/vmware-tanzu/velero/actions?query=workflow%3A"Main+CI"
[4]: https://github.com/vmware-tanzu/velero/issues

View File

@@ -1,42 +1 @@
## Velero Roadmap
### About this document
This document provides a link to the [Velero Project boards](https://github.com/vmware-tanzu/velero/projects) that serves as the up to date description of items that are in the release pipeline. The release boards have separate swim lanes based on prioritization. Most items are gathered from the community or include a feedback loop with the community. This should serve as a reference point for Velero users and contributors to understand where the project is heading, and help determine if a contribution could be conflicting with a longer term plan.
### How to help?
Discussion on the roadmap can take place in threads under [Issues](https://github.com/vmware-tanzu/velero/issues) or in [community meetings](https://velero.io/community/). Please open and comment on an issue if you want to provide suggestions, use cases, and feedback to an item in the roadmap. Please review the roadmap to avoid potential duplicated effort.
### How to add an item to the roadmap?
One of the most important aspects in any open source community is the concept of proposals. Large changes to the codebase and / or new features should be preceded by a [proposal](https://github.com/vmware-tanzu/velero/blob/main/GOVERNANCE.md#proposal-process) in our repo.
For smaller enhancements, you can open an issue to track that initiative or feature request.
We work with and rely on community feedback to focus our efforts to improve Velero and maintain a healthy roadmap.
### Current Roadmap
The following table includes the current roadmap for Velero. If you have any questions or would like to contribute to Velero, please attend a [community meeting](https://velero.io/community/) to discuss with our team. If you don't know where to start, we are always looking for contributors that will help us reduce technical, automation, and documentation debt.
Please take the timelines & dates as proposals and goals. Priorities and requirements change based on community feedback, roadblocks encountered, community contributions, etc. If you depend on a specific item, we encourage you to attend community meetings to get updated status information, or help us deliver that feature by contributing to Velero.
`Last Updated: October 2021`
#### 1.8.0 Roadmap (to be delivered January/February 2021)
|Issue|Description|Timeline|Notes|
|---|---|---|---|
|[4108](https://github.com/vmware-tanzu/velero/issues/4108), [4109](https://github.com/vmware-tanzu/velero/issues/4109)|Solution for CSI - Azure and AWS|2022 H1|Currently, Velero plugins for AWS and Azure cannot back up persistent volumes that were provisioned using the CSI driver. This will fix that.|
|[3229](https://github.com/vmware-tanzu/velero/issues/3229),[4112](https://github.com/vmware-tanzu/velero/issues/4112)|Moving data mover functionality from the Velero Plugin for vSphere into Velero proper|2022 H1|This work is a precursor to decoupling the Astrolabe snapshotting infrastructure.|
|[3533](https://github.com/vmware-tanzu/velero/issues/3533)|Upload Progress Monitoring|2022 H1|Finishing up the work done in the 1.7 timeframe. The data mover work depends on this.|
|[1975](https://github.com/vmware-tanzu/velero/issues/1975)|Test dual stack mode|2022 H1|We already tested IPv6, but we want to confirm that dual stack mode works as well.|
|[2082](https://github.com/vmware-tanzu/velero/issues/2082)|Delete Backup CRs on removing target location. |2022 H1||
|[3516](https://github.com/vmware-tanzu/velero/issues/3516)|Restore issue with MutatingWebhookConfiguration v1beta1 API version|2022 H1||
|[2308](https://github.com/vmware-tanzu/velero/issues/2308)|Restoring nodePort service that has nodePort preservation always fails if service already exists in the namespace|2022 H1||
|[4115](https://github.com/vmware-tanzu/velero/issues/4115)|Support for multiple set of credentials for VolumeSnapshotLocations|2022 H1||
|[1980](https://github.com/vmware-tanzu/velero/issues/1980)|Velero triggers backup immediately for scheduled backups|2022 H1||
|[4067](https://github.com/vmware-tanzu/velero/issues/4067)|Pre and post backup and restore hooks|2022 H1||
|[3742](https://github.com/vmware-tanzu/velero/issues/3742)|Carvel packaging for Velero for vSphere|2022 H1|AWS and Azure have been completed already.|
|[3285](https://github.com/vmware-tanzu/velero/issues/3285)|Design doc for Velero plugin versioning|2022 H1||
|[4231](https://github.com/vmware-tanzu/velero/issues/4231)|Technical health (prioritizing giving developers confidence and saving developers time)|2022 H1|More automated tests (especially the pre-release manual tests) and more automation of the running of tests.|
|[4110](https://github.com/vmware-tanzu/velero/issues/4110)|Solution for CSI - GCP|2022 H1|Currently, the Velero plugin for GCP cannot back up persistent volumes that were provisioned using the CSI driver. This will fix that.|
|[3742](https://github.com/vmware-tanzu/velero/issues/3742)|Carvel packaging for Velero for restic|2022 H1|AWS and Azure have been completed already.|
|[3454](https://github.com/vmware-tanzu/velero/issues/3454),[4134](https://github.com/vmware-tanzu/velero/issues/4134),[4135](https://github.com/vmware-tanzu/velero/issues/4135)|Kubebuilder tech debt|2022 H1||
|[4111](https://github.com/vmware-tanzu/velero/issues/4111)|Ignore items returned by ItemSnapshotter.AlsoHandles during backup|2022 H1|This will enable backup of complex objects, because we can then tell Velero to ignore things that were already backed up when Velero was previously called recursively.|
Other work may make it into the 1.8 release, but this is the work that will be prioritized first.
# Please go to the [Velero Wiki](https://github.com/vmware-tanzu/velero/wiki/) to see our latest roadmap, archived roadmaps and roadmap guidance.

View File

@@ -7,17 +7,19 @@ k8s_yaml([
'config/crd/v1/bases/velero.io_downloadrequests.yaml',
'config/crd/v1/bases/velero.io_podvolumebackups.yaml',
'config/crd/v1/bases/velero.io_podvolumerestores.yaml',
'config/crd/v1/bases/velero.io_resticrepositories.yaml',
'config/crd/v1/bases/velero.io_backuprepositories.yaml',
'config/crd/v1/bases/velero.io_restores.yaml',
'config/crd/v1/bases/velero.io_schedules.yaml',
'config/crd/v1/bases/velero.io_serverstatusrequests.yaml',
'config/crd/v1/bases/velero.io_volumesnapshotlocations.yaml',
'config/crd/v2alpha1/bases/velero.io_datauploads.yaml',
'config/crd/v2alpha1/bases/velero.io_datadownloads.yaml',
])
# default values
settings = {
"default_registry": "docker.io/velero",
"enable_restic": False,
"use_node_agent": False,
"enable_debug": False,
"debug_continue_on_start": True, # Continue the velero process by default when in debug mode
"create_backup_locations": False,
@@ -34,9 +36,9 @@ k8s_yaml(kustomize('tilt-resources'))
k8s_yaml('tilt-resources/deployment.yaml')
if settings.get("enable_debug"):
k8s_resource('velero', port_forwards = '2345')
# TODO: Need to figure out how to apply port forwards for all restic pods
if settings.get("enable_restic"):
k8s_yaml('tilt-resources/restic.yaml')
# TODO: Need to figure out how to apply port forwards for all node-agent pods
if settings.get("use_node_agent"):
k8s_yaml('tilt-resources/node-agent.yaml')
if settings.get("create_backup_locations"):
k8s_yaml('tilt-resources/velero_v1_backupstoragelocation.yaml')
if settings.get("setup-minio"):
@@ -50,7 +52,7 @@ git_sha = str(local("git rev-parse HEAD", quiet = True, echo_off = True)).strip(
tilt_helper_dockerfile_header = """
# Tilt image
FROM golang:1.16.6 as tilt-helper
FROM golang:1.20.10 as tilt-helper
# Support live reloading with Tilt
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/restart.sh && \
@@ -60,9 +62,9 @@ RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com
additional_docker_helper_commands = """
# Install delve to allow debugging
RUN go get github.com/go-delve/delve/cmd/dlv
RUN go install github.com/go-delve/delve/cmd/dlv@latest
RUN wget -qO- https://dl.k8s.io/v1.19.2/kubernetes-client-linux-amd64.tar.gz | tar xvz
RUN wget -qO- https://dl.k8s.io/v1.25.2/kubernetes-client-linux-amd64.tar.gz | tar xvz
RUN wget -qO- https://get.docker.com | sh
"""
@@ -103,12 +105,12 @@ local_resource(
local_resource(
"restic_binary",
cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=' + local_goos + ' GOARCH=amd64 RESTIC_VERSION=0.12.0 OUTPUT_DIR=_tiltbuild/restic ./hack/download-restic.sh',
cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=linux GOARCH=amd64 GOARM="" RESTIC_VERSION=0.13.1 OUTPUT_DIR=_tiltbuild/restic ./hack/build-restic.sh',
)
# Note: we need a distro with a bash shell to exec into the Velero container
tilt_dockerfile_header = """
FROM ubuntu:focal as tilt
FROM ubuntu:22.04 as tilt
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ca-certificates tzdata && rm -rf /var/lib/apt/lists/*
@@ -216,7 +218,7 @@ def enable_provider(provider):
# Note: we need a distro with a shell to do a copy of the plugin binary
tilt_dockerfile_header = """
FROM ubuntu:focal as tilt
FROM ubuntu:22.04 as tilt
WORKDIR /
COPY --from=tilt-helper /start.sh .
COPY --from=tilt-helper /restart.sh .

View File

@@ -1,6 +1,6 @@
# Velero Assets
This folder contains logo images for Velero in gray (for light backgrounds) and white (for dark backgrounds like black tshirts or dark mode!) horizontal and stacked… in .eps and .svg.
This folder contains logo images for Velero in gray (for light backgrounds) and white (for dark backgrounds like black t-shirts or dark mode!) horizontal and stacked… in .eps and .svg.
## Some general guidelines for usage

View File

@@ -154,7 +154,7 @@
* Skip completed jobs and pods when restoring (#463, @nrb)
* Set namespace correctly when syncing backups from object storage (#472, @skriss)
* When building on macOS, bind-mount volumes with delegated config (#478, @skriss)
* Add replica sets and daemonsets to cohabitating resources so they're not backed up twice (#482 #485, @skriss)
* Add replica sets and daemonsets to cohabiting resources so they're not backed up twice (#482 #485, @skriss)
* Shut down the Ark server gracefully on SIGINT/SIGTERM (#483, @skriss)
* Only back up resources that support GET and DELETE in addition to LIST and CREATE (#486, @nrb)
* Show a better error message when trying to get an incomplete restore's logs (#496, @nrb)

View File

@@ -0,0 +1,190 @@
## v1.10.0
### 2022-11-23
### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.10.0
### Container Image
`velero/velero:v1.10.0`
### Documentation
https://velero.io/docs/v1.10/
### Upgrading
https://velero.io/docs/v1.10/upgrade-to-1.10/
### Highlights
#### Unified Repository and Kopia integration
In this release, we introduced the Unified Repository architecture to build a data path where data movers and the backup repository are decoupled and a unified backup repository could serve various data movement activities.
In this release, we also deeply integrate Velero with Kopia, specifically, Kopia's uploader modules are isolated as a generic file system uploader; Kopia's repository modules are encapsulated as the unified backup repository.
For more information, refer to the [design document](https://github.com/vmware-tanzu/velero/blob/v1.10.0/design/unified-repo-and-kopia-integration/unified-repo-and-kopia-integration.md).
#### File system backup refactor
Velero's file system backup (a.k.s. pod volume backup or formerly restic backup) is refactored as the first user of the Unified Repository architecture. Specifically, we added a new path, the Kopia path, besides the existing Restic path. While Restic path is still available and set as default, you can opt in Kopia path by specifying the `uploader-type` parameter at installation time. Meanwhile, you are free to restore from existing backups under either path, Velero dynamically switches to the correct path to process the restore.
Because of the new path, we renamed some modules and parameters, refer to the Break Changes section for more details.
For more information, visit the [file system backup document](https://velero.io/docs/v1.10/file-system-backup/) and [v1.10 upgrade guide document](https://velero.io/docs/v1.10/upgrade-to-1.10/).
Meanwhile, we've created a performance guide for both Restic path and Kopia path, which helps you to choose between the two paths and provides you the best practice to configure them under different scenarios. Please note that the results in the guide are based on our testing environments, you may get different results when testing in your own ones. For more information, visit the [performance guide document](https://velero.io/docs/v1.10/performance-guidance/).
#### Plugin versioning V1 refactor
In this release, Velero moves plugins BackupItemAction, RestoreItemAction and VolumeSnapshotterAction to version v1, this allows future plugin changes that do not support backward compatibility, so is a preparation for various complex tasks, for example, data movement tasks.
For more information, refer to the [plugin versioning design document](https://github.com/vmware-tanzu/velero/blob/v1.10.0/design/plugin-versioning.md).
#### Refactor the controllers using Kubebuilder v3
In this release we continued our code modernization work, rewriting some controllers using Kubebuilder v3. This work is ongoing and we will continue to make progress in future releases.
#### Add credentials to volume snapshot locations
In this release, we enabled dedicate credentials options to volume snapshot locations so that you can specify credentials per volume snapshot location as same as backup storage location.
For more information, please visit the [locations document](https://velero.io/docs/v1.10/locations/).
#### CSI snapshot enhancements
In this release we added several changes to enhance the robustness of CSI snapshot procedures, for example, some protection code for error handling, and a mechanism to skip exclusion checks so that CSI snapshot works with various backup resource filters.
#### Backup schedule pause/unpause
In this release, Velero supports to pause/unpause a backup schedule during or after its creation. Specifically:
At creation time, you can specify `paused` flag to `velero schedule create` command, if so, you will create a paused schedule that will not run until it is unpaused
After creation, you can run `velero schedule pause` or `velero schedule unpause` command to pause/unpause a schedule
#### Runtime and dependencies
In order to fix CVEs, we changed Velero's runtime and dependencies as follows:
Bump go runtime to v1.18.8
Bump some core dependent libraries to newer versions
Compile Restic (v0.13.1) with go 1.18.8 instead of packaging the official binary
#### Breaking changes
Due to file system backup refactor, below modules and parameters name have been changed in this release:
`restic` daemonset is renamed to `node-agent`
`resticRepository` CR is renamed to `backupRepository`
`velero restic repo` command is renamed to `velero repo`
`velero-restic-credentials` secret is renamed to `velero-repo-credentials`
`default-volumes-to-restic` parameter is renamed to `default-volumes-to-fs-backup`
`restic-timeout` parameter is renamed to `fs-backup-timeout`
`default-restic-prune-frequency` parameter is renamed to `default-repo-maintain-frequency`
#### Upgrade
Due to the major changes of file system backup, the old upgrade steps are not suitable any more. For the new upgrade steps, visit [v1.10 upgrade guide document](https://velero.io/docs/v1.10/upgrade-to-1.10/).
#### Limitations/Known issues
In this release, Kopia backup repository (so the Kopia path of file system backup) doesn't support self signed certificate for S3 compatible storage. To track this problem, refer to this [Velero issue](https://github.com/vmware-tanzu/velero/issues/5123) or [Kopia issue](https://github.com/kopia/kopia/issues/1443).
Due to the code change in Velero, there will be some code change required in vSphere plugin, without which the functionality may be impacted. Therefore, if you are using vSphere plugin in your workflow, please hold the upgrade until the issue [#485](https://github.com/vmware-tanzu/velero-plugin-for-vsphere/issues/485) is fixed in vSphere plugin.
### All changes
* Restore ClusterBootstrap before Cluster otherwise a new default ClusterBootstrap object is create for the cluster (#5616, @ywk253100)
* Add compile restic binary for CVE fix (#5574, @qiuming-best)
* Fix controller problematic log output (#5572, @qiuming-best)
* Enhance the restore priorities list to support specifying the low prioritized resources that need to be restored in the last (#5535, @ywk253100)
* fix restic backup progress error (#5534, @qiuming-best)
* fix restic backup failure with self-signed certification backend storage (#5526, @qiuming-best)
* Add credential store in backup deletion controller to support VSL credential. (#5521, @blackpiglet)
* Fix issue 5505: the pod volume backups/restores except the first one fail under the kopia path if "AZURE_CLOUD_NAME" is specified (#5512, @Lyndon-Li)
* After Pod Volume Backup/Restore refactor, remove all the unreasonable appearance of "restic" word from documents (#5499, @Lyndon-Li)
* Refactor Pod Volume Backup/Restore doc to match the new behavior (#5484, @Lyndon-Li)
* Remove redundancy code block left by #5388. (#5483, @blackpiglet)
* Issue fix 5477: create the common way to support S3 compatible object storages that work for both Restic and Kopia; Keep the resticRepoPrefix parameter for compatibility (#5478, @Lyndon-Li)
* Update the k8s.io dependencies to 0.24.0.
This also required an update to github.com/bombsimon/logrusr/v3.
Removed the `WithClusterName` method
as it is a "legacy field that was
always cleared by the system and never used" as per upstream k8s
https://github.com/kubernetes/apimachinery/blob/release-1.24/pkg/apis/meta/v1/types.go#L257-L259 (#5471, @kcboyle)
* Add v1.10 velero upgrade doc (#5468, @qiuming-best)
* Upgrade velero docker image to use go 1.18 and upgrade golangci-lint to 1.45.0 (#5459, @Lyndon-Li)
* Add VolumeSnapshot client back. (#5449, @blackpiglet)
* Change subcommand `velero restic repo` to `velero repo` (#5446, @allenxu404)
* Remove irrational "Restic" names in Velero code after the PVBR refactor (#5444, @Lyndon-Li)
* moved RIA execute input/output structs back to velero package (#5441, @sseago)
* Rename Velero pod volume restore init helper from "velero-restic-restore-helper" to "velero-restore-helper" (#5432, @Lyndon-Li)
* Skip the exclusion check for additional resources returned by BIA (#5429, @reasonerjt)
* Change B/R describe CLI to support Kopia (#5412, @allenxu404)
* Add nil check before execution of csi snapshot delete (#5401, @shubham-pampattiwar)
* update velero using klog to version v2.9.0 (#5396, @blackpiglet)
* Fix Test_prepareBackupRequest_BackupStorageLocation UT failure. (#5394, @blackpiglet)
* Rename Velero daemonset from "restic" to "node-agent" (#5390, @Lyndon-Li)
* Add some corner cases checking for CSI snapshot in backup controller. (#5388, @blackpiglet)
* Fix issue 5386: Velero providers a full URL as the S3Url while the underlying minio client only accept the host part of the URL as the endpoint and the schema should be specified separately. (#5387, @Lyndon-Li)
* Fix restore error with flag namespace-mappings (#5377, @qiuming-best)
* Pod Volume Backup/Restore Refactor: Rename parameters in CRDs and commands to remove "Restic" word (#5370, @Lyndon-Li)
* Added backupController's UT to test the prepareBackupRequest() method BackupStorageLocation processing logic (#5362, @niulechuan)
* Fix a repoEnsurer problem introduced by the refactor - The repoEnsurer didn't check "" state of BackupRepository, as a result, the function GetBackupRepository always returns without an error even though the ensreReady is specified. (#5359, @Lyndon-Li)
* Add E2E test for schedule backup (#5355, @danfengliu)
* Add useOwnerReferencesInBackup field doc for schedule. (#5353, @cleverhu)
* Clarify the help message for the default value of parameter --snapshot-volumes, when it's not set. (#5350, @blackpiglet)
* Fix restore cmd extraflag overwrite bug (#5347, @qiuming-best)
* Resolve gopkg.in/yaml.v3 vulnerabilities by upgrading gopkg.in/yaml.v3 to v3.0.1 (#5344, @kaovilai)
* Increase ensure restic repository timeout to 5m (#5335, @shubham-pampattiwar)
* Add opt-in and opt-out PersistentVolume backup to E2E tests (#5331, @danfengliu)
* Cancel downloadRequest when timeout without downloadURL (#5329, @kaovilai)
* Fix PVB finds wrong parent snapshot (#5322, @qiuming-best)
* Fix issue 4874 and 4752: check the daemonset pod is running in the node where the workload pod resides before running the PVB for the pod (#5319, @Lyndon-Li)
* plugin versioning v1 refactor for VolumeSnapshotter (#5318, @sseago)
* Change the status of restore to completed from partially failed when restore empty backup (#5314, @allenxu404)
* RestoreItemAction v1 refactoring for plugin api versioning (#5312, @sseago)
* Refactor the repoEnsurer code to use controller runtime client and wrap some common BackupRepository operations to share with other modules (#5308, @Lyndon-Li)
* Remove snapshot related lister, informer and client from backup controller. (#5299, @jxun)
* Remove github.com/apex/log logger. (#5297, @blackpiglet)
* change CSISnapshotTimeout from pointer to normal variables. (#5294, @cleverhu)
* Optimize code for restore exists resources. (#5293, @cleverhu)
* Add more detailed comments for labels columns. (#5291, @cleverhu)
* Add backup status checking in schedule controller. (#5283, @blackpiglet)
* Add changes for problems/enhancements found during smoking test for Kopia pod volume backup/restore (#5282, @Lyndon-Li)
* Support pause/unpause schedules (#5279, @ywk253100)
* plugin/clientmgmt refactoring for BackupItemAction v1 (#5271, @sseago)
* Don't move velero v1 plugins to new proto dir (#5263, @sseago)
* Fill gaps for Kopia path of PVBR: integrate Repo Manager with Unified Repo; pass UploaderType to PVBR backupper and restorer; pass RepositoryType to BackupRepository controller and Repo Ensurer (#5259, @Lyndon-Li)
* Add csiSnapshotTimeout for describe backup (#5252, @cleverhu)
* equip gc controller with configurable frequency (#5248, @allenxu404)
* Fix nil pointer panic when restoring StatefulSets (#5247, @divolgin)
* Controller refactor code modifications. (#5241, @jxun)
* Fix edge cases for already exists resources (#5239, @shubham-pampattiwar)
* Check for empty ns list before checking nslist[0] (#5236, @sseago)
* Remove reference to non-existent doc (#5234, @reasonerjt)
* Add changes for Kopia Integration: Kopia Lib - method implementation. Add changes to write Kopia Repository logs to Velero log (#5233, @Lyndon-Li)
* Add changes for Kopia Integration: Kopia Lib - initialize Kopia repo (#5231, @Lyndon-Li)
* Uploader Implementation: Kopia backup and restore (#5221, @qiuming-best)
* Migrate backup sync controller from code-generator to kubebuilder. (#5218, @jxun)
* check vsc null pointer (#5217, @lilongfeng0902)
* Refactor GCController with kubebuilder (#5215, @allenxu404)
* Uploader Implementation: Restic backup and restore (#5214, @qiuming-best)
* Add parameter "uploader-type" to velero server (#5212, @reasonerjt)
* Add annotation "pv.kubernetes.io/migrated-to" for CSI checking. (#5181, @jxun)
* Add changes for Kopia Integration: Unified Repository Provider - method implementation (#5179, @Lyndon-Li)
* Treat namespaces with exclude label as excludedNamespaces
Related issue: #2413 (#5178, @allenxu404)
* Reduce CRD size. (#5174, @jxun)
* Fix restic backups to multiple backup storage locations bug (#5172, @qiuming-best)
* Add changes for Kopia Integration: Unified Repository Provider - Repo Password (#5167, @Lyndon-Li)
* Skip registering "crd-remap-version" plugin when feature flag "EnableAPIGroupVersions" is set (#5165, @reasonerjt)
* Kopia uploader integration on shim progress uploader module (#5163, @qiuming-best)
* Add labeled and unlabeled events for PR changelog check action. (#5157, @jxun)
* VolumeSnapshotLocation refactor with kubebuilder. (#5148, @jxun)
* Delay CA file deletion in PVB controller. (#5145, @jxun)
* This commit splits the pkg/restic package into several packages to support Kopia integration works (#5143, @ywk253100)
* Kopia Integration: Add the Unified Repository Interface definition. Kopia Integration: Add the changes for Unified Repository storage config. Related Issues; #5076, #5080 (#5142, @Lyndon-Li)
* Update the CRD for kopia integration (#5135, @reasonerjt)
* Let "make shell xxx" respect GOPROXY (#5128, @reasonerjt)
* Modify BackupStoreGetter to avoid BSL spec changes (#5122, @sseago)
* Dump stack trace when the plugin server handles panic (#5110, @reasonerjt)
* Make CSI snapshot creation timeout configurable. (#5104, @jxun)
* Fix bsl validation bug: the BSL is validated continually and doesn't respect the validation period configured (#5101, @ywk253100)
* Exclude "csinodes.storage.k8s.io" and "volumeattachments.storage.k8s.io" from restore by default. (#5064, @jxun)
* Move 'velero.io/exclude-from-backup' label string to const (#5053, @niulechuan)
* Modify Github actions. (#5052, @jxun)
* Fix typo in doc, in https://velero.io/docs/main/restore-reference/ "Restore order" section, "Mamespace" should be "Namespace". (#5051, @niulechuan)
* Delete opened issues triage action. (#5041, @jxun)
* When spec.RestoreStatus is empty, don't restore status (#5008, @sseago)
* Added DownloadTargetKindCSIBackupVolumeSnapshots for retrieving the signed URL to download only the `<backup name>`-csi-volumesnapshots.json.gz and DownloadTargetKindCSIBackupVolumeSnapshotContents to download only `<backup name>`-csi-volumesnapshotcontents.json.gz in the DownloadRequest CR structure. These files are already present in the backup layout. (#4980, @anshulahuja98)
* Refactor BackupItemAction proto and related code to backupitemaction/v1 package. This is part of implementation of the plugin version design https://github.com/vmware-tanzu/velero/blob/main/design/plugin-versioning.md (#4943, @phuongatemc)
* Unified Repository Design (#4926, @Lyndon-Li)
* Add credentials to volume snapshot locations (#4864, @sseago)

View File

@@ -0,0 +1,126 @@
## v1.11
### 2023-04-07
### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.11.0
### Container Image
`velero/velero:v1.11.0`
### Documentation
https://velero.io/docs/v1.11/
### Upgrading
https://velero.io/docs/v1.11/upgrade-to-1.11/
### Highlights
#### BackupItemAction v2
This feature implements the BackupItemAction v2. BIA v2 has two new methods: Progress() and Cancel() and modifies the Execute() return value.
The API change is needed to facilitate long-running BackupItemAction plugin actions that may not be complete when the Execute() method returns. This will allow long-running BackupItemAction plugin actions to continue in the background while the Velero moves to the following plugin or the next item.
#### RestoreItemAction v2
This feature implemented the RestoreItemAction v2. RIA v2 has three new methods: Progress(), Cancel(), and AreAdditionalItemsReady(), and it modifies RestoreItemActionExecuteOutput() structure in the RIA return value.
The Progress() and Cancel() methods are needed to facilitate long-running RestoreItemAction plugin actions that may not be complete when the Execute() method returns. This will allow long-running RestoreItemAction plugin actions to continue in the background while the Velero moves to the following plugin or the next item. The AreAdditionalItemsReady() method is needed to allow plugins to tell Velero to wait until the returned additional items have been restored and are ready for use in the cluster before restoring the current item.
#### Plugin Progress Monitoring
This is intended as a replacement for the previously-approved Upload Progress Monitoring design ([Upload Progress Monitoring](https://github.com/vmware-tanzu/velero/blob/main/design/upload-progress.md)) to expand the supported use cases beyond snapshot upload to include what was previously called Async Backup/Restore Item Actions.
#### Flexible resource policy that can filter volumes to skip in the backup
This feature provides a flexible policy to filter volumes in the backup without requiring patching any labels or annotations to the pods or volumes. This policy is configured as k8s ConfigMap and maintained by the users themselves, and it can be extended to more scenarios in the future. By now, the policy rules out volumes from backup depending on the CSI driver, NFS setting, volume size, and StorageClass setting. Please refer to [policy API design](https://github.com/vmware-tanzu/velero/blob/main/design/Implemented/handle-backup-of-volumes-by-resources-filters.md#api-design) for the policy's ConifgMap format. It is not guaranteed to work on unofficial third-party plugins as it may not follow the existing backup workflow code logic of Velero.
#### Resource Filters that can distinguish cluster scope and namespace scope resources
This feature adds four new resource filters for backup. The new filters are separated into cluster scope and namespace scope. Before this feature, Velero could not filter cluster scope resources precisely. This feature provides the ability and refactors existing resource filter parameters.
#### Add a parameter for setting the Velero server connection with the k8s API server's timeout
In Velero, some code pieces need to communicate with the k8s API server. Before v1.11, these code pieces used hard-code timeout settings. This feature adds a resource-timeout parameter in the velero server binary to make it configurable.
#### Add resource list in the output of the restore describe command
Before this feature, Velero restore didn't have a restored resources list as the Velero backup. It's not convenient for users to learn what is restored. This feature adds the resources list and the handling result of the resources (including created, updated, failed, and skipped).
#### Refactor controllers with controller-runtime
In v1.11, Backup Controller and Restore controller are refactored with controller-runtime. Till v1.11, all Velero controllers use the controller-runtime framework.
#### Runtime and dependencies
To fix CVEs and keep pace with Golang, Velero made changes as follows:
* Bump Golang runtime to v1.19.8.
* Bump several dependent libraries to new versions.
* Compile Restic (v0.15.0) with Golang v1.19.8 instead of packaging the official binary.
### Breaking changes
* The Velero CSI plugin now determines whether to restore Volume's data from snapshots on the restore's restorePVs setting. Before v1.11, the CSI plugin doesn't check the restorePVs parameter setting.
### Limitations/Known issues
* The Flexible resource policy that can filter volumes to skip in the backup is not guaranteed to work on unofficial third-party plugins because the plugins may not follow the existing backup workflow code logic of Velero. The ConfigMap used as the policy is supposed to be maintained by users.
### All Changes
* Modify new scope resource filters name. (#6089, @blackpiglet)
* Make Velero not exits when EnableCSI is on and CSI snapshot not installed (#6062, @blackpiglet)
* Restore Services before Clusters (#6057, @ywk253100)
* Fixed backup deletion bug related to async operations (#6041, @sseago)
* Update Golang version to v1.19 for branch main. (#6039, @blackpiglet)
* Fix issue #5972, don't assume errorField as error type when dealing with logger.WithError (#6028, @Lyndon-Li)
* distinguish between New and InProgress operations (#6012, @sseago)
* Modify golangci.yaml file. Resolve found lint issues. (#6008, @blackpiglet)
* Remove Reference of itemsnapshotter (#5997, @reasonerjt)
* minor fixes for backup_operations_controller (#5996, @sseago)
* RIAv2 async operations controller work (#5993, @sseago)
* Follow-on fixes for BIAv2 controller work (#5971, @sseago)
* Refactor backup controller based on the controller-runtime framework. (#5969, @qiuming-best)
* Fix client wait problem after async operation change, velero backup/restore --wait should check a full list of the terminal status (#5964, @Lyndon-Li)
* Fix issue #5935, refactor the logics for backup/restore persistent log, so as to remove the contest to gzip writer (#5956, @Lyndon-Li)
* Switch the base image to distroless/base-nossl-debian11 to reduce the CVE triage efforts (#5939, @ywk253100)
* Wait for additional items to be ready before restoring current item (#5933, @sseago)
* Add configurable server setting for default timeouts (#5926, @eemcmullan)
* Add warning/error result to cmd `velero backup describe` (#5916, @allenxu404)
* Fix Dependabot alerts. Use 1.18 and 1.19 golang instead of patch image in dockerfile. Add release-1.10 and release-1.9 in Trivy daily scan. (#5911, @blackpiglet)
* Update client-go to v0.25.6 (#5907, @kaovilai)
* Limit the concurrent number for backup's VolumeSnapshot operation. (#5900, @blackpiglet)
* Fix goreleaser issue for resolving tags and updated it's version. (#5899, @anshulahuja98)
* This is to fix issue 5881, enhance the PVB tracker in two modes, Track and Taken (#5894, @Lyndon-Li)
* Add labels for velero installed namespace to support PSA. (#5873, @blackpiglet)
* Add restored resource list in the restore describe command (#5867, @ywk253100)
* Add a json output to cmd velero backup describe (#5865, @allenxu404)
* Make restore controller adopting the controller-runtime framework. (#5864, @blackpiglet)
* Replace k8s.io/apimachinery/pkg/util/clock with k8s.io/utils/clock (#5859, @hezhizhen)
* Restore finalizer and managedFields of metadata during the restoration (#5853, @ywk253100)
* BIAv2 async operations controller work (#5849, @sseago)
* Add secret restore item action to handle service account token secret (#5843, @ywk253100)
* Add new resource filters can separate cluster and namespace scope resources. (#5838, @blackpiglet)
* Correct PVB/PVR Failed Phase patching during startup (#5828, @kaovilai)
* bump up golang net to fix CVE-2022-41721 (#5812, @Lyndon-Li)
* Update CRD descriptions for SnapshotVolumes and restorePVs (#5807, @shubham-pampattiwar)
* Add mapped selected-node existence check (#5806, @blackpiglet)
* Add option "--service-account-name" to install cmd (#5802, @reasonerjt)
* Enable staticcheck linter. (#5788, @blackpiglet)
* Set Kopia IgnoreUnknownTypes in ErrorHandlingPolicy to True for ignoring backup unknown file type (#5786, @qiuming-best)
* Bump up Restic version to 0.15.0 (#5784, @qiuming-best)
* Add File system backup related metrics to Grafana dashboard
- Add metrics backup_warning_total for record of total warnings
- Add metrics backup_last_status for record of last status of the backup (#5779, @allenxu404)
* Design for Handling backup of volumes by resources filters (#5773, @qiuming-best)
* Add PR container build action, which will not push image. Add GOARM parameter. (#5771, @blackpiglet)
* Fix issue 5458, track pod volume backup until the CR is submitted in case it is skipped half way (#5769, @Lyndon-Li)
* Fix issue 5226, invalidate the related backup repositories whenever the backup storage info change in BSL (#5768, @Lyndon-Li)
* Add Restic builder in Dockerfile, and keep the used built Golang image version in accordance with upstream Restic. (#5764, @blackpiglet)
* Fix issue 5043, after the restore pod is scheduled, check if the node-agent pod is running in the same node. (#5760, @Lyndon-Li)
* Remove restore controller's redundant client. (#5759, @blackpiglet)
* Define itemoperations.json format and update DownloadRequest API (#5752, @sseago)
* Add Trivy nightly scan. (#5740, @jxun)
* Fix issue 5696, check if the repo is still openable before running the prune and forget operation, if not, try to reconnect the repo (#5715, @Lyndon-Li)
* Fix error with Restic backup empty volumes (#5713, @qiuming-best)
* new backup and restore phases to support async plugin operations:
- WaitingForPluginOperations
- WaitingForPluginOperationsPartiallyFailed (#5710, @sseago)
* Prevent nil panic on exec restore hooks (#5675, @dymurray)
* Fix CVEs scanned by trivy (#5653, @qiuming-best)
* Publish backupresults json to enhance error info during backups. (#5576, @anshulahuja98)
* RestoreItemAction v2 API implementation (#5569, @sseago)
* add new RestoreItemAction of "velero.io/change-image-name" to handle the issue mentioned at #5519 (#5540, @wenterjoy)
* BackupItemAction v2 API implementation (#5442, @sseago)
* Proposal to separate resource filter into cluster scope and namespace scope (#5333, @blackpiglet)

View File

@@ -0,0 +1,188 @@
## v1.12.1
### 2023-10-20
### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.12.1
### Container Image
`velero/velero:v1.12.1`
### Documentation
https://velero.io/docs/v1.12/
### Upgrading
https://velero.io/docs/v1.12/upgrade-to-1.12/
### Highlights
#### Data Mover Adds Support for Block Mode Volumes
For PersistentVolumes with volumeMode set as Block, the volumes are mounted as raw block devices in pods, in 1.12.1, Velero CSI snapshot data movement supports to backup and restore this kind of volumes under linux based Kubernetes clusters.
#### New Parameter in Installation to Enable Data Mover
The `velero install` sub-command now includes a new parameter,`--default-snapshot-move-data`, which configures Velero server to move data by default for all snapshots supporting data movement. This feature is useful for users who will always want to use VBDM for backups instead of plain CSI , as they no longer need to specify the `--snapshot-move-data` flag for each individual backup.
#### Velero Base Image change
The base image previously used by Velero was `distroless`, which contains several CVEs cannot be addressed quickly. As a result, Velero will now use `paketobuildpacks` image starting from this new version.
### Limitations/Known issues
* The data mover's support for block mode volumes is currently only applicable to Linux environments.
### All changes
* Import auth provider plugins (#6970, @0x113)
* Perf improvements for existing resource restore (#6948, @sseago)
* Retry failed create when using generateName (#6943, @sseago)
* Fix issue #6647, add the --default-snapshot-move-data parameter to Velero install, so that users don't need to specify --snapshot-move-data per backup when they want to move snapshot data for all backups (#6940, @Lyndon-Li)
* Partially fix #6734, guide Kubernetes' scheduler to spread backup pods evenly across nodes as much as possible, so that data mover backup could achieve better parallelism (#6935, @Lyndon-Li)
* Replace the base image with paketobuildpacks image (#6934, @ywk253100)
* Add support for block volumes with Kopia (#6897, @dzaninovic)
* Set ParallelUploadAboveSize as MaxInt64 and flush repo after setting up policy so that policy is retrieved correctly by TreeForSource (#6886, @Lyndon-Li)
* Kubernetes 1.27 new job label batch.kubernetes.io/controller-uid are deleted during restore per https://github.com/kubernetes/kubernetes/pull/114930 (#6713, @kaovilai)
* Add `orLabelSelectors` for backup, restore commands (#6881, @nilesh-akhade)
* Fix issue #6859, move plugin depending podvolume functions to util pkg, so as to remove the dependencies to unnecessary repository packages like kopia, azure, etc. (#6877, @Lyndon-Li)
* Fix issue #6786, always delete VSC regardless of the deletion policy (#6873, @Lyndon-Li)
* Fix #6988, always get region from BSL if it is not empty (#6991, @Lyndon-Li)
* Add both non-Windows version and Windows version code for PVC block mode logic. (#6986, @blackpiglet)
## v1.12
### 2023-08-18
### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.12.0
### Container Image
`velero/velero:v1.12.0`
### Documentation
https://velero.io/docs/v1.12/
### Upgrading
https://velero.io/docs/v1.12/upgrade-to-1.12/
### Highlights
#### CSI Snapshot Data Movement
CSI Snapshot Data Movement refers to back up CSI snapshot data from the volatile and limited production environment into durable, heterogeneous, and scalable backup storage in a consistent manner; and restore the data to volumes in the original or alternative environment.
CSI Snapshot Data Movement is useful in below scenarios:
* For on-premises users, the storage usually doesn't support durable snapshots, so it is impossible/less efficient/cost ineffective to keep volume snapshots by the storage This feature helps to move the snapshot data to a storage with lower cost and larger scale for long time preservation.
* For public cloud users, this feature helps users to fulfill the multiple cloud strategy. It allows users to back up volume snapshots from one cloud provider and preserve or restore the data to another cloud provider. Then users will be free to flow their business data across cloud providers based on Velero backup and restore
CSI Snapshot Data Movement is built according to the Volume Snapshot Data Movement design ([Volume Snapshot Data Movement design](https://github.com/vmware-tanzu/velero/blob/main/design/volume-snapshot-data-movement/volume-snapshot-data-movement.md)). Additionally, guidance on how to use the feature can be found in the Volume Snapshot Data Movement doc([Volume Snapshot Data Movement doc](https://velero.io/docs/v1.12/csi-snapshot-data-movement)).
#### Resource Modifiers
In many use cases, customers often need to substitute specific values in Kubernetes resources during the restoration process like changing the namespace, changing the storage class, etc.
To address this need, Resource Modifiers (also known as JSON Substitutions) offer a generic solution in the restore workflow. It allows the user to define filters for specific resources and then specify a JSON patch (operator, path, value) to apply to the resource. This feature simplifies the process of making substitutions without requiring the implementation of a new RestoreItemAction plugin. More design details can be found in Resource Modifiers design ([Resource Modifiers design](https://github.com/vmware-tanzu/velero/blob/main/design/Implemented/json-substitution-action-design.md)). For instructions on how to use the feature, please refer to Resource Modifiers doc([Resource Modifiers doc](https://velero.io/docs/v1.12/restore-resource-modifiers)).
#### Multiple VolumeSnapshotClasses
Prior to version 1.12, the Velero CSI plugin would choose the VolumeSnapshotClass in the cluster based on matching driver names and the presence of the "velero.io/csi-volumesnapshot-class" label. However, this approach proved inadequate for many user scenarios.
With the introduction of version 1.12, Velero now offers support for multiple VolumeSnapshotClasses in the CSI Plugin, enabling users to select a specific class for a particular backup. More design details can be found in Multiple VolumeSnapshotClasses design ([Multiple VolumeSnapshotClasses design](https://github.com/vmware-tanzu/velero/blob/main/design/Implemented/multiple-csi-volumesnapshotclass-support.md)). For instructions on how to use the feature, please refer to Multiple VolumeSnapshotClasses doc ([Multiple VolumeSnapshotClasses doc](https://velero.io/docs/v1.12/csi/#implementation-choices)).
#### Restore Finalizer
Before v1.12, the restore controller would only delete restore resources but wouldnt delete restore data from the backup storage location when the command `velero restore delete` was executed. The only chance Velero deletes restores data from the backup storage location is when the associated backup is deleted.
In this version, Velero introduces a finalizer that ensures the cleanup of all associated data for restores when running the command `velero restore delete`.
#### Runtime and dependencies
To fix CVEs and keep pace with Golang, Velero made changes as follows:
* Bump Golang runtime to v1.20.7.
* Bump several dependent libraries to new versions.
* Bump Kopia to v0.13.
### Breaking changes
* Prior to v1.12, the parameter `uploader-type` for Velero installation had a default value of "restic". However, starting from this version, the default value has been changed to "kopia". This means that Velero will now use Kopia as the default path for file system backup.
* The ways of setting CSI snapshot time have changed in v1.12. First, the sync waiting time for creating a snapshot handle in the CSI plugin is changed from the fixed 10 minutes into backup.Spec.CSISnapshotTimeout. The second, the async waiting time for VolumeSnapshot and VolumeSnapshotContent's status turning into `ReadyToUse` in operation uses the operation's timeout. The default value is 4 hours.
* As from [Velero helm chart v4.0.0](https://github.com/vmware-tanzu/helm-charts/releases/tag/velero-4.0.0), it supports multiple BSL and VSL, and the BSL and VSL have changed from the map into a slice, and[ this breaking change](https://github.com/vmware-tanzu/helm-charts/pull/413) is not backward compatible. So it would be best to change the BSL and VSL configuration into slices before the Upgrade.
* Prior to v1.12, deleting the Velero namespace would easily remove all the resources within it. However, with the introduction of finalizers attached to the Velero CR including `restore`, `dataupload`, and `datadownload` in this version, directly deleting Velero namespace may get stuck indefinitely because the pods responsible for handling the finalizers might be deleted before the resources attached to the finalizers. To avoid this issue, please use the command `velero uninstall` to delete all the Velero resources or ensure that you handle the finalizer appropriately before deleting the Velero namespace.
### Limitations/Known issues
* The Azure plugin supports Azure AD Workload identity way, but it only works for Velero native snapshots. It cannot support filesystem backup and snapshot data mover scenarios.
* File System backup under Kopia path and CSI Snapshot Data Movement backup fail to back up files that are large the 2GiB due to issue https://github.com/vmware-tanzu/velero/issues/6668.
### All Changes
* Fixes #6498. Get resource client again after restore actions in case resource's gv is changed. This is an improvement of pr #6499, to support group changes. A group change usually happens in a restore plugin which is used for resource conversion: convert a resource from a not supported gv to a supported gv (#6634, @27149chen)
* Add API support for volMode block, only error for now. (#6608, @shawn-hurley)
* Fix how the AWS credentials are obtained from configuration (#6598, @aws_creds)
* Add performance E2E test (#6569, @qiuming-best)
* Non default s3 credential profiles work on Unified Repository Provider (kopia) (#6558, @kaovilai)
* Fix issue #6571, fix the problem for restore item operation to set the errors correctly so that they can be recorded by Velero restore and then reflect the correct status for Velero restore. (#6594, @Lyndon-Li)
* Fix issue 6575, flush the repo after delete the snapshot, otherwise, the changes(deleting repo snapshot) cannot be committed to the repo. (#6587, @Lyndon-Li)
* Delete moved snapshots when the backup is deleted (#6547, @reasonerjt)
* check if restore crd exist before operating restores (#6544, @allenxu404)
* Remove PVC's selector in backup's PVC action. (#6481, @blackpiglet)
* Delete the expired deletebackuprequests that are stuck in "InProgress" (#6476, @reasonerjt)
* Fix issue #6534, reset PVB CR's StorageLocation to the latest one during backup sync as same as the backup CR. Also fix similar problem with DataUploadResult for data mover restore. (#6533, @Lyndon-Li)
* Fix issue #6519. Restrict the client manager of node-agent server to include only Velero resources from the server's namespace, otherwise, the controllers will try to reconcile CRs from all the installed Velero namespaces. (#6523, @Lyndon-Li)
* Track the skipped PVC and print the summary in backup log (#6496, @reasonerjt)
* Add restore finalizer to clean up external resources (#6479, @allenxu404)
* fix: Typos and add more spell checking rules to CI (#6415, @mateusoliveira43)
* Add missing CompletionTimestamp and metrics when restore moved into terminal phase in restoreOperationsReconciler (#6397, @Nutrymaco)
* Add support for resource Modifications in the restore flow. Also known as JSON Substitutions. (#6452, @anshulahuja98)
* Remove dependency of the legacy client code from pkg/cmd directory part 2 (#6497, @blackpiglet)
* Add data upload and download metrics (#6493, @allenxu404)
* Fix issue 6490, If a backup/restore has multiple async operations and one operation fails while others are still in-progress, when all the operations finish, the backup/restore will be set as Completed falsely (#6491, @Lyndon-Li)
* Velero Plugins no longer need kopia indirect dependency in their go.mod (#6484, @kaovilai)
* Remove dependency of the legacy client code from pkg/cmd directory (#6469, @blackpiglet)
* Add support for OpenStack CSI drivers topology keys (#6464, @openstack-csi-topology-keys)
* Add exit code log and possible memory shortage warning log for Restic command failure. (#6459, @blackpiglet)
* Modify DownloadRequest controller logic (#6433, @blackpiglet)
* Add data download controller for data mover (#6436, @qiuming-best)
* Fix hook filter display issue for backup describer (#6434, @allenxu404)
* Retrieve DataUpload into backup result ConfigMap during volume snapshot restore. (#6410, @blackpiglet)
* Design to add support for Multiple VolumeSnapshotClasses in CSI Plugin. (#5774, @anshulahuja98)
* Clarify the deletion frequency for gc controller (#6414, @allenxu404)
* Add unit tests for pkg/archive (#6396, @allenxu404)
* Add UT for pkg/discovery (#6394, @qiuming-best)
* Add UT for pkg/util (#6368, @Lyndon-Li)
* Add the code for data mover restore expose (#6357, @Lyndon-Li)
* Restore Endpoints before Services (#6315, @ywk253100)
* Add warning message for volume snapshotter in data mover case. (#6377, @blackpiglet)
* Add unit test for pkg/uploader (#6374, @qiuming-best)
* Change kopia as the default path of PVB (#6370, @Lyndon-Li)
* Do not persist VolumeSnapshot and VolumeSnapshotContent for snapshot DataMover case. (#6366, @blackpiglet)
* Add data mover related options in CLI (#6365, @ywk253100)
* Add dataupload controller (#6337, @qiuming-best)
* Add UT cases for pkg/podvolume (#6336, @Lyndon-Li)
* Remove Wait VolumeSnapshot to ReadyToUse logic. (#6327, @blackpiglet)
* Enhance the code because of #6297, the return value of GetBucketRegion is not recorded, as a result, when it fails, we have no way to get the cause (#6326, @Lyndon-Li)
* Skip updating status when CRDs are restored (#6325, @reasonerjt)
* Include namespaces needed by namespaced-scope resources in backup. (#6320, @blackpiglet)
* Update metrics when backup failed with validation error (#6318, @ywk253100)
* Add the code for data mover backup expose (#6308, @Lyndon-Li)
* Fix a PVR issue for generic data path -- the namespace remap was not honored, and enhance the code for better error handling (#6303, @Lyndon-Li)
* Add default values for defaultItemOperationTimeout and itemOperationSyncFrequency in velero CLI (#6298, @shubham-pampattiwar)
* Add UT cases for pkg/repository (#6296, @Lyndon-Li)
* Fix issue #5875. Since Kopia has supported IAM, Velero should not require static credentials all the time (#6283, @Lyndon-Li)
* Fixed a bug where status.progress is not getting updated for backups. (#6276, @kkothule)
* Add code change for async generic data path that is used by both PVB/PVR and data mover (#6226, @Lyndon-Li)
* Add data mover CRD under v2alpha1, include DataUpload CRD and DataDownload CRD (#6176, @Lyndon-Li)
* Remove any dataSource or dataSourceRef fields from PVCs in PVC BIA for cases of
prior PVC restores with CSI (#6111, @eemcmullan)
* Add the design for Volume Snapshot Data Movement (#5968, @Lyndon-Li)
* Fix issue #5123, Kopia repository supports self-cert CA for S3 compatible storage. (#6268, @Lyndon-Li)
* Bump up Kopia to v0.13 (#6248, @Lyndon-Li)
* log volumes to backup to help debug why `IsPodRunning` is called. (#6232, @kaovilai)
* Enable errcheck linter and resolve found issues (#6208, @blackpiglet)
* Enable more linters, and remove mal-functioned milestoned issue action. (#6194, @blackpiglet)
* Enable stylecheck linter and resolve found issues. (#6185, @blackpiglet)
* Fix issue #6182. If pod is not running, don't treat it as an error, let it go and leave a warning. (#6184, @Lyndon-Li)
* Enable staticcheck and resolve found issues (#6183, @blackpiglet)
* Enable linter revive and resolve found errors: part 2 (#6177, @blackpiglet)
* Enable linter revive and resolve found errors: part 1 (#6173, @blackpiglet)
* Fix usestdlibvars and whitespace linters issues. (#6162, @blackpiglet)
* Update Golang to v1.20 for main. (#6158, @blackpiglet)
* Make GetPluginConfig accessible from other packages. (#6151, @tkaovila)
* Ignore not found error during patching managedFields (#6136, @ywk253100)
* Fix the goreleaser issues and add a new goreleaser action (#6109, @blackpiglet)
* Add CSI snapshot data movement doc (#6793, @Lyndon-Li)
* Use old(origin) namespace in resource modifier conditions in case namespace may change during restore (#6724, @27149chen)
* Fix #6752: add namespace exclude check. (#6762, @blackpiglet)
* Update restore controller logic for restore deletion (#6761, @ywk253100)
* Fix issue #6753, remove the check for read-only BSL in restore async operation controller since Velero cannot fully support read-only mode BSL in restore at present (#6758, @Lyndon-Li)
* Fixes #6636, skip subresource in resource discovery (#6688, @27149chen)
* This pr made some improvements in Resource Modifiers:1. add label selector 2. change the field name from groupKind to groupResource (#6704, @27149chen)

110
changelogs/CHANGELOG-1.8.md Normal file
View File

@@ -0,0 +1,110 @@
## v1.8.0
### 2022-01-14
### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.8.0
### Container Image
`velero/velero:v1.8.0`
### Documentation
https://velero.io/docs/v1.8
### Upgrading
https://velero.io/docs/v1.8/upgrade-to-1.8/
### Highlights
#### Velero plugins now support handling volumes created by the CSI drivers of cloud providers
Versions 1.4 of the Velero plugins for AWS, Azure and GCP now support snapshotting and restoring the persistent volumes provisioned by CSI driver via the APIs of the cloud providers. With this enhancement, users can backup and restore the persistent volumes on these cloud providers without using the Velero CSI plugin. The CSI plugin will remain beta and the feature flag `EnableCSI` will be disabled by default.
For the version of the plugins and the CSI drivers they support respectively please see the table:
| Plugin | Version | CSI Driver |
| --- | ----------- | ---------- |
| velero-plugin-for-aws | v1.4.0 | ebs.csi.aws.com |
| velero-plugin-for-microsoft-azure | v1.4.0 | disk.csi.azure.com |
| velero-plugin-for-gcp | v1.4.0 | pd.csi.storage.gke.io |
#### IPv6 dual stack support
We've verified the functionality of Velero on IPv6 dual stack by successfully running the E2E test on IPv6 dual stack environment.
#### Refactor the controllers using Kubebuilder v3
In this release we continued our code modernization work, rewriting some controllers using Kubebuilder v3. This work is ongoing and we will continue to make progress in future releases.
#### Enhancements to E2E test cases
More test cases have been added to the E2E test suite to improve the release health.
#### Respect the cron setting of scheduled backup
The creation time is now taken into account to calculate the next run for scheduled backup.
#### Deleting BSLs also cleans up related resources
When a Backup Storage Location (BSL) is deleted, backup and Restic repository resources will also be deleted.
#### Breaking changes
Starting in v1.8, Velero will only support Kubernetes v1 CRD meaning that Velero v1.8+ will only run on Kubernetes v1.16+. Before upgrading, make sure you are running a supported Kubernetes version. For more information, see our [compatibility matrix](https://github.com/vmware-tanzu/velero#velero-compatibility-matrix).
#### Upload Progress Monitoring and Item Snapshotter
Item Snapshotter plugin API was merged. This will support both Upload Progress
monitoring and the planned Data Mover. Upload Progress monitoring PRs are
in progress for 1.9.
### All changes
* E2E test on ssr object with controller namespace mix-ups (#4521, @mqiu)
* Check whether the volume is provisioned by CSI driver or not by the annotation as well (#4513, @ywk253100)
* Initialize the labels field of `velero backup-location create` option to avoid #4484 (#4491, @ywk253100)
* Fix e2e 2500 namespaces scale test timeout problem (#4480, @mqiu)
* Add backup deletion e2e test (#4401, @danfengliu)
* Return the error when getting backup store in backup deletion controller (#4465, @reasonerjt)
* Ignore the provided port is already allocated error when restoring the LoadBalancer service (#4462, @ywk253100)
* Revert #4423 migrate backup sync controller to kubebuilder. (#4457, @jxun)
* Add rbac and annotation test cases (#4455, @mqiu)
* remove --crds-version in velero install command. (#4446, @jxun)
* Upgrade e2e test vsphere plugin (#4440, @mqiu)
* Fix e2e test failures for the inappropriate optimize of velero install (#4438, @mqiu)
* Limit backup namespaces on test resource filtering cases (#4437, @mqiu)
* Bump up Go to 1.17 (#4431, @reasonerjt)
* Added `<backup name>`-itemsnapshots.json.gz to the backup format. This file exists
when item snapshots are taken and contains an array of volume.Itemsnapshots
containing the information about the snapshots. This will not be used unless
upload progress monitoring and item snapshots are enabled and an ItemSnapshot
plugin is used to take snapshots.
Also added DownloadTargetKindBackupItemSnapshots for retrieving the signed URL to download only the `<backup name>`-itemsnapshots.json.gz part of a backup for use by
`velero backup describe`. (#4429, @dsmithuchida)
* Migrate backup sync controller from code-generator to kubebuilder. (#4423, @jxun)
* Added UploadProgressFeature flag to enable Upload Progress Monitoring and Item
Snapshotters. (#4416, @dsmithuchida)
* Added BackupWithResolvers and RestoreWithResolvers calls. Will eventually replace Backup and Restore methods.
Adds ItemSnapshotters to Backup and Restore workflows. (#4410, @dsu)
* Build for darwin-arm64 (#4409, @epk)
* Add resource filtering test cases (#4404, @mqiu)
* Fix the issue that the backup cannot be deleted after the application uninstalled (#4398, @ywk253100)
* Add restoreactionitem plugin to handle admission webhook configurations (#4397, @reasonerjt)
* Keep the annotation "pv.kubernetes.io/provisioned-by" when restoring PVs (#4391, @ywk253100)
* Adjust structure of e2e test codes (#4386, @mqiu)
* feat: migrate velero controller from kubebuilder v2 to v3
From Velero v1.8, apiextesions.k8s.io/v1beta1 is no longer supported,
which means only CRD of apiextensions.k8s.io/v1 is supported,
and the supported Kubernetes version is updated to v1.16 and later. (#4382, @jxun)
* Delete backups and Restic repos associated with deleted BSL(s) (#4377, @codegold79)
* Add the key for GKE zone for AZ collection (#4376, @reasonerjt)
* Fix statefulsets volumeClaimTemplates storageClassName when use Changing PV/PVC Storage Classes (#4375, @Box-Cube)
* Fix snapshot e2e test issue of jsonpath (#4372, @danfengliu)
* Modify the timestamp in the name of a backup generated from schedule to use UTC. (#4353, @jxun)
* Read Availability zone from nodeAffinity requirements (#4350, @reasonerjt)
* Use factory.Namespace() to replace hardcoded velero namespace (#4346, @half-life666)
* Return the error if velero failed to detect S3 region for restic repo (#4343, @reasonerjt)
* Add init log option for velero controller-runtime manager. (#4341, @jxun)
* Ignore the `provided port is already allocated` error when restoring the `NodePort` service (#4336, @ywk253100)
* Fixed an issue with the `backup-location create` command where the BSL Credential field would be set to an invalid empty SecretKeySelector when no credential details were provided. (#4322, @zubron)
* fix buggy pager func (#4306, @alaypatel07)
* Don't create a backup immediately after creating a schedule (#4281, @ywk253100)
* Fix CVE-2020-29652 and CVE-2020-26160 (#4274, @ywk253100)
* Refine tag-release.sh to align with change in release process (#4185, @reasonerjt)
* Fix plugins incompatible issue in upgrade test (#4141, @danfengliu)
* Verify group before treating resource as cohabiting (#4126, @sseago)
* Added ItemSnapshotter plugin definition and plugin framework - addresses #3533.
Part of the Upload Progress enhancement (#3533) (#4077, @dsmithuchida)
* Add upgrade test in E2E test (#4058, @danfengliu)
* Handle namespace mapping for PVs without snapshots on restore (#3708, @sseago)

104
changelogs/CHANGELOG-1.9.md Normal file
View File

@@ -0,0 +1,104 @@
## v1.9.0
### 2022-06-13
### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.9.0
### Container Image
`velero/velero:v1.9.0`
### Documentation
https://velero.io/docs/v1.9/
### Upgrading
https://velero.io/docs/v1.9/upgrade-to-1.9/
### Highlights
#### Improvement to the CSI plugin
- Bump up to the CSI volume snapshot v1 API
- No VolumeSnapshot will be left in the source namespace of the workload
- Report metrics for CSI snapshots
More improvements please refer to [CSI plugin improvement](https://github.com/vmware-tanzu/velero/issues?q=is%3Aissue+label%3A%22CSI+plugin+-+GA+-+phase1%22+is%3Aclosed)
With these improvements we'll provide official support for CSI snapshots on AKS/EKS clusters. (with CSI plugin v0.3.0)
#### Refactor the controllers using Kubebuilder v3
In this release we continued our code modernization work, rewriting some controllers using Kubebuilder v3. This work is ongoing and we will continue to make progress in future releases.
#### Optionally restore status on selected resources
Options are added to the CLI and Restore spec to control the group of resources whose status will be restored.
#### ExistingResourcePolicy in the restore API
Users can choose to overwrite or patch the existing resources during restore by setting this policy.
#### Upgrade integrated Restic version and add skip TLS validation in Restic command
Upgrade integrated Restic version, which will resolve some of the CVEs, and support skip TLS validation in Restic backup/restore.
#### Breaking changes
With bumping up the API to v1 in CSI plugin, the v0.3.0 CSI plugin will only work for Kubernetes v1.20+
### All changes
* restic: add full support for setting SecurityContext for restore init container from configMap. (#4084, @MatthieuFin)
* Add metrics backup_items_total and backup_items_errors (#4296, @tobiasgiese)
* Convert PodVolumebackup controller to the Kubebuilder framework (#4436, @fgold)
* Skip not mounted volumes when backing up (#4497, @dkeven)
* Update doc for v1.8 (#4517, @reasonerjt)
* Fix bug to make the restic prune frequency configurable (#4518, @ywk253100)
* Add E2E test of backups sync from BSL (#4545, @mqiu)
* Fix: OrderedResources in Schedules (#4550, @dbrekau)
* Skip volumes of non-running pods when backing up (#4584, @bynare)
* E2E SSR test add retry mechanism and logs (#4591, @mqiu)
* Add pushing image to GCR in github workflow to facilitate some environments that have rate limitation to docker hub, e.g. vSphere. (#4623, @jxun)
* Add existingResourcePolicy to Restore API (#4628, @shubham-pampattiwar)
* Fix E2E backup namespaces test (#4634, @qiuming-best)
* Update image used by E2E test to gcr.io (#4639, @jxun)
* Add multiple label selector support to Velero Backup and Restore APIs (#4650, @shubham-pampattiwar)
* Convert Pod Volume Restore resource/controller to the Kubebuilder framework (#4655, @ywk253100)
* Update --use-owner-references-in-backup description in velero command line. (#4660, @jxun)
* Avoid overwritten hook's exec.container parameter when running pod command executor. (#4661, @jxun)
* Support regional pv for GKE (#4680, @jxun)
* Bypass the remap CRD version plugin when v1beta1 CRD is not supported (#4686, @reasonerjt)
* Add GINKGO_SKIP to support skip specific case in e2e test. (#4692, @jxun)
* Add --pod-labels flag to velero install (#4694, @j4m3s-s)
* Enable coverage in test.sh and upload to codecov (#4704, @reasonerjt)
* Mark the BSL as "Unavailable" when gets any error and add a new field "Message" to the status to record the error message (#4719, @ywk253100)
* Support multiple skip option for E2E test (#4725, @jxun)
* Add PriorityClass to the AdditionalItems of Backup's PodAction and Restore's PodAction plugin to backup and restore PriorityClass if it is used by a Pod. (#4740, @phuongatemc)
* Insert all restore errors and warnings into restore log. (#4743, @sseago)
* Refactor schedule controller with kubebuilder (#4748, @ywk253100)
* Garbage collector now adds labels to backups that failed to delete for BSLNotFound, BSLCannotGet, BSLReadOnly reasons. (#4757, @kaovilai)
* Skip podvolumerestore creation when restore excludes pv/pvc (#4769, @half-life666)
* Add parameter for e2e test to support modify kibishii install path. (#4778, @jxun)
* Ensure the restore hook applied to new namespace based on the mapping (#4779, @reasonerjt)
* Add ability to restore status on selected resources (#4785, @RafaeLeal)
* Do not take snapshot for PV to avoid duplicated snapshotting, when CSI feature is enabled. (#4797, @jxun)
* Bump up to v1 API for CSI snapshot (#4800, @reasonerjt)
* fix: delete empty backups (#4817, @yuvalman)
* Add CSI VolumeSnapshot related metrics. (#4818, @jxun)
* Fix default-backup-ttl not work (#4831, @qiuming-best)
* Make the vsc created by backup sync controller deletable (#4832, @reasonerjt)
* Make in-progress backup/restore as failed when doing the reconcile to avoid hanging in in-progress status (#4833, @ywk253100)
* Use controller-gen to generate the deep copy methods for objects (#4838, @ywk253100)
* Update integrated Restic version and add insecureSkipTLSVerify for Restic CLI. (#4839, @jxun)
* Modify CSI VolumeSnapshot metric related code. (#4854, @jxun)
* Refactor backup deletion controller based on kubebuilder (#4855, @reasonerjt)
* Remove VolumeSnapshots created during backup when CSI feature is enabled. (#4858, @jxun)
* Convert Restic Repository resource/controller to the Kubebuilder framework (#4859, @qiuming-best)
* Add ClusterClasses to the restore priority list (#4866, @reasonerjt)
* Cleanup the .velero folder after restic done (#4872, @big-appled)
* Delete orphan CSI snapshots in backup sync controller (#4887, @reasonerjt)
* Make waiting VolumeSnapshot to ready process parallel. (#4889, @jxun)
* continue rather than return for non-matching restore action label (#4890, @sseago)
* Make in-progress PVB/PVR as failed when restic controller restarts to avoid hanging backup/restore (#4893, @ywk253100)
* Refactor BSL controller with periodical enqueue source (#4894, @jxun)
* Make garbage collection for expired backups configurable (#4897, @ywk253100)
* Bump up the version of distroless to base-debian11 (#4898, @ywk253100)
* Add schedule ordered resources E2E test (#4913, @qiuming-best)
* Make velero completion zsh command output can be used by `source` command. (#4914, @jxun)
* Enhance the map flag to support parsing input value contains entry delimiters (#4920, @ywk253100)
* Fix E2E test [Backups][Deletion][Restic] on GCP. (#4968, @jxun)
* Disable status as sub resource in CRDs (#4972, @ywk253100)
* Add more information for failing to get path or snapshot in restic backup and restore. (#4988, @jxun)

View File

@@ -1 +0,0 @@
Add upgrade test in E2E test

View File

@@ -1 +0,0 @@
Verify group before treating resource as cohabitating

View File

@@ -1 +0,0 @@
Fix plugins incompatible issue in upgrade test

View File

@@ -1 +0,0 @@
Refine tag-release.sh to align with change in release process

View File

@@ -1 +0,0 @@
Fix CVE-2020-29652 and CVE-2020-26160

View File

@@ -1 +0,0 @@
Don't create a backup immediately after creating a schedule

View File

@@ -0,0 +1,27 @@
package main
import (
"fmt"
"os"
"time"
)
const (
// workingModePause indicates it is for general purpose to hold the pod under running state
workingModePause = "pause"
)
func main() {
if len(os.Args) < 2 {
fmt.Fprintln(os.Stderr, "ERROR: at least one argument must be provided, the working mode")
os.Exit(1)
}
switch os.Args[1] {
case workingModePause:
time.Sleep(time.Duration(1<<63 - 1))
default:
fmt.Fprintln(os.Stderr, "ERROR: wrong working mode provided")
os.Exit(1)
}
}

View File

@@ -18,7 +18,6 @@ package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"
@@ -34,12 +33,16 @@ func main() {
defer ticker.Stop()
for {
select {
case <-ticker.C:
if done() {
fmt.Println("All restic restores are done")
return
<-ticker.C
if done() {
fmt.Println("All restic restores are done")
err := removeFolder()
if err != nil {
fmt.Println(err)
} else {
fmt.Println("Done cleanup .velero folder")
}
return
}
}
}
@@ -48,7 +51,7 @@ func main() {
// within the .velero/ subdirectory whose name is equal to os.Args[1], or
// false otherwise
func done() bool {
children, err := ioutil.ReadDir("/restores")
children, err := os.ReadDir("/restores")
if err != nil {
fmt.Fprintf(os.Stderr, "ERROR reading /restores directory: %s\n", err)
return false
@@ -75,3 +78,28 @@ func done() bool {
return true
}
// remove .velero folder
func removeFolder() error {
children, err := os.ReadDir("/restores")
if err != nil {
return err
}
for _, child := range children {
if !child.IsDir() {
fmt.Printf("%s is not a directory, skipping.\n", child.Name())
continue
}
donePath := filepath.Join("/restores", child.Name(), ".velero")
err = os.RemoveAll(donePath)
if err != nil {
return err
}
fmt.Printf("Deleted %s", donePath)
}
return nil
}

View File

@@ -20,7 +20,7 @@ import (
"os"
"path/filepath"
"k8s.io/klog"
"k8s.io/klog/v2"
"github.com/vmware-tanzu/velero/pkg/cmd"
"github.com/vmware-tanzu/velero/pkg/cmd/velero"

View File

@@ -1,22 +1,27 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: resticrepositories.velero.io
controller-gen.kubebuilder.io/version: v0.12.0
name: backuprepositories.velero.io
spec:
group: velero.io
names:
kind: ResticRepository
listKind: ResticRepositoryList
plural: resticrepositories
singular: resticrepository
kind: BackupRepository
listKind: BackupRepositoryList
plural: backuprepositories
singular: backuprepository
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.repositoryType
name: Repository Type
type: string
name: v1
schema:
openAPIV3Schema:
properties:
@@ -33,7 +38,7 @@ spec:
metadata:
type: object
spec:
description: ResticRepositorySpec is the specification for a ResticRepository.
description: BackupRepositorySpec is the specification for a BackupRepository.
properties:
backupStorageLocation:
description: BackupStorageLocation is the name of the BackupStorageLocation
@@ -43,12 +48,19 @@ spec:
description: MaintenanceFrequency is how often maintenance should
be run.
type: string
repositoryType:
description: RepositoryType indicates the type of the backend repository
enum:
- kopia
- restic
- ""
type: string
resticIdentifier:
description: ResticIdentifier is the full restic-compatible string
for identifying this repository.
type: string
volumeNamespace:
description: VolumeNamespace is the namespace this restic repository
description: VolumeNamespace is the namespace this backup repository
contains pod volume backups for.
type: string
required:
@@ -58,7 +70,7 @@ spec:
- volumeNamespace
type: object
status:
description: ResticRepositoryStatus is the current status of a ResticRepository.
description: BackupRepositoryStatus is the current status of a BackupRepository.
properties:
lastMaintenanceTime:
description: LastMaintenanceTime is the last time maintenance was
@@ -68,10 +80,10 @@ spec:
type: string
message:
description: Message is a message about the current status of the
ResticRepository.
BackupRepository.
type: string
phase:
description: Phase is the current state of the ResticRepository.
description: Phase is the current state of the BackupRepository.
enum:
- New
- Ready
@@ -81,9 +93,4 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
subresources: {}

View File

@@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: backups.velero.io
spec:
group: velero.io
@@ -37,10 +35,46 @@ spec:
spec:
description: BackupSpec defines the specification for a Velero backup.
properties:
defaultVolumesToRestic:
description: DefaultVolumesToRestic specifies whether restic should
be used to take a backup of all pod volumes by default.
csiSnapshotTimeout:
description: CSISnapshotTimeout specifies the time used to wait for
CSI VolumeSnapshot status turns to ReadyToUse during creation, before
returning error as timeout. The default value is 10 minute.
type: string
datamover:
description: DataMover specifies the data mover to be used by the
backup. If DataMover is "" or "velero", the built-in data mover
will be used.
type: string
defaultVolumesToFsBackup:
description: DefaultVolumesToFsBackup specifies whether pod volume
file system backup should be used for all volumes by default.
nullable: true
type: boolean
defaultVolumesToRestic:
description: "DefaultVolumesToRestic specifies whether restic should
be used to take a backup of all pod volumes by default. \n Deprecated:
this field is no longer used and will be removed entirely in future.
Use DefaultVolumesToFsBackup instead."
nullable: true
type: boolean
excludedClusterScopedResources:
description: ExcludedClusterScopedResources is a slice of cluster-scoped
resource type names to exclude from the backup. If set to "*", all
cluster-scoped resource types are excluded. The default value is
empty.
items:
type: string
nullable: true
type: array
excludedNamespaceScopedResources:
description: ExcludedNamespaceScopedResources is a slice of namespace-scoped
resource type names to exclude from the backup. If set to "*", all
namespace-scoped resource types are excluded. The default value
is empty.
items:
type: string
nullable: true
type: array
excludedNamespaces:
description: ExcludedNamespaces contains a list of namespaces that
are not included in the backup.
@@ -144,6 +178,7 @@ spec:
contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
name:
description: Name is the name of this hook.
type: string
@@ -246,6 +281,23 @@ spec:
resources should be included for consideration in the backup.
nullable: true
type: boolean
includedClusterScopedResources:
description: IncludedClusterScopedResources is a slice of cluster-scoped
resource type names to include in the backup. If set to "*", all
cluster-scoped resource types are included. The default value is
empty, which means only related cluster-scoped resources are included.
items:
type: string
nullable: true
type: array
includedNamespaceScopedResources:
description: IncludedNamespaceScopedResources is a slice of namespace-scoped
resource type names to include in the backup. The default value
is "*".
items:
type: string
nullable: true
type: array
includedNamespaces:
description: IncludedNamespaces is a slice of namespace names to include
objects from. If empty, all namespaces are included.
@@ -260,6 +312,11 @@ spec:
type: string
nullable: true
type: array
itemOperationTimeout:
description: ItemOperationTimeout specifies the time used to wait
for asynchronous BackupItemAction operations The default value is
1 hour.
type: string
labelSelector:
description: LabelSelector is a metav1.LabelSelector to filter with
when adding individual objects to the backup. If empty or nil, all
@@ -307,6 +364,7 @@ spec:
are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
metadata:
properties:
labels:
@@ -314,18 +372,101 @@ spec:
type: string
type: object
type: object
orLabelSelectors:
description: OrLabelSelectors is list of metav1.LabelSelector to filter
with when adding individual objects to the backup. If multiple provided
they will be joined by the OR operator. LabelSelector as well as
OrLabelSelectors cannot co-exist in backup request, only one of
them can be used.
items:
description: A label selector is a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. An empty
label selector matches all objects. A null label selector matches
no objects.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the
key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a
strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
nullable: true
type: array
orderedResources:
additionalProperties:
type: string
description: OrderedResources specifies the backup order of resources
of specific Kind. The map key is the Kind name and value is a list
of resource names separated by commas. Each resource name has format
"namespace/resourcename". For cluster resources, simply use "resourcename".
of specific Kind. The map key is the resource name and value is
a list of object names separated by commas. Each resource name has
format "namespace/objectname". For cluster resources, simply use
"objectname".
nullable: true
type: object
resourcePolicy:
description: ResourcePolicy specifies the referenced resource policies
that backup should follow
properties:
apiGroup:
description: APIGroup is the group for the resource being referenced.
If APIGroup is not specified, the specified Kind must be in
the core API group. For any other third-party types, APIGroup
is required.
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
required:
- kind
- name
type: object
x-kubernetes-map-type: atomic
snapshotMoveData:
description: SnapshotMoveData specifies whether snapshot data should
be moved
nullable: true
type: boolean
snapshotVolumes:
description: SnapshotVolumes specifies whether to take cloud snapshots
of any PV's referenced in the set of objects included in the Backup.
description: SnapshotVolumes specifies whether to take snapshots of
any PV's referenced in the set of objects included in the Backup.
nullable: true
type: boolean
storageLocation:
@@ -346,6 +487,20 @@ spec:
status:
description: BackupStatus captures the current status of a Velero backup.
properties:
backupItemOperationsAttempted:
description: BackupItemOperationsAttempted is the total number of
attempted async BackupItemAction operations for this backup.
type: integer
backupItemOperationsCompleted:
description: BackupItemOperationsCompleted is the total number of
successfully completed async BackupItemAction operations for this
backup.
type: integer
backupItemOperationsFailed:
description: BackupItemOperationsFailed is the total number of async
BackupItemAction operations for this backup which ended with an
error.
type: integer
completionTimestamp:
description: CompletionTimestamp records the time a backup was completed.
Completion time is recorded even on failed backups. Completion time
@@ -354,6 +509,14 @@ spec:
format: date-time
nullable: true
type: string
csiVolumeSnapshotsAttempted:
description: CSIVolumeSnapshotsAttempted is the total number of attempted
CSI VolumeSnapshots for this backup.
type: integer
csiVolumeSnapshotsCompleted:
description: CSIVolumeSnapshotsCompleted is the total number of successfully
completed CSI VolumeSnapshots for this backup.
type: integer
errors:
description: Errors is a count of all error messages that were generated
during execution of the backup. The actual errors are in the backup's
@@ -364,6 +527,10 @@ spec:
format: date-time
nullable: true
type: string
failureReason:
description: FailureReason is an error that caused the entire backup
to fail.
type: string
formatVersion:
description: FormatVersion is the backup format version, including
major, minor, and patch version.
@@ -374,6 +541,10 @@ spec:
- New
- FailedValidation
- InProgress
- WaitingForPluginOperations
- WaitingForPluginOperationsPartiallyFailed
- Finalizing
- FinalizingPartiallyFailed
- Completed
- PartiallyFailed
- Failed
@@ -432,9 +603,3 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: backupstoragelocations.velero.io
spec:
group: velero.io
@@ -92,6 +90,7 @@ spec:
required:
- key
type: object
x-kubernetes-map-type: atomic
default:
description: Default indicates this location is the default backup
storage location.
@@ -158,6 +157,10 @@ spec:
format: date-time
nullable: true
type: string
message:
description: Message is a message about the backup storage location's
status.
type: string
phase:
description: Phase is the current state of the BackupStorageLocation.
enum:
@@ -168,11 +171,4 @@ spec:
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
subresources: {}

View File

@@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: deletebackuprequests.velero.io
spec:
group: velero.io
@@ -16,7 +14,16 @@ spec:
singular: deletebackuprequest
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- description: The name of the backup to be deleted
jsonPath: .spec.backupName
name: BackupName
type: string
- description: The status of the deletion request
jsonPath: .status.phase
name: Status
type: string
name: v1
schema:
openAPIV3Schema:
description: DeleteBackupRequest is a request to delete one or more backups.
@@ -63,9 +70,4 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
subresources: {}

View File

@@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: downloadrequests.velero.io
spec:
group: velero.io
@@ -46,12 +44,18 @@ spec:
- BackupLog
- BackupContents
- BackupVolumeSnapshots
- BackupItemOperations
- BackupResourceList
- BackupResults
- RestoreLog
- RestoreResults
- RestoreResourceList
- RestoreItemOperations
- CSIBackupVolumeSnapshots
- CSIBackupVolumeSnapshotContents
type: string
name:
description: Name is the name of the kubernetes resource with
description: Name is the name of the Kubernetes resource with
which the file is associated.
type: string
required:
@@ -84,11 +88,3 @@ spec:
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: podvolumebackups.velero.io
spec:
group: velero.io
@@ -16,7 +14,44 @@ spec:
singular: podvolumebackup
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- description: Pod Volume Backup status such as New/InProgress
jsonPath: .status.phase
name: Status
type: string
- description: Time when this backup was started
jsonPath: .status.startTimestamp
name: Created
type: date
- description: Namespace of the pod containing the volume to be backed up
jsonPath: .spec.pod.namespace
name: Namespace
type: string
- description: Name of the pod containing the volume to be backed up
jsonPath: .spec.pod.name
name: Pod
type: string
- description: Name of the volume to be backed up
jsonPath: .spec.volume
name: Volume
type: string
- description: Backup repository identifier for this backup
jsonPath: .spec.repoIdentifier
name: Repository ID
type: string
- description: The type of the uploader to handle data transfer
jsonPath: .spec.uploaderType
name: Uploader Type
type: string
- description: Name of the Backup Storage Location where this backup should be
stored
jsonPath: .spec.backupStorageLocation
name: Storage Location
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
properties:
@@ -37,7 +72,7 @@ spec:
properties:
backupStorageLocation:
description: BackupStorageLocation is the name of the backup storage
location where the restic repository is stored.
location where the backup repository is stored.
type: string
node:
description: Node is the name of the node that the Pod is running
@@ -80,8 +115,9 @@ spec:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
x-kubernetes-map-type: atomic
repoIdentifier:
description: RepoIdentifier is the restic repository identifier.
description: RepoIdentifier is the backup repository identifier.
type: string
tags:
additionalProperties:
@@ -89,6 +125,14 @@ spec:
description: Tags are a map of key-value pairs that should be applied
to the volume backup as tags.
type: object
uploaderType:
description: UploaderType is the type of the uploader to handle the
data transfer.
enum:
- kopia
- restic
- ""
type: string
volume:
description: Volume is the name of the volume within the Pod to be
backed up.
@@ -153,9 +197,4 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
subresources: {}

View File

@@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: podvolumerestores.velero.io
spec:
group: velero.io
@@ -16,7 +14,41 @@ spec:
singular: podvolumerestore
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- description: Namespace of the pod containing the volume to be restored
jsonPath: .spec.pod.namespace
name: Namespace
type: string
- description: Name of the pod containing the volume to be restored
jsonPath: .spec.pod.name
name: Pod
type: string
- description: The type of the uploader to handle data transfer
jsonPath: .spec.uploaderType
name: Uploader Type
type: string
- description: Name of the volume to be restored
jsonPath: .spec.volume
name: Volume
type: string
- description: Pod Volume Restore status such as New/InProgress
jsonPath: .status.phase
name: Status
type: string
- description: Pod Volume Restore status such as New/InProgress
format: int64
jsonPath: .status.progress.totalBytes
name: TotalBytes
type: integer
- description: Pod Volume Restore status such as New/InProgress
format: int64
jsonPath: .status.progress.bytesDone
name: BytesDone
type: integer
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
properties:
@@ -37,7 +69,7 @@ spec:
properties:
backupStorageLocation:
description: BackupStorageLocation is the name of the backup storage
location where the restic repository is stored.
location where the backup repository is stored.
type: string
pod:
description: Pod is a reference to the pod containing the volume to
@@ -76,12 +108,25 @@ spec:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
x-kubernetes-map-type: atomic
repoIdentifier:
description: RepoIdentifier is the restic repository identifier.
description: RepoIdentifier is the backup repository identifier.
type: string
snapshotID:
description: SnapshotID is the ID of the volume snapshot to be restored.
type: string
sourceNamespace:
description: SourceNamespace is the original namespace for namaspace
mapping.
type: string
uploaderType:
description: UploaderType is the type of the uploader to handle the
data transfer.
enum:
- kopia
- restic
- ""
type: string
volume:
description: Volume is the name of the volume within the Pod to be
restored.
@@ -91,6 +136,7 @@ spec:
- pod
- repoIdentifier
- snapshotID
- sourceNamespace
- volume
type: object
status:
@@ -136,9 +182,4 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
subresources: {}

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: schedules.velero.io
spec:
group: velero.io
@@ -16,7 +14,26 @@ spec:
singular: schedule
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- description: Status of the schedule
jsonPath: .status.phase
name: Status
type: string
- description: A Cron expression defining when to run the Backup
jsonPath: .spec.schedule
name: Schedule
type: string
- description: The last time a Backup was run for this schedule
jsonPath: .status.lastBackup
name: LastBackup
type: date
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.paused
name: Paused
type: boolean
name: v1
schema:
openAPIV3Schema:
description: Schedule is a Velero resource that represents a pre-scheduled
@@ -37,6 +54,9 @@ spec:
spec:
description: ScheduleSpec defines the specification for a Velero schedule
properties:
paused:
description: Paused specifies whether the schedule is paused or not
type: boolean
schedule:
description: Schedule is a Cron expression defining when to run the
Backup.
@@ -45,10 +65,46 @@ spec:
description: Template is the definition of the Backup to be run on
the provided schedule
properties:
defaultVolumesToRestic:
description: DefaultVolumesToRestic specifies whether restic should
be used to take a backup of all pod volumes by default.
csiSnapshotTimeout:
description: CSISnapshotTimeout specifies the time used to wait
for CSI VolumeSnapshot status turns to ReadyToUse during creation,
before returning error as timeout. The default value is 10 minute.
type: string
datamover:
description: DataMover specifies the data mover to be used by
the backup. If DataMover is "" or "velero", the built-in data
mover will be used.
type: string
defaultVolumesToFsBackup:
description: DefaultVolumesToFsBackup specifies whether pod volume
file system backup should be used for all volumes by default.
nullable: true
type: boolean
defaultVolumesToRestic:
description: "DefaultVolumesToRestic specifies whether restic
should be used to take a backup of all pod volumes by default.
\n Deprecated: this field is no longer used and will be removed
entirely in future. Use DefaultVolumesToFsBackup instead."
nullable: true
type: boolean
excludedClusterScopedResources:
description: ExcludedClusterScopedResources is a slice of cluster-scoped
resource type names to exclude from the backup. If set to "*",
all cluster-scoped resource types are excluded. The default
value is empty.
items:
type: string
nullable: true
type: array
excludedNamespaceScopedResources:
description: ExcludedNamespaceScopedResources is a slice of namespace-scoped
resource type names to exclude from the backup. If set to "*",
all namespace-scoped resource types are excluded. The default
value is empty.
items:
type: string
nullable: true
type: array
excludedNamespaces:
description: ExcludedNamespaces contains a list of namespaces
that are not included in the backup.
@@ -153,6 +209,7 @@ spec:
requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
name:
description: Name is the name of this hook.
type: string
@@ -259,6 +316,24 @@ spec:
resources should be included for consideration in the backup.
nullable: true
type: boolean
includedClusterScopedResources:
description: IncludedClusterScopedResources is a slice of cluster-scoped
resource type names to include in the backup. If set to "*",
all cluster-scoped resource types are included. The default
value is empty, which means only related cluster-scoped resources
are included.
items:
type: string
nullable: true
type: array
includedNamespaceScopedResources:
description: IncludedNamespaceScopedResources is a slice of namespace-scoped
resource type names to include in the backup. The default value
is "*".
items:
type: string
nullable: true
type: array
includedNamespaces:
description: IncludedNamespaces is a slice of namespace names
to include objects from. If empty, all namespaces are included.
@@ -273,6 +348,11 @@ spec:
type: string
nullable: true
type: array
itemOperationTimeout:
description: ItemOperationTimeout specifies the time used to wait
for asynchronous BackupItemAction operations The default value
is 1 hour.
type: string
labelSelector:
description: LabelSelector is a metav1.LabelSelector to filter
with when adding individual objects to the backup. If empty
@@ -320,6 +400,7 @@ spec:
"value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
metadata:
properties:
labels:
@@ -327,18 +408,100 @@ spec:
type: string
type: object
type: object
orLabelSelectors:
description: OrLabelSelectors is list of metav1.LabelSelector
to filter with when adding individual objects to the backup.
If multiple provided they will be joined by the OR operator.
LabelSelector as well as OrLabelSelectors cannot co-exist in
backup request, only one of them can be used.
items:
description: A label selector is a label query over a set of
resources. The result of matchLabels and matchExpressions
are ANDed. An empty label selector matches all objects. A
null label selector matches no objects.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values array
must be non-empty. If the operator is Exists or
DoesNotExist, the values array must be empty. This
array is replaced during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is
"key", the operator is "In", and the values array contains
only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
nullable: true
type: array
orderedResources:
additionalProperties:
type: string
description: OrderedResources specifies the backup order of resources
of specific Kind. The map key is the Kind name and value is
a list of resource names separated by commas. Each resource
name has format "namespace/resourcename". For cluster resources,
simply use "resourcename".
of specific Kind. The map key is the resource name and value
is a list of object names separated by commas. Each resource
name has format "namespace/objectname". For cluster resources,
simply use "objectname".
nullable: true
type: object
resourcePolicy:
description: ResourcePolicy specifies the referenced resource
policies that backup should follow
properties:
apiGroup:
description: APIGroup is the group for the resource being
referenced. If APIGroup is not specified, the specified
Kind must be in the core API group. For any other third-party
types, APIGroup is required.
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
required:
- kind
- name
type: object
x-kubernetes-map-type: atomic
snapshotMoveData:
description: SnapshotMoveData specifies whether snapshot data
should be moved
nullable: true
type: boolean
snapshotVolumes:
description: SnapshotVolumes specifies whether to take cloud snapshots
description: SnapshotVolumes specifies whether to take snapshots
of any PV's referenced in the set of objects included in the
Backup.
nullable: true
@@ -393,9 +556,4 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
subresources: {}

View File

@@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: serverstatusrequests.velero.io
spec:
group: velero.io
@@ -77,11 +75,3 @@ spec:
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: volumesnapshotlocations.velero.io
spec:
group: velero.io
@@ -13,6 +11,8 @@ spec:
kind: VolumeSnapshotLocation
listKind: VolumeSnapshotLocationList
plural: volumesnapshotlocations
shortNames:
- vsl
singular: volumesnapshotlocation
scope: Namespaced
versions:
@@ -43,6 +43,25 @@ spec:
type: string
description: Config is for provider-specific configuration fields.
type: object
credential:
description: Credential contains the credential information intended
to be used with this location
properties:
key:
description: The key of the secret to select from. Must be a
valid secret key.
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the Secret or its key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
provider:
description: Provider is the provider of the volume storage.
type: string
@@ -64,9 +83,3 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

File diff suppressed because one or more lines are too long

View File

@@ -1,439 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: backups.velero.io
spec:
group: velero.io
names:
kind: Backup
listKind: BackupList
plural: backups
singular: backup
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
description: Backup is a Velero resource that represents the capture of Kubernetes
cluster state at a point in time (API objects and associated volume state).
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: BackupSpec defines the specification for a Velero backup.
properties:
defaultVolumesToRestic:
description: DefaultVolumesToRestic specifies whether restic should
be used to take a backup of all pod volumes by default.
type: boolean
excludedNamespaces:
description: ExcludedNamespaces contains a list of namespaces that are
not included in the backup.
items:
type: string
nullable: true
type: array
excludedResources:
description: ExcludedResources is a slice of resource names that are
not included in the backup.
items:
type: string
nullable: true
type: array
hooks:
description: Hooks represent custom behaviors that should be executed
at different phases of the backup.
properties:
resources:
description: Resources are hooks that should be executed when backing
up individual instances of a resource.
items:
description: BackupResourceHookSpec defines one or more BackupResourceHooks
that should be executed based on the rules defined for namespaces,
resources, and label selector.
properties:
excludedNamespaces:
description: ExcludedNamespaces specifies the namespaces to
which this hook spec does not apply.
items:
type: string
nullable: true
type: array
excludedResources:
description: ExcludedResources specifies the resources to
which this hook spec does not apply.
items:
type: string
nullable: true
type: array
includedNamespaces:
description: IncludedNamespaces specifies the namespaces to
which this hook spec applies. If empty, it applies to all
namespaces.
items:
type: string
nullable: true
type: array
includedResources:
description: IncludedResources specifies the resources to
which this hook spec applies. If empty, it applies to all
resources.
items:
type: string
nullable: true
type: array
labelSelector:
description: LabelSelector, if specified, filters the resources
to which this hook spec applies.
nullable: true
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values array
must be non-empty. If the operator is Exists or
DoesNotExist, the values array must be empty.
This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is
"key", the operator is "In", and the values array contains
only "value". The requirements are ANDed.
type: object
type: object
name:
description: Name is the name of this hook.
type: string
post:
description: PostHooks is a list of BackupResourceHooks to
execute after storing the item in the backup. These are
executed after all "additional items" from item actions
are processed.
items:
description: BackupResourceHook defines a hook for a resource.
properties:
exec:
description: Exec defines an exec hook.
properties:
command:
description: Command is the command and arguments
to execute.
items:
type: string
minItems: 1
type: array
container:
description: Container is the container in the pod
where the command should be executed. If not specified,
the pod's first container is used.
type: string
onError:
description: OnError specifies how Velero should
behave if it encounters an error executing this
hook.
enum:
- Continue
- Fail
type: string
timeout:
description: Timeout defines the maximum amount
of time Velero should wait for the hook to complete
before considering the execution a failure.
type: string
required:
- command
type: object
required:
- exec
type: object
type: array
pre:
description: PreHooks is a list of BackupResourceHooks to
execute prior to storing the item in the backup. These are
executed before any "additional items" from item actions
are processed.
items:
description: BackupResourceHook defines a hook for a resource.
properties:
exec:
description: Exec defines an exec hook.
properties:
command:
description: Command is the command and arguments
to execute.
items:
type: string
minItems: 1
type: array
container:
description: Container is the container in the pod
where the command should be executed. If not specified,
the pod's first container is used.
type: string
onError:
description: OnError specifies how Velero should
behave if it encounters an error executing this
hook.
enum:
- Continue
- Fail
type: string
timeout:
description: Timeout defines the maximum amount
of time Velero should wait for the hook to complete
before considering the execution a failure.
type: string
required:
- command
type: object
required:
- exec
type: object
type: array
required:
- name
type: object
nullable: true
type: array
type: object
includeClusterResources:
description: IncludeClusterResources specifies whether cluster-scoped
resources should be included for consideration in the backup.
nullable: true
type: boolean
includedNamespaces:
description: IncludedNamespaces is a slice of namespace names to include
objects from. If empty, all namespaces are included.
items:
type: string
nullable: true
type: array
includedResources:
description: IncludedResources is a slice of resource names to include
in the backup. If empty, all resources are included.
items:
type: string
nullable: true
type: array
labelSelector:
description: LabelSelector is a metav1.LabelSelector to filter with
when adding individual objects to the backup. If empty or nil, all
objects are included. Optional.
nullable: true
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that contains
values, a key, and an operator that relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to a
set of values. Valid operators are In, NotIn, Exists and
DoesNotExist.
type: string
values:
description: values is an array of string values. If the operator
is In or NotIn, the values array must be non-empty. If the
operator is Exists or DoesNotExist, the values array must
be empty. This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator is
"In", and the values array contains only "value". The requirements
are ANDed.
type: object
type: object
metadata:
properties:
labels:
additionalProperties:
type: string
type: object
type: object
orderedResources:
additionalProperties:
type: string
description: OrderedResources specifies the backup order of resources
of specific Kind. The map key is the Kind name and value is a list
of resource names separated by commas. Each resource name has format
"namespace/resourcename". For cluster resources, simply use "resourcename".
nullable: true
type: object
snapshotVolumes:
description: SnapshotVolumes specifies whether to take cloud snapshots
of any PV's referenced in the set of objects included in the Backup.
nullable: true
type: boolean
storageLocation:
description: StorageLocation is a string containing the name of a BackupStorageLocation
where the backup should be stored.
type: string
ttl:
description: TTL is a time.Duration-parseable string describing how
long the Backup should be retained for.
type: string
volumeSnapshotLocations:
description: VolumeSnapshotLocations is a list containing names of VolumeSnapshotLocations
associated with this backup.
items:
type: string
type: array
type: object
status:
description: BackupStatus captures the current status of a Velero backup.
properties:
completionTimestamp:
description: CompletionTimestamp records the time a backup was completed.
Completion time is recorded even on failed backups. Completion time
is recorded before uploading the backup object. The server's time
is used for CompletionTimestamps
format: date-time
nullable: true
type: string
errors:
description: Errors is a count of all error messages that were generated
during execution of the backup. The actual errors are in the backup's
log file in object storage.
type: integer
expiration:
description: Expiration is when this Backup is eligible for garbage-collection.
format: date-time
nullable: true
type: string
formatVersion:
description: FormatVersion is the backup format version, including major,
minor, and patch version.
type: string
phase:
description: Phase is the current state of the Backup.
enum:
- New
- FailedValidation
- InProgress
- Completed
- PartiallyFailed
- Failed
- Deleting
type: string
progress:
description: Progress contains information about the backup's execution
progress. Note that this information is best-effort only -- if Velero
fails to update it during a backup for any reason, it may be inaccurate/stale.
nullable: true
properties:
itemsBackedUp:
description: ItemsBackedUp is the number of items that have actually
been written to the backup tarball so far.
type: integer
totalItems:
description: TotalItems is the total number of items to be backed
up. This number may change throughout the execution of the backup
due to plugins that return additional related items to back up,
the velero.io/exclude-from-backup label, and various other filters
that happen as items are processed.
type: integer
type: object
startTimestamp:
description: StartTimestamp records the time a backup was started. Separate
from CreationTimestamp, since that value changes on restores. The
server's time is used for StartTimestamps
format: date-time
nullable: true
type: string
validationErrors:
description: ValidationErrors is a slice of all validation errors (if
applicable).
items:
type: string
nullable: true
type: array
version:
description: 'Version is the backup format major version. Deprecated:
Please see FormatVersion'
type: integer
volumeSnapshotsAttempted:
description: VolumeSnapshotsAttempted is the total number of attempted
volume snapshots for this backup.
type: integer
volumeSnapshotsCompleted:
description: VolumeSnapshotsCompleted is the total number of successfully
completed volume snapshots for this backup.
type: integer
warnings:
description: Warnings is a count of all warning messages that were generated
during execution of the backup. The actual warnings are in the backup's
log file in object storage.
type: integer
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,179 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: backupstoragelocations.velero.io
spec:
additionalPrinterColumns:
- JSONPath: .status.phase
description: Backup Storage Location status such as Available/Unavailable
name: Phase
type: string
- JSONPath: .status.lastValidationTime
description: LastValidationTime is the last time the backup store location was
validated
name: Last Validated
type: date
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
- JSONPath: .spec.default
description: Default backup storage location
name: Default
type: boolean
group: velero.io
names:
kind: BackupStorageLocation
listKind: BackupStorageLocationList
plural: backupstoragelocations
shortNames:
- bsl
singular: backupstoragelocation
preserveUnknownFields: false
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: BackupStorageLocation is a location where Velero stores backup
objects
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: BackupStorageLocationSpec defines the desired state of a Velero
BackupStorageLocation
properties:
accessMode:
description: AccessMode defines the permissions for the backup storage
location.
enum:
- ReadOnly
- ReadWrite
type: string
backupSyncPeriod:
description: BackupSyncPeriod defines how frequently to sync backup
API objects from object storage. A value of 0 disables sync.
nullable: true
type: string
config:
additionalProperties:
type: string
description: Config is for provider-specific configuration fields.
type: object
credential:
description: Credential contains the credential information intended
to be used with this location
properties:
key:
description: The key of the secret to select from. Must be a valid
secret key.
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
optional:
description: Specify whether the Secret or its key must be defined
type: boolean
required:
- key
type: object
default:
description: Default indicates this location is the default backup storage
location.
type: boolean
objectStorage:
description: ObjectStorageLocation specifies the settings necessary
to connect to a provider's object storage.
properties:
bucket:
description: Bucket is the bucket to use for object storage.
type: string
caCert:
description: CACert defines a CA bundle to use when verifying TLS
connections to the provider.
format: byte
type: string
prefix:
description: Prefix is the path inside a bucket to use for Velero
storage. Optional.
type: string
required:
- bucket
type: object
provider:
description: Provider is the provider of the backup storage.
type: string
validationFrequency:
description: ValidationFrequency defines how frequently to validate
the corresponding object storage. A value of 0 disables validation.
nullable: true
type: string
required:
- objectStorage
- provider
type: object
status:
description: BackupStorageLocationStatus defines the observed state of BackupStorageLocation
properties:
accessMode:
description: "AccessMode is an unused field. \n Deprecated: there is
now an AccessMode field on the Spec and this field will be removed
entirely as of v2.0."
enum:
- ReadOnly
- ReadWrite
type: string
lastSyncedRevision:
description: "LastSyncedRevision is the value of the `metadata/revision`
file in the backup storage location the last time the BSL's contents
were synced into the cluster. \n Deprecated: this field is no longer
updated or used for detecting changes to the location's contents and
will be removed entirely in v2.0."
type: string
lastSyncedTime:
description: LastSyncedTime is the last time the contents of the location
were synced into the cluster.
format: date-time
nullable: true
type: string
lastValidationTime:
description: LastValidationTime is the last time the backup store location
was validated the cluster.
format: date-time
nullable: true
type: string
phase:
description: Phase is the current state of the BackupStorageLocation.
enum:
- Available
- Unavailable
type: string
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,73 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: deletebackuprequests.velero.io
spec:
group: velero.io
names:
kind: DeleteBackupRequest
listKind: DeleteBackupRequestList
plural: deletebackuprequests
singular: deletebackuprequest
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
description: DeleteBackupRequest is a request to delete one or more backups.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: DeleteBackupRequestSpec is the specification for which backups
to delete.
properties:
backupName:
type: string
required:
- backupName
type: object
status:
description: DeleteBackupRequestStatus is the current status of a DeleteBackupRequest.
properties:
errors:
description: Errors contains any errors that were encountered during
the deletion process.
items:
type: string
nullable: true
type: array
phase:
description: Phase is the current state of the DeleteBackupRequest.
enum:
- New
- InProgress
- Processed
type: string
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,96 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: downloadrequests.velero.io
spec:
group: velero.io
names:
kind: DownloadRequest
listKind: DownloadRequestList
plural: downloadrequests
singular: downloadrequest
preserveUnknownFields: false
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: DownloadRequest is a request to download an artifact from backup
object storage, such as a backup log file.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: DownloadRequestSpec is the specification for a download request.
properties:
target:
description: Target is what to download (e.g. logs for a backup).
properties:
kind:
description: Kind is the type of file to download.
enum:
- BackupLog
- BackupContents
- BackupVolumeSnapshots
- BackupResourceList
- RestoreLog
- RestoreResults
type: string
name:
description: Name is the name of the kubernetes resource with which
the file is associated.
type: string
required:
- kind
- name
type: object
required:
- target
type: object
status:
description: DownloadRequestStatus is the current status of a DownloadRequest.
properties:
downloadURL:
description: DownloadURL contains the pre-signed URL for the target
file.
type: string
expiration:
description: Expiration is when this DownloadRequest expires and can
be deleted by the system.
format: date-time
nullable: true
type: string
phase:
description: Phase is the current state of the DownloadRequest.
enum:
- New
- Processed
type: string
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,162 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: podvolumebackups.velero.io
spec:
group: velero.io
names:
kind: PodVolumeBackup
listKind: PodVolumeBackupList
plural: podvolumebackups
singular: podvolumebackup
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: PodVolumeBackupSpec is the specification for a PodVolumeBackup.
properties:
backupStorageLocation:
description: BackupStorageLocation is the name of the backup storage
location where the restic repository is stored.
type: string
node:
description: Node is the name of the node that the Pod is running on.
type: string
pod:
description: Pod is a reference to the pod containing the volume to
be backed up.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of an
entire object, this string should contain a valid JSON/Go field
access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen only
to have some well-defined way of referencing a part of an object.
TODO: this design is not final and this field is subject to change
in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference is
made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
repoIdentifier:
description: RepoIdentifier is the restic repository identifier.
type: string
tags:
additionalProperties:
type: string
description: Tags are a map of key-value pairs that should be applied
to the volume backup as tags.
type: object
volume:
description: Volume is the name of the volume within the Pod to be backed
up.
type: string
required:
- backupStorageLocation
- node
- pod
- repoIdentifier
- volume
type: object
status:
description: PodVolumeBackupStatus is the current status of a PodVolumeBackup.
properties:
completionTimestamp:
description: CompletionTimestamp records the time a backup was completed.
Completion time is recorded even on failed backups. Completion time
is recorded before uploading the backup object. The server's time
is used for CompletionTimestamps
format: date-time
nullable: true
type: string
message:
description: Message is a message about the pod volume backup's status.
type: string
path:
description: Path is the full path within the controller pod being backed
up.
type: string
phase:
description: Phase is the current state of the PodVolumeBackup.
enum:
- New
- InProgress
- Completed
- Failed
type: string
progress:
description: Progress holds the total number of bytes of the volume
and the current number of backed up bytes. This can be used to display
progress information about the backup operation.
properties:
bytesDone:
format: int64
type: integer
totalBytes:
format: int64
type: integer
type: object
snapshotID:
description: SnapshotID is the identifier for the snapshot of the pod
volume.
type: string
startTimestamp:
description: StartTimestamp records the time a backup was started. Separate
from CreationTimestamp, since that value changes on restores. The
server's time is used for StartTimestamps
format: date-time
nullable: true
type: string
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,145 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: podvolumerestores.velero.io
spec:
group: velero.io
names:
kind: PodVolumeRestore
listKind: PodVolumeRestoreList
plural: podvolumerestores
singular: podvolumerestore
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: PodVolumeRestoreSpec is the specification for a PodVolumeRestore.
properties:
backupStorageLocation:
description: BackupStorageLocation is the name of the backup storage
location where the restic repository is stored.
type: string
pod:
description: Pod is a reference to the pod containing the volume to
be restored.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of an
entire object, this string should contain a valid JSON/Go field
access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen only
to have some well-defined way of referencing a part of an object.
TODO: this design is not final and this field is subject to change
in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference is
made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
repoIdentifier:
description: RepoIdentifier is the restic repository identifier.
type: string
snapshotID:
description: SnapshotID is the ID of the volume snapshot to be restored.
type: string
volume:
description: Volume is the name of the volume within the Pod to be restored.
type: string
required:
- backupStorageLocation
- pod
- repoIdentifier
- snapshotID
- volume
type: object
status:
description: PodVolumeRestoreStatus is the current status of a PodVolumeRestore.
properties:
completionTimestamp:
description: CompletionTimestamp records the time a restore was completed.
Completion time is recorded even on failed restores. The server's
time is used for CompletionTimestamps
format: date-time
nullable: true
type: string
message:
description: Message is a message about the pod volume restore's status.
type: string
phase:
description: Phase is the current state of the PodVolumeRestore.
enum:
- New
- InProgress
- Completed
- Failed
type: string
progress:
description: Progress holds the total number of bytes of the snapshot
and the current number of restored bytes. This can be used to display
progress information about the restore operation.
properties:
bytesDone:
format: int64
type: integer
totalBytes:
format: int64
type: integer
type: object
startTimestamp:
description: StartTimestamp records the time a restore was started.
The server's time is used for StartTimestamps
format: date-time
nullable: true
type: string
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,89 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: resticrepositories.velero.io
spec:
group: velero.io
names:
kind: ResticRepository
listKind: ResticRepositoryList
plural: resticrepositories
singular: resticrepository
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ResticRepositorySpec is the specification for a ResticRepository.
properties:
backupStorageLocation:
description: BackupStorageLocation is the name of the BackupStorageLocation
that should contain this repository.
type: string
maintenanceFrequency:
description: MaintenanceFrequency is how often maintenance should be
run.
type: string
resticIdentifier:
description: ResticIdentifier is the full restic-compatible string for
identifying this repository.
type: string
volumeNamespace:
description: VolumeNamespace is the namespace this restic repository
contains pod volume backups for.
type: string
required:
- backupStorageLocation
- maintenanceFrequency
- resticIdentifier
- volumeNamespace
type: object
status:
description: ResticRepositoryStatus is the current status of a ResticRepository.
properties:
lastMaintenanceTime:
description: LastMaintenanceTime is the last time maintenance was run.
format: date-time
nullable: true
type: string
message:
description: Message is a message about the current status of the ResticRepository.
type: string
phase:
description: Phase is the current state of the ResticRepository.
enum:
- New
- Ready
- NotReady
type: string
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

File diff suppressed because it is too large Load Diff

View File

@@ -1,401 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: schedules.velero.io
spec:
group: velero.io
names:
kind: Schedule
listKind: ScheduleList
plural: schedules
singular: schedule
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
description: Schedule is a Velero resource that represents a pre-scheduled or
periodic Backup that should be run.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ScheduleSpec defines the specification for a Velero schedule
properties:
schedule:
description: Schedule is a Cron expression defining when to run the
Backup.
type: string
template:
description: Template is the definition of the Backup to be run on the
provided schedule
properties:
defaultVolumesToRestic:
description: DefaultVolumesToRestic specifies whether restic should
be used to take a backup of all pod volumes by default.
type: boolean
excludedNamespaces:
description: ExcludedNamespaces contains a list of namespaces that
are not included in the backup.
items:
type: string
nullable: true
type: array
excludedResources:
description: ExcludedResources is a slice of resource names that
are not included in the backup.
items:
type: string
nullable: true
type: array
hooks:
description: Hooks represent custom behaviors that should be executed
at different phases of the backup.
properties:
resources:
description: Resources are hooks that should be executed when
backing up individual instances of a resource.
items:
description: BackupResourceHookSpec defines one or more BackupResourceHooks
that should be executed based on the rules defined for namespaces,
resources, and label selector.
properties:
excludedNamespaces:
description: ExcludedNamespaces specifies the namespaces
to which this hook spec does not apply.
items:
type: string
nullable: true
type: array
excludedResources:
description: ExcludedResources specifies the resources
to which this hook spec does not apply.
items:
type: string
nullable: true
type: array
includedNamespaces:
description: IncludedNamespaces specifies the namespaces
to which this hook spec applies. If empty, it applies
to all namespaces.
items:
type: string
nullable: true
type: array
includedResources:
description: IncludedResources specifies the resources
to which this hook spec applies. If empty, it applies
to all resources.
items:
type: string
nullable: true
type: array
labelSelector:
description: LabelSelector, if specified, filters the
resources to which this hook spec applies.
nullable: true
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In,
NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values
array must be non-empty. If the operator is
Exists or DoesNotExist, the values array must
be empty. This array is replaced during a
strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field
is "key", the operator is "In", and the values array
contains only "value". The requirements are ANDed.
type: object
type: object
name:
description: Name is the name of this hook.
type: string
post:
description: PostHooks is a list of BackupResourceHooks
to execute after storing the item in the backup. These
are executed after all "additional items" from item
actions are processed.
items:
description: BackupResourceHook defines a hook for a
resource.
properties:
exec:
description: Exec defines an exec hook.
properties:
command:
description: Command is the command and arguments
to execute.
items:
type: string
minItems: 1
type: array
container:
description: Container is the container in the
pod where the command should be executed.
If not specified, the pod's first container
is used.
type: string
onError:
description: OnError specifies how Velero should
behave if it encounters an error executing
this hook.
enum:
- Continue
- Fail
type: string
timeout:
description: Timeout defines the maximum amount
of time Velero should wait for the hook to
complete before considering the execution
a failure.
type: string
required:
- command
type: object
required:
- exec
type: object
type: array
pre:
description: PreHooks is a list of BackupResourceHooks
to execute prior to storing the item in the backup.
These are executed before any "additional items" from
item actions are processed.
items:
description: BackupResourceHook defines a hook for a
resource.
properties:
exec:
description: Exec defines an exec hook.
properties:
command:
description: Command is the command and arguments
to execute.
items:
type: string
minItems: 1
type: array
container:
description: Container is the container in the
pod where the command should be executed.
If not specified, the pod's first container
is used.
type: string
onError:
description: OnError specifies how Velero should
behave if it encounters an error executing
this hook.
enum:
- Continue
- Fail
type: string
timeout:
description: Timeout defines the maximum amount
of time Velero should wait for the hook to
complete before considering the execution
a failure.
type: string
required:
- command
type: object
required:
- exec
type: object
type: array
required:
- name
type: object
nullable: true
type: array
type: object
includeClusterResources:
description: IncludeClusterResources specifies whether cluster-scoped
resources should be included for consideration in the backup.
nullable: true
type: boolean
includedNamespaces:
description: IncludedNamespaces is a slice of namespace names to
include objects from. If empty, all namespaces are included.
items:
type: string
nullable: true
type: array
includedResources:
description: IncludedResources is a slice of resource names to include
in the backup. If empty, all resources are included.
items:
type: string
nullable: true
type: array
labelSelector:
description: LabelSelector is a metav1.LabelSelector to filter with
when adding individual objects to the backup. If empty or nil,
all objects are included. Optional.
nullable: true
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the
key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a
strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
type: object
type: object
metadata:
properties:
labels:
additionalProperties:
type: string
type: object
type: object
orderedResources:
additionalProperties:
type: string
description: OrderedResources specifies the backup order of resources
of specific Kind. The map key is the Kind name and value is a
list of resource names separated by commas. Each resource name
has format "namespace/resourcename". For cluster resources, simply
use "resourcename".
nullable: true
type: object
snapshotVolumes:
description: SnapshotVolumes specifies whether to take cloud snapshots
of any PV's referenced in the set of objects included in the Backup.
nullable: true
type: boolean
storageLocation:
description: StorageLocation is a string containing the name of
a BackupStorageLocation where the backup should be stored.
type: string
ttl:
description: TTL is a time.Duration-parseable string describing
how long the Backup should be retained for.
type: string
volumeSnapshotLocations:
description: VolumeSnapshotLocations is a list containing names
of VolumeSnapshotLocations associated with this backup.
items:
type: string
type: array
type: object
useOwnerReferencesInBackup:
description: UseOwnerReferencesBackup specifies whether to use OwnerReferences
on backups created by this Schedule.
nullable: true
type: boolean
required:
- schedule
- template
type: object
status:
description: ScheduleStatus captures the current state of a Velero schedule
properties:
lastBackup:
description: LastBackup is the last time a Backup was run for this Schedule
schedule
format: date-time
nullable: true
type: string
phase:
description: Phase is the current phase of the Schedule
enum:
- New
- Enabled
- FailedValidation
type: string
validationErrors:
description: ValidationErrors is a slice of all validation errors (if
applicable)
items:
type: string
type: array
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,89 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: serverstatusrequests.velero.io
spec:
group: velero.io
names:
kind: ServerStatusRequest
listKind: ServerStatusRequestList
plural: serverstatusrequests
shortNames:
- ssr
singular: serverstatusrequest
preserveUnknownFields: false
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: ServerStatusRequest is a request to access current status information
about the Velero server.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ServerStatusRequestSpec is the specification for a ServerStatusRequest.
type: object
status:
description: ServerStatusRequestStatus is the current status of a ServerStatusRequest.
properties:
phase:
description: Phase is the current lifecycle phase of the ServerStatusRequest.
enum:
- New
- Processed
type: string
plugins:
description: Plugins list information about the plugins running on the
Velero server
items:
description: PluginInfo contains attributes of a Velero plugin
properties:
kind:
type: string
name:
type: string
required:
- kind
- name
type: object
nullable: true
type: array
processedTimestamp:
description: ProcessedTimestamp is when the ServerStatusRequest was
processed by the ServerStatusRequestController.
format: date-time
nullable: true
type: string
serverVersion:
description: ServerVersion is the Velero server version.
type: string
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -1,74 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: volumesnapshotlocations.velero.io
spec:
group: velero.io
names:
kind: VolumeSnapshotLocation
listKind: VolumeSnapshotLocationList
plural: volumesnapshotlocations
singular: volumesnapshotlocation
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
description: VolumeSnapshotLocation is a location where Velero stores volume
snapshots.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: VolumeSnapshotLocationSpec defines the specification for a
Velero VolumeSnapshotLocation.
properties:
config:
additionalProperties:
type: string
description: Config is for provider-specific configuration fields.
type: object
provider:
description: Provider is the provider of the volume storage.
type: string
required:
- provider
type: object
status:
description: VolumeSnapshotLocationStatus describes the current status of
a Velero VolumeSnapshotLocation.
properties:
phase:
description: VolumeSnapshotLocationPhase is the lifecycle phase of a
Velero VolumeSnapshotLocation.
enum:
- Available
- Unavailable
type: string
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,176 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: datadownloads.velero.io
spec:
group: velero.io
names:
kind: DataDownload
listKind: DataDownloadList
plural: datadownloads
singular: datadownload
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: DataDownload status such as New/InProgress
jsonPath: .status.phase
name: Status
type: string
- description: Time duration since this DataDownload was started
jsonPath: .status.startTimestamp
name: Started
type: date
- description: Completed bytes
format: int64
jsonPath: .status.progress.bytesDone
name: Bytes Done
type: integer
- description: Total bytes
format: int64
jsonPath: .status.progress.totalBytes
name: Total Bytes
type: integer
- description: Name of the Backup Storage Location where the backup data is stored
jsonPath: .spec.backupStorageLocation
name: Storage Location
type: string
- description: Time duration since this DataDownload was created
jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Name of the node where the DataDownload is processed
jsonPath: .status.node
name: Node
type: string
name: v2alpha1
schema:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: DataDownloadSpec is the specification for a DataDownload.
properties:
backupStorageLocation:
description: BackupStorageLocation is the name of the backup storage
location where the backup repository is stored.
type: string
cancel:
description: Cancel indicates request to cancel the ongoing DataDownload.
It can be set when the DataDownload is in InProgress phase
type: boolean
dataMoverConfig:
additionalProperties:
type: string
description: DataMoverConfig is for data-mover-specific configuration
fields.
type: object
datamover:
description: DataMover specifies the data mover to be used by the
backup. If DataMover is "" or "velero", the built-in data mover
will be used.
type: string
operationTimeout:
description: OperationTimeout specifies the time used to wait internal
operations, before returning error as timeout.
type: string
snapshotID:
description: SnapshotID is the ID of the Velero backup snapshot to
be restored from.
type: string
sourceNamespace:
description: SourceNamespace is the original namespace where the volume
is backed up from. It may be different from SourcePVC's namespace
if namespace is remapped during restore.
type: string
targetVolume:
description: TargetVolume is the information of the target PVC and
PV.
properties:
namespace:
description: Namespace is the target namespace
type: string
pv:
description: PV is the name of the target PV that is created by
Velero restore
type: string
pvc:
description: PVC is the name of the target PVC that is created
by Velero restore
type: string
required:
- namespace
- pv
- pvc
type: object
required:
- backupStorageLocation
- operationTimeout
- snapshotID
- sourceNamespace
- targetVolume
type: object
status:
description: DataDownloadStatus is the current status of a DataDownload.
properties:
completionTimestamp:
description: CompletionTimestamp records the time a restore was completed.
Completion time is recorded even on failed restores. The server's
time is used for CompletionTimestamps
format: date-time
nullable: true
type: string
message:
description: Message is a message about the DataDownload's status.
type: string
node:
description: Node is name of the node where the DataDownload is processed.
type: string
phase:
description: Phase is the current state of the DataDownload.
enum:
- New
- Accepted
- Prepared
- InProgress
- Canceling
- Canceled
- Completed
- Failed
type: string
progress:
description: Progress holds the total number of bytes of the snapshot
and the current number of restored bytes. This can be used to display
progress information about the restore operation.
properties:
bytesDone:
format: int64
type: integer
totalBytes:
format: int64
type: integer
type: object
startTimestamp:
description: StartTimestamp records the time a restore was started.
The server's time is used for StartTimestamps
format: date-time
nullable: true
type: string
type: object
type: object
served: true
storage: true
subresources: {}

View File

@@ -0,0 +1,200 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: datauploads.velero.io
spec:
group: velero.io
names:
kind: DataUpload
listKind: DataUploadList
plural: datauploads
singular: dataupload
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: DataUpload status such as New/InProgress
jsonPath: .status.phase
name: Status
type: string
- description: Time duration since this DataUpload was started
jsonPath: .status.startTimestamp
name: Started
type: date
- description: Completed bytes
format: int64
jsonPath: .status.progress.bytesDone
name: Bytes Done
type: integer
- description: Total bytes
format: int64
jsonPath: .status.progress.totalBytes
name: Total Bytes
type: integer
- description: Name of the Backup Storage Location where this backup should be
stored
jsonPath: .spec.backupStorageLocation
name: Storage Location
type: string
- description: Time duration since this DataUpload was created
jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Name of the node where the DataUpload is processed
jsonPath: .status.node
name: Node
type: string
name: v2alpha1
schema:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: DataUploadSpec is the specification for a DataUpload.
properties:
backupStorageLocation:
description: BackupStorageLocation is the name of the backup storage
location where the backup repository is stored.
type: string
cancel:
description: Cancel indicates request to cancel the ongoing DataUpload.
It can be set when the DataUpload is in InProgress phase
type: boolean
csiSnapshot:
description: If SnapshotType is CSI, CSISnapshot provides the information
of the CSI snapshot.
nullable: true
properties:
snapshotClass:
description: SnapshotClass is the name of the snapshot class that
the volume snapshot is created with
type: string
storageClass:
description: StorageClass is the name of the storage class of
the PVC that the volume snapshot is created from
type: string
volumeSnapshot:
description: VolumeSnapshot is the name of the volume snapshot
to be backed up
type: string
required:
- storageClass
- volumeSnapshot
type: object
dataMoverConfig:
additionalProperties:
type: string
description: DataMoverConfig is for data-mover-specific configuration
fields.
nullable: true
type: object
datamover:
description: DataMover specifies the data mover to be used by the
backup. If DataMover is "" or "velero", the built-in data mover
will be used.
type: string
operationTimeout:
description: OperationTimeout specifies the time used to wait internal
operations, before returning error as timeout.
type: string
snapshotType:
description: SnapshotType is the type of the snapshot to be backed
up.
type: string
sourceNamespace:
description: SourceNamespace is the original namespace where the volume
is backed up from. It is the same namespace for SourcePVC and CSI
namespaced objects.
type: string
sourcePVC:
description: SourcePVC is the name of the PVC which the snapshot is
taken for.
type: string
required:
- backupStorageLocation
- operationTimeout
- snapshotType
- sourceNamespace
- sourcePVC
type: object
status:
description: DataUploadStatus is the current status of a DataUpload.
properties:
completionTimestamp:
description: CompletionTimestamp records the time a backup was completed.
Completion time is recorded even on failed backups. Completion time
is recorded before uploading the backup object. The server's time
is used for CompletionTimestamps
format: date-time
nullable: true
type: string
dataMoverResult:
additionalProperties:
type: string
description: DataMoverResult stores data-mover-specific information
as a result of the DataUpload.
nullable: true
type: object
message:
description: Message is a message about the DataUpload's status.
type: string
node:
description: Node is name of the node where the DataUpload is processed.
type: string
path:
description: Path is the full path of the snapshot volume being backed
up.
type: string
phase:
description: Phase is the current state of the DataUpload.
enum:
- New
- Accepted
- Prepared
- InProgress
- Canceling
- Canceled
- Completed
- Failed
type: string
progress:
description: Progress holds the total number of bytes of the volume
and the current number of backed up bytes. This can be used to display
progress information about the backup operation.
properties:
bytesDone:
format: int64
type: integer
totalBytes:
format: int64
type: integer
type: object
snapshotID:
description: SnapshotID is the identifier for the snapshot in the
backup repository.
type: string
startTimestamp:
description: StartTimestamp records the time a backup was started.
Separate from CreationTimestamp, since that value changes on restores.
The server's time is used for StartTimestamps
format: date-time
nullable: true
type: string
type: object
type: object
served: true
storage: true
subresources: {}

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
// Package crds embeds the controller-tools generated CRD manifests
package crds
//go:generate go run ../../../../hack/crd-gen/v1beta1/main.go
//go:generate go run ../../../../hack/crd-gen/v1/main.go

View File

@@ -1,11 +1,67 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
name: velero-perms
rules:
- apiGroups:
- ""
resources:
- persistentvolumerclaims
verbs:
- get
- apiGroups:
- ""
resources:
- persistentvolumes
verbs:
- get
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- velero.io
resources:
- backuprepositories
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- backuprepositories/status
verbs:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
- backups
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- backups/status
verbs:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
@@ -26,6 +82,66 @@ rules:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
- datadownloads
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- datadownloads/status
verbs:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
- datauploads
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- datauploads/status
verbs:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
- deletebackuprequests
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- deletebackuprequests/status
verbs:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
@@ -46,6 +162,86 @@ rules:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
- podvolumebackups
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- podvolumebackups/status
verbs:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
- podvolumerestores
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- podvolumerestores/status
verbs:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
- restores
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- restores/status
verbs:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
- schedules
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- schedules/status
verbs:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
@@ -66,3 +262,15 @@ rules:
- get
- patch
- update
- apiGroups:
- velero.io
resources:
- volumesnapshotlocations
verbs:
- create
- delete
- get
- list
- patch
- update
- watch

View File

@@ -0,0 +1,40 @@
# Delete Backup and Restic Repo Resources when BSL is Deleted
## Abstract
Issue #2082 requested that with the command `velero backup-location delete <bsl name>` (implemented in Velero 1.6 with #3073), the following will be deleted:
- associated Velero backups (to be clear, these are custom Kubernetes resources called "backups" that are stored in the API server)
- associated Restic repositories (custom Kubernetes resources called "resticrepositories")
This design doc explains how the request will be implemented.
## Background
When a BSL resource is deleted from its Velero namespace, the associated custom Kubernetes resources, backups and Restic repositories, can no longer be used.
It makes sense to clean those resources up when a BSL is deleted.
## Goals
Update the `velero backup-location delete <bsl name>` command to delete associated backup and Restic repository resources in the same Velero namespace.
## Non Goals
[It was suggested](https://github.com/vmware-tanzu/velero/issues/2082#issuecomment-827951311) to fix bug #2697 alongside this issue.
However, I think that should be fixed separately because although it is similar (restore objects are not being deleted), it is also quite different.
One is adding a command feature update (this issue) and the other is a bug fix and each affect different parts of the code base.
## High-Level Design
Update the `velero backup-location delete <bsl name>` command to do the following:
- find in the same Velero namespace from which the BSL was deleted the associated backup resources and Restic repositories, called "backups.velero.io" and "resticrepositories.velero.io" respectively
- delete the resources found
The above logic will be added to [where BSLs are deleted](https://github.com/vmware-tanzu/velero/blob/main/pkg/cmd/cli/backuplocation/delete.go).
## Alternative Considered
I had considered deleting the backup files (the ones in json format and tarballs) in the BSL itself.
However, a standard use case is to back up a cluster and then restore into a new cluster.
Deleting the backup storage location in either location is not expected to remove all of the backups in the backup storage location and should not be done.

View File

@@ -505,9 +505,11 @@ spec:
- BackupResourceList
- RestoreLog
- RestoreResults
- CSIBackupVolumeSnapshots
- CSIBackupVolumeSnapshotContents
type: string
name:
description: Name is the name of the kubernetes resource with
description: Name is the name of the Kubernetes resource with
which the file is associated.
type: string
required:

View File

@@ -57,7 +57,7 @@ spec:
- emptyDir: {}
name: scratch
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:

View File

@@ -5,22 +5,22 @@ metadata:
creationTimestamp: null
labels:
component: velero
name: restic
name: node-agent
namespace: velero
spec:
selector:
matchLabels:
name: restic
name: node-agent
template:
metadata:
creationTimestamp: null
labels:
component: velero
name: restic
name: node-agent
spec:
containers:
- args:
- restic
- node-agent
- server
command:
- /velero
@@ -35,20 +35,23 @@ spec:
fieldPath: metadata.namespace
- name: VELERO_SCRATCH_DIR
value: /scratch
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /credentials/cloud
- name: AWS_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
- name: AZURE_CREDENTIALS_FILE
value: /credentials/cloud
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /credentials/cloud
image: velero/velero:latest
imagePullPolicy: Always
name: restic
name: node-agent
resources: {}
volumeMounts:
- mountPath: /host_pods
mountPropagation: HostToContainer
name: host-pods
- mountPath: /var/lib/kubelet/plugins
mountPropagation: HostToContainer
name: host-plugins
- mountPath: /scratch
name: scratch
- mountPath: /credentials
@@ -60,6 +63,9 @@ spec:
- hostPath:
path: /var/lib/kubelet/pods
name: host-pods
- hostPath:
path: /var/lib/kubelet/plugins
name: host-plugins
- emptyDir: {}
name: scratch
- name: cloud-credentials

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@@ -2,17 +2,17 @@
This document proposes a solution that allows user to specify a backup order for resources of specific resource type.
## Background
During backup process, user may need to back up resources of specific type in some specific order to ensure the resources were backup properly because these resources are related and ordering might be required to preserve the consistency for the apps to recover itself <EFBFBD>from the backup image
During backup process, user may need to back up resources of specific type in some specific order to ensure the resources were backup properly because these resources are related and ordering might be required to preserve the consistency for the apps to recover itself from the backup image
(Ex: primary-secondary database pods in a cluster).
## Goals
- Enable user to specify an order of back up resources belong to specific resource type
- Enable user to specify an order of backup resources belong to specific resource type
## Alternatives Considered
- Use a plugin to backup an resources and all the sub resources. For example use a plugin for StatefulSet and backup pods belong to the StatefulSet in specific order. This plugin solution is not generic and requires plugin for each resource type.
## High-Level Design
User will specify a map of resource type to list resource names (separate by semicolons). Each name will be in the format "namespaceName/resourceName" to enable ordering accross namespaces. Based on this map, the resources of each resource type will be sorted by the order specified in the list of resources. If a resource instance belong to that specific type but its name is not in the order list, then it will be put behind other resources that are in the list.
User will specify a map of resource type to list resource names (separate by semicolons). Each name will be in the format "namespaceName/resourceName" to enable ordering across namespaces. Based on this map, the resources of each resource type will be sorted by the order specified in the list of resources. If a resource instance belong to that specific type but its name is not in the order list, then it will be put behind other resources that are in the list.
### Changes to BackupSpec
Add new field to BackupSpec
@@ -36,5 +36,5 @@ Example:
>velero backup create mybackup --ordered-resources "pod=ns1/pod1,ns1/pod2;persistentvolumeclaim=n2/slavepod,ns2/primarypod"
## Open Issues
- In the CLI, the design proposes to use commas to separate items of a resource type and semicolon to separate key-value pairs. This follows the convention of using commas to separate items in a list (For example: --include-namespaces ns1,ns2). However, the syntax for map in labels and annotations use commas to seperate key-value pairs. So it introduces some inconsistency.
- In the CLI, the design proposes to use commas to separate items of a resource type and semicolon to separate key-value pairs. This follows the convention of using commas to separate items in a list (For example: --include-namespaces ns1,ns2). However, the syntax for map in labels and annotations use commas to separate key-value pairs. So it introduces some inconsistency.
- For pods that managed by Deployment or DaemonSet, this design may not work because the pods' name is randomly generated and if pods are restarted, they would have different names so the Backup operation may not consider the restarted pods in the sorting algorithm. This problem will be addressed when we enhance the design to use regular expression to specify the OrderResources instead of exact match.

View File

@@ -0,0 +1,103 @@
# Design for BackupItemAction v2 API
## Abstract
This design includes the changes to the BackupItemAction (BIA) api design as required by the [Item Action Progress Monitoring](general-progress-monitoring.md) feature.
The BIA v2 interface will have two new methods, and the Execute() return signature will be modified.
If there are any additional BIA API changes that are needed in the same Velero release cycle as this change, those can be added here as well.
## Background
This API change is needed to facilitate long-running plugin actions that may not be complete when the Execute() method returns.
It is an optional feature, so plugins which don't need this feature can simply return an empty operation ID and the new methods can be no-ops.
This will allow long-running plugin actions to continue in the background while Velero moves on to the next plugin, the next item, etc.
## Goals
- Allow for BIA Execute() to optionally initiate a long-running operation and report on operation status.
## Non Goals
- Allowing velero control over when the long-running operation begins.
## High-Level Design
As per the [Plugin Versioning](plugin-versioning.md) design, a new BIAv2 plugin `.proto` file will be created to define the GRPC interface.
v2 go files will also be created in `plugin/clientmgmt/backupitemaction` and `plugin/framework/backupitemaction`, and a new PluginKind will be created.
The velero Backup process will be modified to reference v2 plugins instead of v1 plugins.
An adapter will be created so that any existing BIA v1 plugin can be executed as a v2 plugin when executing a backup.
## Detailed Design
### proto changes (compiled into golang by protoc)
The v2 BackupItemAction.proto will be like the current v1 version with the following changes:
ExecuteResponse gets a new field:
```
message ExecuteResponse {
bytes item = 1;
repeated generated.ResourceIdentifier additionalItems = 2;
string operationID = 3;
repeated generated.ResourceIdentifier itemsToUpdate = 4;
}
```
The BackupItemAction service gets two new rpc methods:
```
service BackupItemAction {
rpc AppliesTo(BackupItemActionAppliesToRequest) returns (BackupItemActionAppliesToResponse);
rpc Execute(ExecuteRequest) returns (ExecuteResponse);
rpc Progress(BackupItemActionProgressRequest) returns (BackupItemActionProgressResponse);
rpc Cancel(BackupItemActionCancelRequest) returns (google.protobuf.Empty);
}
```
To support these new rpc methods, we define new request/response message types:
```
message BackupItemActionProgressRequest {
string plugin = 1;
string operationID = 2;
bytes backup = 3;
}
message BackupItemActionProgressResponse {
generated.OperationProgress progress = 1;
}
message BackupItemActionCancelRequest {
string plugin = 1;
string operationID = 2;
bytes backup = 3;
}
```
One new shared message type will be added, as this will also be needed for v2 RestoreItemAction and VolmeSnapshotter:
```
message OperationProgress {
bool completed = 1;
string err = 2;
int64 nCompleted = 3;
int64 nTotal = 4;
string operationUnits = 5;
string description = 6;
google.protobuf.Timestamp started = 7;
google.protobuf.Timestamp updated = 8;
}
```
In addition to the two new rpc methods added to the BackupItemAction interface, there is also a new `Name()` method. This one is only actually used internally by Velero to get the name that the plugin was registered with, but it still must be defined in a plugin which implements BackupItemActionV2 in order to implement the interface. It doesn't really matter what it returns, though, as this particular method is not delegated to the plugin via RPC calls. The new (and modified) interface methods for `BackupItemAction` are as follows:
```
type BackupItemAction interface {
...
Name() string
...
Execute(item runtime.Unstructured, backup *api.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, string, []velero.ResourceIdentifier, error)
Progress(operationID string, backup *api.Backup) (velero.OperationProgress, error)
Cancel(operationID string, backup *api.Backup) error
...
}
```
A new PluginKind, `BackupItemActionV2`, will be created, and the backup process will be modified to use this plugin kind.
See [Plugin Versioning](plugin-versioning.md) for more details on implementation plans, including v1 adapters, etc.
## Compatibility
The included v1 adapter will allow any existing BackupItemAction plugin to work as expected, with an empty operation ID returned from Execute() and no-op Progress() and Cancel() methods.
## Implementation
This will be implemented during the Velero 1.11 development cycle.

View File

@@ -0,0 +1,402 @@
# Proposal to add resource filters for backup can distinguish whether resource is cluster-scoped or namespace-scoped.
- [Proposal to add resource filters for backup can distinguish whether resource is cluster-scoped or namespace-scoped.](#proposal-to-add-resource-filters-for-backup-can-distinguish-whether-resource-is-cluster-scoped-or-namespace-scoped)
- [Abstract](#abstract)
- [Background](#background)
- [Goals](#goals)
- [Non Goals](#non-goals)
- [High-Level Design](#high-level-design)
- [Parameters Rules](#parameters-rules)
- [Using scenarios:](#using-scenarios)
- [no namespace-scoped resources + some cluster-scoped resources](#no-namespace-scoped-resources--some-cluster-scoped-resources)
- [no namespace-scoped resources + all cluster-scoped resources](#no-namespace-scoped-resources--all-cluster-scoped-resources)
- [some namespace-scoped resources + no cluster-scoped resources](#some-namespace-scoped-resources--no-cluster-scoped-resources)
- [scenario 1](#scenario-1)
- [scenario 2](#scenario-2)
- [scenario 3](#scenario-3)
- [scenario 4](#scenario-4)
- [some namespace-scoped resources + only related cluster-scoped resources](#some-namespace-scoped-resources--only-related-cluster-scoped-resources)
- [scenario 1](#scenario-1-1)
- [scenario 2](#scenario-2-1)
- [scenario 3](#scenario-3-1)
- [some namespace-scoped resources + some additional cluster-scoped resources](#some-namespace-scoped-resources--some-additional-cluster-scoped-resources)
- [scenario 1](#scenario-1-2)
- [scenario 2](#scenario-2-2)
- [scenario 3](#scenario-3-2)
- [scenario 4](#scenario-4-1)
- [some namespace-scoped resources + all cluster-scoped resources](#some-namespace-scoped-resources--all-cluster-scoped-resources)
- [scenario 1](#scenario-1-3)
- [scenario 2](#scenario-2-3)
- [scenario 3](#scenario-3-3)
- [all namespace-scoped resources + no cluster-scoped resources](#all-namespace-scoped-resources--no-cluster-scoped-resources)
- [all namespace-scoped resources + some additional cluster-scoped resources](#all-namespace-scoped-resources--some-additional-cluster-scoped-resources)
- [all namespace-scoped resources + all cluster-scoped resources](#all-namespace-scoped-resources--all-cluster-scoped-resources)
- [describe command change](#describe-command-change)
- [Detailed Design](#detailed-design)
- [Alternatives Considered](#alternatives-considered)
- [Security Considerations](#security-considerations)
- [Compatibility](#compatibility)
- [Implementation](#implementation)
- [Open Issues](#open-issues)
## Abstract
The current filter (IncludedResources/ExcludedResources + IncludeClusterResources flag) is not enough for some special cases, e.g. all namespace-scoped resources + some kind of cluster-scoped resource and all namespace-scoped resources + cluster-scoped resource excludes.
Propose to add a new group of resource filtering parameters, which can distinguish cluster-scoped and namespace-scoped resources.
## Background
There are two sets of resource filters for Velero: `IncludedNamespaces/ExcludedNamespaces` and `IncludedResources/ExcludedResources`.
`IncludedResources` means only including the resource types specified in the parameter. Both cluster-scoped and namespace-scoped resources are handled in this parameter by now.
The k8s resources are separated into cluster-scoped and namespace-scoped.
As a result, it's hard to include all resources in one group and only including specified resource in the other group.
## Goals
- Make Velero can support more complicated namespace-scoped and cluster-scoped resources filtering scenarios in backup.
## Non Goals
- Enrich the resource filtering rules, for example, advanced PV filtering and filtering by resource names.
## High-Level Design
Four new parameters are added into command `velero backup create`: `--include-cluster-scoped-resources`, `--exclude-cluster-scoped-resources`, `--include-namespace-scoped-resources` and `--exclude-namespace-scoped-resources`.
`--include-cluster-scoped-resources` and `--exclude-cluster-scoped-resources` are used to filter cluster-scoped resources included or excluded in backup per resource type.
`--include-namespace-scoped-resources` and `--exclude-namespace-scoped-resources` are used to filter namespace-scoped resources included or excluded in backup per resource type.
Restore and other code pieces also use resource filtering will be handled in future releases.
### Parameters Rules
* `--include-cluster-scoped-resources`, `--include-namespace-scoped-resources`, `--exclude-cluster-scoped-resources` and `--exclude-namespace-scoped-resources` valid value include `*` and comma separated string. Each element of the CSV string should a k8s resource name. The format should be `resource.group`, such as `storageclasses.storage.k8s.io.`.
* `--include-cluster-scoped-resources`, `--include-namespace-scoped-resources`, `--exclude-cluster-scoped-resources` and `--exclude-namespace-scoped-resources` parameters are mutual exclusive with `--include-cluster-resources`, `--include-resources` and `--exclude-resources` parameters. If both sets of parameters are provisioned, validation failure should be returned.
* `--include-cluster-scoped-resources` and `--exclude-cluster-scoped-resources` should only contain cluster-scoped resource type names. If namespace-scoped resource type names are included, they are ignored.
* If there are conflicts between `--include-cluster-scoped-resources` and `--exclude-cluster-scoped-resources` specified resources type lists, `--exclude-cluster-scoped-resources` parameter has higher priority.
* `--include-namespace-scoped-resources` and `--exclude-namespace-scoped-resources` should only contain namespace-scoped resource type names. If cluster-scoped resource type names are included, they are ignored.
* If there are conflicts between `--include-namespace-scoped-resources` and `--exclude-namespace-scoped-resources` specified resources type lists, `--exclude-namespace-scoped-resources` parameter has higher priority.
* If `--include-namespace-scoped-resources` is not present, it means all namespace-scoped resources are included per resource type.
* If both `--include-cluster-scoped-resources` and `--exclude-cluster-scoped-resources` are not present, it means no additional cluster-scoped resource is included per resource type, just as the existing `--include-cluster-resources` parameter not setting value. Cluster-scoped resources are related to the namespace-scoped resources, which means those are returned in the namespace-scoped resources' BackupItemAction's result AdditionalItems array, are still included in backup by default. Taking backing up PVC scenario as an example, PVC is namespace-scoped, PV is cluster-scoped. PVC's BIA will include PVC related PV into backup too.
### Using scenarios:
Please notice, if the scenario give the example of using old filtering parameters (`--include-cluster-resources`, `--include-resources` and `--exclude-resources`), that means the old parameters also work for this case. If old parameters example is not given, that means they don't work for this scenario, only new parameters (`--include-cluster-scoped-resources`, `--include-namespace-scoped-resources`, `--exclude-cluster-scoped-resources` and `--exclude-namespace-scoped-resources`) work.
#### no namespace-scoped resources + some cluster-scoped resources
The following command means backup no namespace-scoped resources and some cluster-scoped resources.
``` bash
velero backup create <backup-name>
--exclude-namespace-scoped-resources=*
--include-cluster-scoped-resources=storageclass
```
#### no namespace-scoped resources + all cluster-scoped resources
The following command means backup no namespace-scoped resources and all cluster-scoped resources.
``` bash
velero backup create <backup-name>
--exclude-namespace-scoped-resources=*
--include-cluster-scoped-resources=*
```
#### some namespace-scoped resources + no cluster-scoped resources
##### scenario 1
The following commands mean backup all resources in namespaces default and kube-system, and no cluster-scoped resources.
Example of new parameters:
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
--exclude-cluster-scoped-resources=*
```
Example of old parameters:
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
--include-cluster-resources=false
```
##### scenario 2
The following commands mean backup PVC, Deployment, Service, Endpoint, Pod and ReplicaSet resources in all namespaces, and no cluster-scoped resources. Although PVC's related PV should be included, due to no cluster-scoped resources are included, so they are ruled out too.
Example of new parameters:
``` bash
velero backup create <backup-name>
--include-namespace-scoped-resources=persistentvolumeclaim,deployment,service,endpoint,pod,replicaset
--exclude-cluster-scope-resources=*
```
Example of old parameters:
``` bash
velero backup create <backup-name>
--include-resources=persistentvolumeclaim,deployment,service,endpoint,pod,replicaset
--include-cluster-resources=false
```
##### scenario 3
The following commands mean backup PVC, Deployment, Service, Endpoint, Pod and ReplicaSet resources in namespace default and kube-system, and no cluster-scoped resources. Although PVC's related PV should be included, due to no cluster-scoped resources are included, so they are ruled out too.
Example of new parameters:
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
--include-namespace-scoped-resources=persistentvolumeclaim,deployment,service,endpoint,pod,replicaset
--exclude-cluster-scope-resources=*
```
Example of old parameters:
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
--include-resources=persistentvolumeclaim,deployment,service,endpoint,pod,replicaset
--include-cluster-resources=false
```
##### scenario 4
The following commands mean backup all resources except Ingress type resources in all namespaces, and no cluster-scoped resources.
Example of new parameters:
``` bash
velero backup create <backup-name>
--exclude-namespace-scoped-resources=ingress
--exclude-cluster-scoped-resources=*
```
Example of old parameters:
``` bash
velero backup create <backup-name>
--exclude-resources=ingress
--include-cluster-resources=false
```
#### some namespace-scoped resources + only related cluster-scoped resources
##### scenario 1
This means backup all resources in namespaces default and kube-system, and related cluster-scoped resources.
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
```
##### scenario 2
This means backup pods and configmaps in namespaces default and kube-system, and related cluster-scoped resources.
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
--include-namespace-scoped-resources=pods,configmaps
```
##### scenario 3
This means backup all resources except Ingress type resources in all namespaces, and related cluster-scoped resources.
Example of new parameters:
``` bash
velero backup create <backup-name>
--exclude-namespace-scoped-resources=ingress
```
Example of old parameters:
``` bash
velero backup create <backup-name>
--exclude-resources=ingress
```
#### some namespace-scoped resources + some additional cluster-scoped resources
##### scenario 1
This means backup all resources in namespace in default, kube-system, and related cluster-scoped resources, plus all StorageClass resources.
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
--include-cluster-scoped-resources=storageclass
```
##### scenario 2
This means backup PVC, Deployment, Service, Endpoint, Pod and ReplicaSet resources in all namespaces, and related cluster-scoped resources, plus all StorageClass resources, and PVC related PV.
``` bash
velero backup create <backup-name>
--include-namespace-scoped-resources=persistentvolumeclaim,deployment,service,endpoint,pod,replicaset
--include-cluster-scoped-resources=storageclass
```
##### scenario 3
This means backup PVC, Deployment, Service, Endpoint, Pod and ReplicaSet resources in default and kube-system namespaces, and related cluster-scoped resources, plus all StorageClass resources, and PVC related PV.
``` bash
velero backup create <backup-name>
--include-namespace-scoped-resources=persistentvolumeclaim,deployment,service,endpoint,pod,replicaset
--include-namespaces=default,kube-system
--include-cluster-scoped-resources=storageclass
```
##### scenario 4
This means backup PVC, Deployment, Service, Endpoint, Pod and ReplicaSet resources in default and kube-system namespaces, and related cluster-scoped resources, plus all cluster-scoped resources except StorageClass type resources.
``` bash
velero backup create <backup-name>
--include-namespace-scoped-resources=persistentvolumeclaim,deployment,service,endpoint,pod,replicaset
--include-namespaces=default,kube-system
--exclude-cluster-scoped-resources=storageclass
```
#### some namespace-scoped resources + all cluster-scoped resources
##### scenario 1
The following commands mean backup all resources in namespace in default, kube-system, and all cluster-scoped resources.
Example of new parameters:
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
--include-cluster-scoped-resources=*
```
Example of old parameters:
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
--include-cluster-resources=true
```
##### scenario 2
This means backup Deployment, Service, Endpoint, Pod and ReplicaSet resources in all namespaces, and all cluster-scoped resources.
``` bash
velero backup create <backup-name>
--include-namespace-scoped-resources=deployment,service,endpoint,pod,replicaset
--include-cluster-scoped-resources=*
```
##### scenario 3
This means backup Deployment, Service, Endpoint, Pod and ReplicaSet resources in default and kube-system namespaces, and all cluster-scoped resources.
``` bash
velero backup create <backup-name>
--include-namespaces=default,kube-system
--include-namespace-scoped-resources=deployment,service,endpoint,pod,replicaset
--include-cluster-scoped-resources=*
```
#### all namespace-scoped resources + no cluster-scoped resources
The following commands all mean backup all namespace-scoped resources and no cluster-scoped resources.
Example of new parameters:
``` bash
velero backup create <backup-name>
--exclude-cluster-scoped-resources=*
```
Example of old parameters:
``` bash
velero backup create <backup-name>
--include-cluster-resources=false
```
#### all namespace-scoped resources + some additional cluster-scoped resources
This command means backup all namespace-scoped resources, and related cluster-scoped resources, plus all PersistentVolume resources.
``` bash
velero backup create <backup-name>
--include-namespaces=*
--include-cluster-scoped-resources=persistentvolume
```
#### all namespace-scoped resources + all cluster-scoped resources
The following commands have the same meaning: backup all namespace-scoped resources, and all cluster-scoped resources.
``` bash
velero backup create <backup-name>
--include-cluster-scoped-resources=*
```
``` bash
velero backup create <backup-name>
--include-cluster-resources=true
```
#### describe command change
In `velero backup describe` command, the four new parameters should be outputted too.
``` bash
velero backup describe <backup-name>
......
Namespaces:
Included: ns2
Excluded: <none>
Resources:
Included cluster-scoped: StorageClass,PersistentVolume
Excluded cluster-scoped: <none>
Included namespace-scoped: default
Excluded namespace-scoped: <none>
......
```
**Note:** `velero restore` command doesn't support those four new parameter in Velero v1.11, but `velero schedule` supports the four new parameters through backup specification.
## Detailed Design
With adding `IncludedNamespaceScopedResources`, `ExcludedNamespaceScopedResources`, `IncludedClusterScopedResources` and `ExcludedClusterScopedResources`, the `BackupSpec` looks like:
``` go
type BackupSpec struct {
......
// IncludedResources is a slice of resource names to include
// in the backup. If empty, all resources are included.
// +optional
// +nullable
IncludedResources []string `json:"includedResources,omitempty"`
// ExcludedResources is a slice of resource names that are not
// included in the backup.
// +optional
// +nullable
ExcludedResources []string `json:"excludedResources,omitempty"`
// IncludeClusterResources specifies whether cluster-scoped resources
// should be included for consideration in the backup.
// +optional
// +nullable
IncludeClusterResources *bool `json:"includeClusterResources,omitempty"`
// IncludedClusterScopedResources is a slice of cluster-scoped
// resource type names to include in the backup.
// If set to "*", all cluster scope resource types are included.
// The default value is empty, which means only related cluster
// scope resources are included.
// +optional
// +nullable
IncludedClusterScopedResources []string `json:"includedClusterScopedResources,omitempty"`
// ExcludedClusterScopedResources is a slice of cluster-scoped
// resource type names to exclude from the backup.
// If set to "*", all cluster scope resource types are excluded.
// +optional
// +nullable
ExcludedClusterScopedResources []string `json:"excludedClusterScopedResources,omitempty"`
// IncludedNamespaceScopedResources is a slice of namespace-scoped
// resource type names to include in the backup.
// The default value is "*".
// +optional
// +nullable
IncludedNamespaceScopedResources []string `json:"includedNamespaceScopedResources,omitempty"`
// ExcludedNamespaceScopedResources is a slice of namespace-scoped
// resource type names to exclude from the backup.
// If set to "*", all namespace scope resource types are excluded.
// +optional
// +nullable
ExcludedNamespaceScopedResources []string `json:"excludedNamespaceScopedResources,omitempty"`
......
}
```
## Alternatives Considered
Proposal from Jibu Data [Issue 5120](https://github.com/vmware-tanzu/velero/issues/5120#issue-1304534563)
## Security Considerations
No security impact.
## Compatibility
The four new parameters cannot be mixed with existing resource filter parameters: `IncludedResources`, `ExcludedResources` and `IncludeClusterResources`.
If the new parameters and old parameters both appears in command line, or are specified in backup spec, the command line and the backup should fail.
## Implementation
This change should be included into Velero v1.11.
New parameters will coexist with `IncludedResources`, `ExcludedResources` and `IncludeClusterResources`.
Plan to deprecate `IncludedResources`, `ExcludedResources` and `IncludeClusterResources` in future releases, but also open to the community's feedback.
## Open Issues
`LabelSelector/OrLabelSelectors` apply to namespace-scoped resources.
It may be reasonable to make them also working on cluster-scoped resources.
An issue is created to trace this topic [resource label selector not work for cluster-scoped resources](https://github.com/vmware-tanzu/velero/issues/5787)

View File

@@ -304,8 +304,8 @@ Without these objects, the provider-level snapshots cannot be located in order t
[1]: https://kubernetes.io/blog/2018/10/09/introducing-volume-snapshot-alpha-for-kubernetes/
[2]: https://github.com/kubernetes-csi/external-snapshotter/blob/master/pkg/apis/volumesnapshot/v1alpha1/types.go#L41
[3]: https://github.com/kubernetes-csi/external-snapshotter/blob/master/pkg/apis/volumesnapshot/v1alpha1/types.go#L161
[2]: https://github.com/kubernetes-csi/external-snapshotter/blob/master/client/apis/volumesnapshot/v1/types.go#L42
[3]: https://github.com/kubernetes-csi/external-snapshotter/blob/master/client/apis/volumesnapshot/v1/types.go#L262
[4]: https://github.com/heptio/velero/blob/main/pkg/volume/snapshot.go#L21
[5]: https://github.com/heptio/velero/blob/main/pkg/apis/velero/v1/pod_volume_backup.go#L88
[6]: https://github.com/heptio/velero-csi-plugin/

View File

@@ -175,7 +175,7 @@ If there are one or more, download the backup tarball from backup storage, untar
## Alternatives Considered
Another proposal for higher level `DeleteItemActions` was initially included, which would require implementors to individually download the backup tarball themselves.
Another proposal for higher level `DeleteItemActions` was initially included, which would require implementers to individually download the backup tarball themselves.
While this may be useful long term, it is not a good fit for the current goals as each plugin would be re-implementing a lot of boilerplate.
See the deletion-plugins.md file for this alternative proposal in more detail.

View File

@@ -0,0 +1,262 @@
# Add support for `ExistingResourcePolicy` to restore API
## Abstract
Velero currently does not support any restore policy on Kubernetes resources that are already present in-cluster. Velero skips over the restore of the resource if it already exists in the namespace/cluster irrespective of whether the resource present in the restore is the same or different from the one present on the cluster. It is desired that Velero gives the option to the user to decide whether or not the resource in backup should overwrite the one present in the cluster.
## Background
As of Today, Velero will skip over the restoration of resources that already exist in the cluster. The current workflow followed by Velero is (Using a `service` that is backed up for example):
- Velero tries to attempt restore of the `service`
- Fetches the `service` from the cluster
- If the `service` exists then:
- Checks whether the `service` instance in the cluster is equal to the `service` instance present in backup
- If not equal then skips the restore of the `service` and adds a restore warning (except for [ServiceAccount objects](https://github.com/vmware-tanzu/velero/blob/574baeb3c920f97b47985ec3957debdc70bcd5f8/pkg/restore/restore.go#L1246))
- If equal then skips the restore of the `service` and mentions that the restore of resource `service` is skipped in logs
It is desired to add the functionality to specify whether or not to overwrite the instance of resource `service` in cluster with the one present in backup during the restore process.
Related issue: https://github.com/vmware-tanzu/velero/issues/4066
## Goals
- Add support for `ExistingResourcePolicy` to restore API for Kubernetes resources.
## Non Goals
- Change existing restore workflow for `ServiceAccount` objects
- Add support for `ExistingResourcePolicy` as `recreate` for Kubernetes resources. (Future scope feature)
## Unrelated Proposals (Completely different functionalities than the one proposed in the design)
- Add support for `ExistingResourcePolicy` to restore API for Non-Kubernetes resources.
- Add support for `ExistingResourcePolicy` to restore API for `PersistentVolume` data.
### Use-cases/Scenarios
### A. Production Cluster - Backup Cluster:
Let's say you have a Backup Cluster which is identical to the Production Cluster. After some operations/usage/time the Production Cluster had changed itself, there might be new deployments, some secrets might have been updated. Now, this means that the Backup cluster will no longer be identical to the Production Cluster. In order to keep the Backup Cluster up to date/identical to the Production Cluster with respect to Kubernetes resources except PV data we would like to use Velero for scheduling new backups which would in turn help us update the Backup Cluster via Velero restore.
Reference: https://github.com/vmware-tanzu/velero/issues/4066#issuecomment-954320686
### B. Help identify resource delta:
Here delta resources mean the resources restored by a previous backup, but they are no longer in the latest backup. Let's follow a sequence of steps to understand this scenario:
- Consider there are 2 clusters, Cluster A, which has 3 resources - P1, P2 and P3.
- Create a Backup1 from Cluster A which has P1, P2 and P3.
- Perform restore on a new Cluster B using Backup1.
- Now, Lets say in Cluster A resource P1 gets deleted and resource P2 gets updated.
- Create a new Backup2 with the new state of Cluster A, keep in mind Backup1 has P1, P2 and P3 while Backup2 has P2' and P3.
- So the Delta here is (|Cluster B - Backup2|), Delete P1 and Update P2.
- During Restore time we would want the Restore to help us identify this resource delta.
Reference: https://github.com/vmware-tanzu/velero/pull/4613#issuecomment-1027260446
## High-Level Design
### Approach 1: Add a new spec field `existingResourcePolicy` to the Restore API
In this approach we do *not* change existing velero behavior. If the resource to restore in cluster is equal to the one backed up then do nothing following current Velero behavior. For resources that already exist in the cluster that are not equal to the resource in the backup (other than Service Accounts). We add a new optional spec field `existingResourcePolicy` which can have the following values:
1. `none`: This is the existing behavior, if Velero encounters a resource that already exists in the cluster, we simply
skip restoration.
2. `update`: This option would provide the following behavior.
- Unchanged resources: Velero would update the backup/restore labels on the unchanged resources, if labels patch fails Velero adds a restore error.
- Changed resources: Velero will first try to patch the changed resource, Now if the patch:
- succeeds: Then the in-cluster resource gets updated with the labels as well as the resource diff
- fails: Velero adds a restore warning and tries to just update the backup/restore labels on the resource, if the labels patch also fails then we add restore error.
3. `recreate`: If resource already exists, then Velero will delete it and recreate the resource.
*Note:* The `recreate` option is a non-goal for this enhancement proposal, but it is considered as a future scope.
Another thing to highlight is that Velero will not be deleting any resources in any of the policy options proposed in
this design but Velero will patch the resources in `update` policy option.
Example:
A. The following Restore will execute the `existingResourcePolicy` restore type `none` for the `services` and `deployments` present in the `velero-protection` namespace.
```
Kind: Restore
includeNamespaces: velero-protection
includeResources:
- services
- deployments
existingResourcePolicy: none
```
B. The following Restore will execute the `existingResourcePolicy` restore type `update` for the `secrets` and `daemonsets` present in the `gdpr-application` namespace.
```
Kind: Restore
includeNamespaces: gdpr-application
includeResources:
- secrets
- daemonsets
existingResourcePolicy: update
```
### Approach 2: Add a new spec field `existingResourcePolicyConfig` to the Restore API
In this approach we give user the ability to specify which resources are to be included for a particular kind of force update behaviour, essentially a more granular approach where in the user is able to specify a resource:behaviour mapping. It would look like:
`existingResourcePolicyConfig`:
- `patch:`
- `includedResources:` [ ]string
- `recreate:`
- `includedResources:` [ ]string
*Note:*
- There is no `none` behaviour in this approach as that would conform to the current/default Velero restore behaviour.
- The `recreate` option is a non-goal for this enhancement proposal, but it is considered as a future scope.
Example:
A. The following Restore will execute the restore type `patch` and apply the `existingResourcePolicyConfig` for `secrets` and `daemonsets` present in the `inventory-app` namespace.
```
Kind: Restore
includeNamespaces: inventory-app
existingResourcePolicyConfig:
patch:
includedResources
- secrets
- daemonsets
```
### Approach 3: Combination of Approach 1 and Approach 2
Now, this approach is somewhat a combination of the aforementioned approaches. Here we propose addition of two spec fields to the Restore API - `existingResourceDefaultPolicy` and `existingResourcePolicyOverrides`. As the names suggest ,the idea being that `existingResourceDefaultPolicy` would describe the default velero behaviour for this restore and `existingResourcePolicyOverrides` would override the default policy explicitly for some resources.
Example:
A. The following Restore will execute the restore type `patch` as the `existingResourceDefaultPolicy` but will override the default policy for `secrets` using the `existingResourcePolicyOverrides` spec as `none`.
```
Kind: Restore
includeNamespaces: inventory-app
existingResourceDefaultPolicy: patch
existingResourcePolicyOverrides:
none:
includedResources
- secrets
```
## Detailed Design
### Approach 1: Add a new spec field `existingResourcePolicy` to the Restore API
The `existingResourcePolicy` spec field will be an `PolicyType` type field.
Restore API:
```
type RestoreSpec struct {
.
.
.
// ExistingResourcePolicy specifies the restore behaviour for the Kubernetes resource to be restored
// +optional
ExistingResourcePolicy PolicyType
}
```
PolicyType:
```
type PolicyType string
const PolicyTypeNone PolicyType = "none"
const PolicyTypePatch PolicyType = "update"
```
### Approach 2: Add a new spec field `existingResourcePolicyConfig` to the Restore API
The `existingResourcePolicyConfig` will be a spec of type `PolicyConfiguration` which gets added to the Restore API.
Restore API:
```
type RestoreSpec struct {
.
.
.
// ExistingResourcePolicyConfig specifies the restore behaviour for a particular/list of Kubernetes resource(s) to be restored
// +optional
ExistingResourcePolicyConfig []PolicyConfiguration
}
```
PolicyConfiguration:
```
type PolicyConfiguration struct {
PolicyTypeMapping map[PolicyType]ResourceList
}
```
PolicyType:
```
type PolicyType string
const PolicyTypePatch PolicyType = "patch"
const PolicyTypeRecreate PolicyType = "recreate"
```
ResourceList:
```
type ResourceList struct {
IncludedResources []string
}
```
### Approach 3: Combination of Approach 1 and Approach 2
Restore API:
```
type RestoreSpec struct {
.
.
.
// ExistingResourceDefaultPolicy specifies the default restore behaviour for the Kubernetes resource to be restored
// +optional
existingResourceDefaultPolicy PolicyType
// ExistingResourcePolicyOverrides specifies the restore behaviour for a particular/list of Kubernetes resource(s) to be restored
// +optional
existingResourcePolicyOverrides []PolicyConfiguration
}
```
PolicyType:
```
type PolicyType string
const PolicyTypeNone PolicyType = "none"
const PolicyTypePatch PolicyType = "patch"
const PolicyTypeRecreate PolicyType = "recreate"
```
PolicyConfiguration:
```
type PolicyConfiguration struct {
PolicyTypeMapping map[PolicyType]ResourceList
}
```
ResourceList:
```
type ResourceList struct {
IncludedResources []string
}
```
The restore workflow changes will be done [here](https://github.com/vmware-tanzu/velero/blob/b40bbda2d62af2f35d1406b9af4d387d4b396839/pkg/restore/restore.go#L1245)
### CLI changes for Approach 1
We would introduce a new CLI flag called `existing-resource-policy` of string type. This flag would be used to accept the
policy from the user. The velero restore command would look somewhat like this:
```
velero create restore <restore_name> --existing-resource-policy=update
```
Help message `Restore Policy to be used during the restore workflow, can be - none, update`
The CLI changes will go at `pkg/cmd/cli/restore/create.go`
We would also add a validation which checks for invalid policy values provided to this flag.
Restore describer will also be updated to reflect the policy `pkg/cmd/util/output/restore_describer.go`
### Implementation Decision
We have decided to go ahead with the implementation of Approach 1 as:
- It is easier to implement
- It is also easier to scale and leaves room for improvement and the door open to expanding to approach 3
- It also provides an option to preserve the existing velero restore workflow

View File

@@ -0,0 +1,579 @@
# Plugin Progress Monitoring
This is intended as a replacement for the previously-approved Upload Progress Monitoring design
([Upload Progress Monitoring](upload-progress.md)) in order to expand the supported use cases beyond
snapshot uploads to include what was previously called Async Backup/Restore Item Actions. This
updated design should handle the combined set of use cases for those previously separate designs.
Volume snapshotter plugin are used by Velero to take snapshots of persistent volume contents.
Depending on the underlying storage system, those snapshots may be available to use immediately,
they may be uploaded to stable storage internally by the plugin or they may need to be uploaded after
the snapshot has been taken. We would like for Velero to continue on to the next part of the backup as quickly
as possible but we would also like the backup to not be marked as complete until it is a usable backup. We'd also
eventually like to bring the control of upload under the control of Velero and allow the user to make decisions
about the ultimate destination of backup data independent of the storage system they're using.
We would also like any internal or third party Backup or Restore Item Action to have the option of
making use of this same ability to run some external process without blocking the current backup or
restore operation. Beyond Volume Snapshotters, this is also needed for data mover operations on both
backup and restore, and potentially useful for other third party operations -- for example
in-cluster registry image backup or restore could make use of this feature in a third party plugin).
### Glossary
- <b>BIA</b>: BackupItemAction
- <b>RIA</b>: RestoreItemAction
## Examples
- AWS - AWS snapshots return quickly, but are then uploaded in the background and cannot be used until EBS moves
the data into S3 internally.
- vSphere - The vSphere plugin takes a local snapshot and then the vSphere plugin uploads the data to S3. The local
snapshot is usable before the upload completes.
- Restic - Does not go through the volume snapshot path. Restic backups will block Velero progress
until completed. However, with the more generalized approach in the revised design, restic/kopia
backup and restore *could* make use of this framework if their actions are refactored as
Backup/RestoreItemActions.
- Data Movers
- Data movers are asynchronous processes executed inside backup/restore item actions that applies to a specific Kubernetes resources. A common use case for data mover is to backup/restore PVCs whose data we want to move to some form of backup storage outside of using velero kopia/restic implementations.
- Workflow
- User takes velero backup of PVC A
- BIA plugin applies to PVCs with compatible storage driver
- BIA plugin triggers data mover
- Most common use case would be for the plugin action to create a new CR which would
trigger an external controller action
- Another possible use case would be for the plugin to run its own async action in a
goroutine, although this would be less resilient to plugin container restarts.
- BIA plugin returns
- Velero backup process continues
- Main velero backup process monitors running BIA threads via gRPC to determine if process is done and healthy
## Primary changes from the original Upload Progress Monitoring design
The most fundamental change here is that rather than proposing a new special-purpose
SnapshotItemAction, the existing BackupItemAction plugin will be modified to accommodate an optional
snapshot (or other item operation) ID return. The primary reasons for this change are as follows:
1. The intended scope has moved beyond snapshot processing, so it makes sense to support
asynchronous operations in other backup or restore item actions.
2. We expect to have plugin API versioning implemented in Velero 1.10, making it feasible to
implement changes in the existing plugin APIs now.
3. We will need this feature on both backup and restore, meaning that if we took the "new plugin
type" approach, we'd need two new plugin types.
4. Other than the snapshot/operation ID return, the rest of the plugin processing is identical to
Backup/RestoreItemActions. With separate plugin types, we'd have to repeat all of that logic
(including dealing with additional items, etc.) twice.
The other major change is that we will be applying this to both backups and restores, although the
Volume Snapshotter use case only needs this on backup. This means that everything we're doing around
backup phase and workflow will also need to be done for restore.
Then there are various minor changes around terminology to make things more generic. Instead of
"snapshotID", we'll have "operationID" (which for volume snapshotters will be a snapshot
ID).
## Goals
- Enable monitoring of backup/restore item action operations that continue after snapshotting and other operations have completed
- Keep non-usable backups and restores (upload/persistence has not finished, etc.) from appearing as completed
- Make use of plugin API versioning functionality to manage changes to Backup/RestoreItemAction interfaces
- Enable vendors to plug their own data movers into velero using BIA/RIA plugins
## Non-goals
- Today, Velero is unable to recover from an in progress backup when the velero server crashes (pod is deleted). This has an impact on running asynchronous processes, but its not something we intend to solve in this design.
## Models
### Internal configuration and management
In this model, movement of the snapshot to stable storage is under the control of the snapshot
plugin. Decisions about where and when the snapshot gets moved to stable storage are not
directly controlled by Velero. This is the model for the current VolumeSnapshot plugins.
### Velero controlled management
In this model, the snapshot is moved to external storage under the control of Velero. This
enables Velero to move data between storage systems. This also allows backup partners to use
Velero to snapshot data and then move the data into their backup repository.
## Backup and Restore phases
Velero currently has backup/restore phases "InProgress" and "Completed". A backup moves to the
Completed phase when all of the volume snapshots have completed and the Kubernetes metadata has been
written into the object store. However, the actual data movement may be happening in the background
after the backup has been marked "Completed". The backup is not actually a stable backup until the
data has been persisted properly. In some cases (e.g. AWS) the backup cannot be restored from until
the snapshots have been persisted.
Once the snapshots have been taken, however, it is possible for additional backups or restores (as
long as they don't use not-yet-completed backups) to be made without interference. Waiting until
all data has been moved before starting the next backup will slow the progress of the system without
adding any actual benefit to the user.
New backup/restore phases, "WaitingForPluginOperations" and
"WaitingForPluginOperationsPartiallyFailed" will be introduced. When a backup or restore has
entered one of these phases, Velero is free to start another backup/restore. The backup/restore
will remain in the "WaitingForPluginOperations" phase until all BIA/RIA operations have completed
(for example, for a volume snapshotter, until all data has been successfully moved to persistent
storage). The backup/restore will not fail once it reaches this phase, although an error return
from a plugin could cause a backup or restore to move to "PartiallyFailed". If the backup is
deleted (cancelled), the plugins will attempt to delete the snapshots and stop the data movement -
this may not be possible with all storage systems.
In addition, for backups (but not restores), there will also be two additional phases, "Finalizing"
and "FinalizingPartiallyFailed", which will handle any steps required after plugin operations have
all completed. Initially, this will just include adding any required resources to the backup that
might have changed during asynchronous operation execution, although eventually other cleanup
actions could be added to this phase.
### State progression
![image](AsyncActionFSM.png)
### New
When a backup/restore request is initially created, it is in the "New" phase.
The next state is either "InProgress" or "FailedValidation"
### FailedValidation
If the backup/restore request is incorrectly formed, it goes to the "FailedValidation" phase and
terminates
### InProgress
When work on the backup/restore begins, it moves to the "InProgress" phase. It remains in the
"InProgress" phase until all pre/post execution hooks have been executed, all snapshots have been
taken and the Kubernetes metadata and backup/restore info is safely written to the object store
plugin.
In the current implementation, Restic backups will move data during the "InProgress" phase. In the
future, it may be possible to combine a snapshot with a Restic (or equivalent) backup which would
allow for data movement to be handled in the "WaitingForPluginOperations" phase,
The next phase would be "WaitingForPluginOperations" for backups or restores which have unfinished
asynchronous plugin operations and no errors so far, "WaitingForPluginOperationsPartiallyFailed" for
backups or restores which have unfinished asynchronous plugin operations at least one error,
"Completed" for restores with no unfinished asynchronous plugin operations and no errors,
"PartiallyFailed" for restores with no unfinished asynchronous plugin operations and at least one
error, "Finalizing" for backups with no unfinished asynchronous plugin operations and no errors,
"FinalizingPartiallyFailed" for backups with no unfinished asynchronous plugin operations and at
least one error, or "PartiallyFailed". Backups/restores which would have a final phase of
"Completed" or "PartiallyFailed" may move to the "WaitingForPluginOperations" or
"WaitingForPluginOperationsPartiallyFailed" state. A backup/restore which will be marked "Failed"
will go directly to the "Failed" phase. Uploads may continue in the background for snapshots that
were taken by a "Failed" backup/restore, but no progress will not be monitored or updated. If there
are any operations in progress when a backup is moved to the "Failed" phase (although with the
current workflow, that shouldn't happen), Cancel() should be called on these operations. When a
"Failed" backup is deleted, all snapshots will be deleted and at that point any uploads still in
progress should be aborted.
### WaitingForPluginOperations (new)
The "WaitingForPluginOperations" phase signifies that the main part of the backup/restore, including
snapshotting has completed successfully and uploading and any other asynchronous BIA/RIA plugin
operations are continuing. In the event of an error during this phase, the phase will change to
WaitingForPluginOperationsPartiallyFailed. On success, the phase changes to
"Finalizing" for backups and "Completed" for restores. Backups cannot be
restored from when they are in the WaitingForPluginOperations state.
### WaitingForPluginOperationsPartiallyFailed (new)
The "WaitingForPluginOperationsPartiallyFailed" phase signifies that the main part of the
backup/restore, including snapshotting has completed, but there were partial failures either during
the main part or during any async operations, including snapshot uploads. Backups cannot be
restored from when they are in the WaitingForPluginOperationsPartiallyFailed state.
### Finalizing (new)
The "Finalizing" phase signifies that asynchronous backup operations have all completed successfully
and Velero is currently backing up any resources indicated by asynchronous plugins as items to back
up after operations complete. Once this is done, the phase changes to Completed. Backups cannot be
restored from when they are in the Finalizing state.
### FinalizingPartiallyFailed (new)
The "FinalizingPartiallyFailed" phase signifies that, for a backup which had errors during initial
processing or asynchronous plugin operation, asynchronous backup operations have all completed and
Velero is currently backing up any resources indicated by asynchronous plugins as items to back up
after operations complete. Once this is done, the phase changes to PartiallyFailed. Backups cannot
be restored from when they are in the FinalizingPartiallyFailed state.
### Failed
When a backup/restore has had fatal errors it is marked as "Failed" Backups in this state cannot be
restored from.
### Completed
The "Completed" phase signifies that the backup/restore has completed, all data has been transferred
to stable storage (or restored to the cluster) and any backup in this state is ready to be used in a
restore. When the Completed phase has been reached for a backup it is safe to remove any of the
items that were backed up.
### PartiallyFailed
The "PartiallyFailed" phase signifies that the backup/restore has completed and at least part of the
backup/restore is usable. Restoration from a PartiallyFailed backup will not result in a complete
restoration but pieces may be available.
## Workflow
When a Backup or Restore Action is executed, any BackupItemAction, RestoreItemAction, or
VolumeSnapshot plugins will return operation IDs (snapshot IDs or other plugin-specific
identifiers). The plugin should be able to provide status on the progress for the snapshot and
handle cancellation of the operation/upload if the snapshot is deleted. If the plugin is restarted,
the operation ID should remain valid.
When all snapshots have been taken and Kubernetes resources have been persisted to the ObjectStorePlugin
the backup will either have fatal errors or will be at least partially usable.
If the backup/restore has fatal errors it will move to the "Failed" state and finish. If a
backup/restore fails, the upload or other operation will not be cancelled but it will not be
monitored either. For backups in any phase, all snapshots will be deleted when the backup is
deleted. Plugins will cancel any data movement or other operations and remove snapshots and other
associated resources when the VolumeSnapshotter DeleteSnapshot method or DeleteItemAction Execute
method is called.
Velero will poll the plugins for status on the operations when the backup/restore exits the
"InProgress" phase and has no fatal errors.
If any operations are not complete, the backup/restore will move to either WaitingForPluginOperations
or WaitingForPluginOperationsPartiallyFailed or Failed.
Post-snapshot and other operations may take a long time and Velero and its plugins may be restarted
during this time. Once a backup/restore has moved into the WaitingForPluginOperations or
WaitingForPluginOperationsPartiallyFailed phase, another backup/restore may be started.
While in the WaitingForPluginOperations or WaitingForPluginOperationsPartiallyFailed phase, the
snapshots and item actions will be periodically polled. When all of the snapshots and item actions
have reported success, restores will move directly to the Completed or PartiallyFailed phase, and
backups will move to the Finalizing or FinalizingPartiallyFailed phase, depending on whether the
backup/restore was in the WaitingForPluginOperations or WaitingForPluginOperationsPartiallyFailed
phase.
While in the Finalizing or FinalizingPartiallyFailed phase, Velero will update the backup with any
resources indicated by plugins that they must be added to the backup after operations are completed,
and then the backup will move to the Completed or PartiallyFailed phase, depending on whether there
are any backup errors.
The Backup resources will be written to object storage at the time the backup leaves the InProgress
phase, but it will not be synced to other clusters (or usable for restores in the current cluster)
until the backup has entered a final phase: Completed, Failed or PartiallyFailed. During the
Finalizing phases, a the backup resources will be updated with any required resources related to
asynchronous plugins.
## Reconciliation of InProgress backups
InProgress backups will not have a `velero-backup.json` present in the object store. During
reconciliation, backups which do not have a `velero-backup.json` object in the object store will be
ignored.
## Plugin API changes
### OperationProgress struct
type OperationProgress struct {
Completed bool // True when the operation has completed, either successfully or with a failure
Err string // Set when the operation has failed
NCompleted, NTotal int64 // Quantity completed so far and the total quantity associated with the operation in operationUnits
// For data mover and volume snapshotter use cases, this would be in bytes
// On successful completion, completed and total should be the same.
OperationUnits string // Units represented by completed and total -- for data mover and item
// snapshotters, this will usually be bytes.
Description string // Optional description of operation progress
Started, Updated time.Time // When the upload was started and when the last update was seen. Not all
// systems retain when the upload was begun, return Time 0 (time.Unix(0, 0))
// if unknown.
}
### VolumeSnapshotter changes
Two new methods will be added to the VolumeSnapshotter interface:
Progress(snapshotID string) (OperationProgress, error)
Cancel(snapshotID string) (error)
Progress will report the current status of a snapshot upload. This should be callable at
any time after the snapshot has been taken. In the event a plugin is restarted, if the operationID
(snapshot ID) continues to be valid it should be possible to retrieve the progress.
`error` is set if there is an issue retrieving progress. If the snapshot is has encountered an
error during the upload, the error should be returned in OperationProgress and error should be nil.
### BackupItemAction and RestoreItemAction plugin changes
Currently CSI snapshots and the Velero Plugin for vSphere are implemented as BackupItemAction
plugins. While the majority of BackupItemAction plugins do not take snapshots or upload data, this
functionality is useful for any longstanding plugin operation managed by an external
process/controller so we will modify BackupItemAction and RestoreItemAction to optionally return an
operationID in addition to the modified item.
Velero can attempt to cancel an operation by calling the Cancel API call on the BIA/RIA. The plugin
can then take any appropriate action as needed. Cancel will be called for unfinished operations on
backup deletion, and possibly reaching timeout. Cancel is not intended to be used to delete/remove
the results of completed actions and will have no effect on a completed action. Cancel has no return
value apart from the standard Error return, but this should only be used for unexpected
failures. Under normal operations, Cancel will simply return a nil error (and nothing else), whether
or not the plugin is able to cancel the operation.
_AsyncOperationsNotSupportedError_ should only be returned (by Progress) if the
Backup/RestoreItemAction plugin should not be handling the item. If the Backup/RestoreItemAction
plugin should handle the item but, for example, the item/snapshot ID cannot be found to report
progress, Progress will return an InvalidOperationIDError error rather than a populated
OperationProgress struct. If the item action does not start an asynchronous operation, then
operationID will be empty.
Three new methods will be added to the BackupItemAction interface, and the Execute() return signature
will be modified:
// Name returns the name of this BIA. Plugins which implement this interface must defined Name,
// but its content is unimportant, as it won't actually be called via RPC. Velero's plugin infrastructure
// will implement this directly rather than delegating to the RPC plugin in order to return the name
// that the plugin was registered under. The plugins must implement the method to complete the interface.
Name() string
// Execute allows the BackupItemAction to perform arbitrary logic with the item being backed up,
// including mutating the item itself prior to backup. The item (unmodified or modified)
// should be returned, along with an optional slice of ResourceIdentifiers specifying
// additional related items that should be backed up now, an optional operationID for actions which
// initiate asynchronous actions, and a second slice of ResourceIdentifiers specifying related items
// which should be backed up after all asynchronous operations have completed. This last field will be
// ignored if operationID is empty, and should not be filled in unless the resource must be updated in the
// backup after async operations complete (i.e. some of the item's Kubernetes metadata will be updated
// during the asynch operation which will be required during restore)
Execute(item runtime.Unstructured, backup *api.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, string, []velero.ResourceIdentifier, error)
// Progress
Progress(operationID string, backup *api.Backup) (velero.OperationProgress, error)
// Cancel
Cancel(operationID string, backup *api.Backup) error
Three new methods will be added to the RestoreItemAction interface, and the
RestoreItemActionExecuteOutput struct will be modified:
// Name returns the name of this RIA. Plugins which implement this interface must defined Name,
// but its content is unimportant, as it won't actually be called via RPC. Velero's plugin infrastructure
// will implement this directly rather than delegating to the RPC plugin in order to return the name
// that the plugin was registered under. The plugins must implement the method to complete the interface.
Name() string
// Execute allows the ItemAction to perform arbitrary logic with the item being restored,
// including mutating the item itself prior to restore. The item (unmodified or modified)
// should be returned, an optional OperationID, along with an optional slice of ResourceIdentifiers
// specifying additional related items that should be restored, a warning (which will be
// logged but will not prevent the item from being restored) or error (which will be logged
// and will prevent the item from being restored) if applicable. If OperationID is specified
// then velero will wait for this operation to complete before the restore is marked Completed.
Execute(input *RestoreItemActionExecuteInput) (*RestoreItemActionExecuteOutput, error)
// Progress
Progress(operationID string, restore *api.Restore) (velero.OperationProgress, error)
// Cancel
Cancel(operationID string, restore *api.Restore) error
// RestoreItemActionExecuteOutput contains the output variables for the ItemAction's Execution function.
type RestoreItemActionExecuteOutput struct {
// UpdatedItem is the item being restored mutated by ItemAction.
UpdatedItem runtime.Unstructured
// AdditionalItems is a list of additional related items that should
// be restored.
AdditionalItems []ResourceIdentifier
// SkipRestore tells velero to stop executing further actions
// on this item, and skip the restore step. When this field's
// value is true, AdditionalItems will be ignored.
SkipRestore bool
// OperationID is an identifier which indicates an ongoing asynchronous action which Velero will
// continue to monitor after restoring this item. If left blank, then there is no ongoing operation
OperationID string
}
## Changes in Velero backup format
No changes to the existing format are introduced by this change. As part of the backup workflow changes, a
`<backup-name>-itemoperations.json.gz` file will be added that contains the items and operation IDs
(snapshotIDs) returned by VolumeSnapshotter and BackupItemAction plugins. Also, the creation of the
`velero-backup.json` object will not occur until the backup moves to one of the terminal phases
(_Completed_, _PartiallyFailed_, or _Failed_). Reconciliation should ignore backups that do not
have a `velero-backup.json` object.
The Backup/RestoreItemAction plugin identifier as well as the ItemID and OperationID will be stored
in the `<backup-name>-itemoperations.json.gz`. When checking for progress, this info will be used
to select the appropriate Backup/RestoreItemAction plugin to query for progress. Here's an example
of what a record for a datamover plugin might look like:
```
{
"spec": {
"backupName": "backup-1",
"backupUID": "f8c72709-0f73-46e1-a071-116bc4a76b07",
"backupItemAction": "velero.io/volumesnapshotcontent-backup",
"resourceIdentifier": {
"Group": "snapshot.storage.k8s.io",
"Resource": "VolumeSnapshotContent",
"Namespace": "my-app",
"Name": "my-volume-vsc"
},
"operationID": "<DataMoverBackup objectReference>",
"itemsToUpdate": [
{
"Group": "velero.io",
"Resource": "VolumeSnapshotBackup",
"Namespace": "my-app",
"Name": "vsb-1"
}
]
},
"status": {
"operationPhase": "Completed",
"error": "",
"nCompleted": 12345,
"nTotal": 12345,
"operationUnits": "byte",
"description": "",
"Created": "2022-12-14T12:00:00Z",
"Started": "2022-12-14T12:01:00Z",
"Updated": "2022-12-14T12:11:02Z"
},
}
```
The cluster that is creating the backup will have the Backup resource present and will be able to
manage the backup before the backup completes.
If the Backup resource is removed (e.g. Velero is uninstalled) before a backup completes and writes
its `velero-backup.json` object, the other objects in the object store for the backup will be
effectively orphaned. This can currently happen but the current window is much smaller.
### `<backup-name>-itemoperations.json.gz`
The itemoperations file is similar to the existing `<backup-name>-itemsnapshots.json.gz` Each snapshot taken via
BackupItemAction will have a JSON record in the file. Exact format TBD.
This file will be uploaded to object storage at the end of processing all of the items in the
backup, before the phase moves away from `InProgress`.
## Changes to Velero restores
A `<restore-name>-itemoperations.json.gz` file will be added that contains the items and operation
IDs returned by RestoreItemActions. The format will be the same as the
`<backup-name>-itemoperations.json.gz` generated for backups.
This file will be uploaded to object storage at the end of processing all of the items in the
restore, before the phase moves away from `InProgress`.
## CSI snapshots
For systems such as EBS, a snapshot is not available until the storage system has transferred the
snapshot to stable storage. CSI snapshots expose the _readyToUse_ state that, in the case of EBS,
indicates that the snapshot has been transferred to durable storage and is ready to be used. The
CSI BackupItemAction.Progress method will poll that field and when completed, return completion.
## vSphere plugin
The vSphere Plugin for Velero uploads snapshots to S3 in the background. This is also a
BackupItemAction plugin, it will check the status of the Upload records for the snapshot and return
progress.
## Backup workflow changes
The backup workflow remains the same until we get to the point where the `velero-backup.json` object
is written. At this point, Velero will
run across all of the VolumeSnapshotter/BackupItemAction operations and call the _Progress_ method
on each of them.
If all backup item operations have finished (either successfully or failed), the backup will move to
one of the finalize phases.
If any of the snapshots or backup items are still being processed, the phase of the backup will be
set to the appropriate phase (_WaitingForPluginOperations_ or
_WaitingForPluginOperationsPartiallyFailed_), and the async backup operations controller will
reconcile periodically and call Progress on any unfinished operations. In the event of any of the
progress checks return an error, the phase will move to _WaitingForPluginOperationsPartiallyFailed_.
Once all operations have completed, the backup will be moved to one of the finalize phases, and the
backup finalizer controller will update the the `velero-backup.json`in the object store with any
resources necessary after asynchronous operations are complete and the backup will move to the
appropriate terminal phase.
## Restore workflow changes
The restore workflow remains the same until velero would currently move the backup into one of the
terminal states. At this point, Velero will run across all of the RestoreItemAction operations and
call the _Progress_ method on each of them.
If all restore item operations have finished (either successfully or failed), the restore will be
completed and the restore will move to the appropriate terminal phase and the restore will be
complete.
If any of the restore items are still being processed, the phase of the restore will be set to the
appropriate phase (_WaitingForPluginOperations_ or _WaitingForPluginOperationsPartiallyFailed_), and
the async restore operations controller will reconcile periodically and call Progress on any
unfinished operations. In the event of any of the progress checks return an error, the phase will
move to _WaitingForPluginOperationsPartiallyFailed_. Once all of the operations have completed, the
restore will be moved to the appropriate terminal phase.
## Restart workflow
On restart, the Velero server will scan all Backup/Restore resources. Any Backup/Restore resources
which are in the _InProgress_ phase will be moved to the _Failed_ phase. Any Backup/Restore
resources in the _WaitingForPluginOperations_ or _WaitingForPluginOperationsPartiallyFailed_ phase
will be treated as if they have been requeued and progress checked and the backup/restore will be
requeued or moved to a terminal phase as appropriate.
## Notes on already-merged code which may need updating
Since this design is modifying a previously-approved design, there is some preparation work based on
the earlier upload progress monitoring design that may need modification as a result of these
updates. Here is a list of some of these items:
1. Consts for the "Uploading" and "UploadingPartiallyFailed" phases have already been defined. These
will need to be removed when the "WaitingForPluginOperations" and
"WaitingForPluginOperationsPartiallyFailed" phases are defined.
- https://github.com/vmware-tanzu/velero/pull/3805
1. Remove the ItemSnapshotter plugin APIs (and related code) since the revised design will reuse
VolumeSnapshotter and BackupItemAction plugins.
- https://github.com/vmware-tanzu/velero/pull/4077
- https://github.com/vmware-tanzu/velero/pull/4417
1. UploadProgressFeatureFlag shouldn't be needed anymore. The current design won't really need a
feature flag here -- the new features will be added to V2 of the VolumeSnapshotter,
BackupItemAction, and RestoreItemAction plugins, and it will only be used if there are plugins which
return operation IDs.
- https://github.com/vmware-tanzu/velero/pull/4416
1. Adds <backup-name>-itemsnapshots.gz file to backup (when provided) -- this is still part of the
revised design, so it should stay.
- https://github.com/vmware-tanzu/velero/pull/4429
1. Upload Progress Monitoring and Item Snapshotter basic support: This PR is not yet merged, so
nothing will need to be reverted. While the implementation here will be useful in informing the
implementation of the new design, several things have changed in the design proposal since the PR
was written.
- https://github.com/vmware-tanzu/velero/pull/4467
# Implementation tasks
VolumeSnapshotter new plugin APIs
BackupItemAction new plugin APIs
RestoreItemAction new plugin APIs
New backup phases
New restore phases
Defer uploading `velero-backup.json`
AWS EBS plugin Progress implementation
Operation monitoring
Implementation of `<backup-name>-itemoperations.json.gz` file
Implementation of `<restore-name>-itemoperations.json.gz` file
Restart logic
Change in reconciliation logic to ignore backups/restores that have not completed
CSI plugin BackupItemAction Progress implementation
vSphere plugin BackupItemAction Progress implementation (vSphere plugin team)
# Open Questions
1. Do we need a Cancel operation for VolumeSnapshotter?
- From feedback, I'm thinking we probably don't need it. The only real purpose of Cancel
here is to tell the plugin that Velero won't be waiting anymore, so if there are any
required custom cancellation actions, now would be a good time to perform them. For snapshot
uploads that are already in proress, there's not really anything else to cancel.
2. Should we actually write the backup *before* moving to the WaitingForPluginOperations or
WaitingForPluginOperationsPartiallyFailed phase rather than waiting until all operations
have completed? The operations in question won't affect what gets written to object storage
for the backup, and since we've already written the list of operations we're waiting for to
object storage, writing the backup now would make the process resilient to Velero restart if
it happens during WaitingForPluginOperations or WaitingForPluginOperationsPartiallyFailed

View File

@@ -28,7 +28,7 @@ This document proposes adding _controller-tools_ to the project to automatically
_controller-tools_ works by reading the Go files that contain the API type definitions.
It uses a combination of the struct fields, types, tags and comments to build the OpenAPIv3 schema for the CRDs. The tooling makes some assumptions based on conventions followed in upstream Kubernetes and the ecosystem, which involves some changes to the Velero API type definitions, especially around optional fields.
In order for _controller-tools_ to read the Go files containing Velero API type defintiions, the CRDs need to be generated at build time, as these files are not available at runtime (i.e. the Go files are not accessible by the compiled binary).
In order for _controller-tools_ to read the Go files containing Velero API type definitions, the CRDs need to be generated at build time, as these files are not available at runtime (i.e. the Go files are not accessible by the compiled binary).
These generated CRD manifests (YAML) will then need to be available to the `pkg/install` package for it to include when installing Velero resources.
## Detailed Design

View File

@@ -0,0 +1,324 @@
# Handle backup of volumes by resources filters
## Abstract
Currently, Velero doesn't have one flexible way to handle volumes.
If users want to skip the backup of volumes or only backup some volumes in different namespaces in batch, currently they need to use the opt-in and opt-out approach one by one, or use label-selector but if it has big different labels on each different related pod, which is cumbersome when they have lots of volumes to handle with. it would be convenient if Velero could provide policies to handle the backup of volumes just by `some specific volumes conditions`.
## Background
As of Today, Velero has lots of filters to handle (backup or skip backup) resources including resources filters like `IncludedNamespaces, ExcludedNamespaces`, label selectors like `LabelSelector, OrLabelSelectors`, annotation like `backup.velero.io/must-include-additional-items` etc. But it's not enough flexible to handle volumes, we need one generic way to handle volumes.
## Goals
- Introducing flexible policies to handle volumes, and do not patch any labels or annotations to the pods or volumes.
## Non-Goals
- We only handle volumes for backup and do not support restore.
- Currently, only handles volumes, and does not support other resources.
- Only environment-unrelated and platform-independent general volumes attributes are supported, do not support volumes attributes related to a specific environment.
## Use-cases/Scenarios
### Skip backup volumes by some attributes
Users want to skip PV with the requirements:
- option to skip all PV data
- option to skip specified PV type (RBD, NFS)
- option to skip specified PV size
- option to skip specified storage-class
## High-Level Design
First, Velero will provide the user with one YAML file template and all supported volume policies will be in.
Second, writing your own configuration file by imitating the YAML template, it could be partial volume policies from the template.
Third, create one configmap from your own configuration file, and the configmap should be in Velero install namespace.
Fourth, create a backup with the command `velero backup create --resource-policies-configmap $policiesConfigmap`, which will reference the current backup to your volume policies. At the same time, Velero will validate all volume policies user imported, the backup will fail if the volume policies are not supported or some items could not be parsed.
Fifth, the current backup CR will record the reference of volume policies configmap.
Sixth, Velero first filters volumes by other current supported filters, at last, it will apply the volume policies to the filtered volumes to get the final matched volume to handle.
## Detailed Design
The volume resources policies should contain a list of policies which is the combination of conditions and related `action`, when target volumes meet the conditions, the related `action` will take effection.
Below is the API Design for the user configuration:
### API Design
```go
type VolumeActionType string
const Skip VolumeActionType = "skip"
// Action defined as one action for a specific way of backup
type Action struct {
// Type defined specific type of action, it could be 'file-system-backup', 'volume-snapshot', or 'skip' currently
Type VolumeActionType `yaml:"type"`
// Parameters defined map of parameters when executing a specific action
// +optional
// +nullable
Parameters map[string]interface{} `yaml:"parameters,omitempty"`
}
// VolumePolicy defined policy to conditions to match Volumes and related action to handle matched Volumes
type VolumePolicy struct {
// Conditions defined list of conditions to match Volumes
Conditions map[string]interface{} `yaml:"conditions"`
Action Action `yaml:"action"`
}
// ResourcePolicies currently defined slice of volume policies to handle backup
type ResourcePolicies struct {
Version string `yaml:"version"`
VolumePolicies []VolumePolicy `yaml:"volumePolicies"`
// we may support other resource policies in the future, and they could be added separately
// OtherResourcePolicies: []OtherResourcePolicy
}
```
The policies YAML config file would look like this:
```yaml
version: v1
volumePolicies:
# it's a list and if the input item matches the first policy, the latters will be ignored
# each policy consists of a list of conditions and an action
# each key in the object is one condition, and one policy will apply to resources that meet ALL conditions
- conditions:
# capacity condition matches the volumes whose capacity falls into the range
capacity: "0,100Gi"
csi:
driver: aws.ebs.csi.driver
fsType: ext4
storageClass:
- gp2
- ebs-sc
action:
type: volume-snapshot
parameters:
# optional parameters which are custom-defined parameters when doing an action
volume-snapshot-timeout: "6h"
- conditions:
capacity: "0,100Gi"
storageClass:
- gp2
- ebs-sc
action:
type: file-system-backup
- conditions:
nfs:
server: 192.168.200.90
action:
# type of file-system-backup could be defined a second time
type: file-system-backup
- conditions:
nfs: {}
action:
type: skip
- conditions:
csi:
driver: aws.efs.csi.driver
action:
type: skip
```
### Filter rules
#### VolumePolicies
The whole resource policies consist of groups of volume policies.
For one specific volume policy which is a combination of one action and serval conditions. which means one action and serval conditions are the smallest unit of volume policy.
Volume policies are a list and if the target volumes match the first policy, the latter will be ignored, which would reduce the complexity of matching volumes especially when there are multiple complex volumes policies.
#### Action
`Action` defined one action for a specific way of backup:
- if choosing `Kopia` or `Restic`, the action value would be `file-system-backup`.
- if choosing volume snapshot, the action value would be `volume-snapshot`.
- if choosing skip backup of volume, the action value would be `skip`, and it will skip backup of volume no matter is `file-system-backup` or `volume-snapshot`.
The policies could be extended for later other ways of backup, which means it may have some other `Action` value that will be assigned in the future.
Both `file-system-backup` `volume-snapshot`, and `skip` could be partially or fully configured in the YAML file. And configuration could take effect only for the related action.
#### Conditions
The conditions are serials of volume attributes, the matched Volumes should meet all the volume attributes in one conditions configuration.
##### Supported conditions
In Velero 1.11, we want to support the volume attributes listed below:
- capacity: matching volumes have the capacity that falls within this `capacity` range.
- storageClass: matching volumes those with specified `storageClass`, such as `gp2`, `ebs-sc` in eks.
- matching volumes that used specified volume sources.
##### Parameters
Parameters are optional for one specific action. For example, it could be `csi-snapshot-timeout: 6h` for CSI snapshot.
#### Special rule definitions:
- One single condition in `Conditions` with a specific key and empty value, which means the value matches any value. For example, if the `conditions.nfs` is `{}`, it means if `NFS` is used as `persistentVolumeSource` in Persistent Volume will be skipped no matter what the NFS server or NFS Path is.
- The size of each single filter value should limit to 256 bytes in case of an unfriendly long variable assignment.
- For capacity for PV or size for Volume, the value should include the lower value and upper value concatenated by commas. And it has several combinations below:
- "0,5Gi" or "0Gi,5Gi" which means capacity or size matches from 0 to 5Gi, including value 0 and value 5Gi
- ",5Gi" which is equal to "0,5Gi"
- "5Gi," which means capacity or size matches larger than 5Gi, including value 5Gi
- "5Gi" which is not supported and will be failed in validating configuration.
### Configmap Reference
Currently, resources policies are defined in `BackupSpec` struct, it will be more and more bloated with adding more and more filters which makes the size of `Backup` CR bigger and bigger, so we want to store the resources policies in configmap, and `Backup` CRD reference to current configmap.
the `configmap` user created would be like this:
```yaml
apiVersion: v1
data:
policies.yaml:
----
version: v1
volumePolicies:
- conditions:
capacity: "0,100Gi"
csi:
driver: aws.ebs.csi.driver
fsType: ext4
storageClass:
- gp2
- ebs-sc
action:
type: volume-snapshot
parameters:
volume-snapshot-timeout: "6h"
kind: ConfigMap
metadata:
creationTimestamp: "2023-01-16T14:08:12Z"
name: backup01
namespace: velero
resourceVersion: "17891025"
uid: b73e7f76-fc9e-4e72-8e2e-79db717fe9f1
```
A new variable `resourcePolices` would be added into `BackupSpec`, it's value is assigned with the current resources policy configmap
```yaml
apiVersion: velero.io/v1
kind: Backup
metadata:
name: backup-1
spec:
resourcePolices:
refType: Configmap
ref: backup01
...
```
The configmap only stores those assigned values, not the whole resources policies.
The name of the configmap is `$BackupName`, and it's in Velero install namespace.
#### Resource policies configmap related
The life cycle of resource policies configmap is managed by the user instead of Velero, which could make it more flexible and easy to maintain.
- The resource policies configmap will remain in the cluster until the user deletes it.
- Unlike backup, the resource policies configmap will not sync to the new cluster. So if the user wants to use one resource policies that do not sync to the new cluster, the backup will fail with resource policies not found.
- One resource policies configmap could be used by multiple backups.
- If the backup referenced resource policies configmap is been deleted, it won't affect the already existing backups, but if the user wants to reference the deleted configmap to create one new backup, it will fail with resource policies not found.
#### Versioning
We want to introduce the version field in the YAML data to contain break changes. Therefore, we won't follow a semver paradigm, for example in v1.11 the data look like this:
```yaml
version: v1
volumePolicies:
....
```
Hypothetically, in v1.12 we add new fields like clusterResourcePolicies, the version will remain as v1 b/c this change is backward compatible:
```yaml
version: v1
volumePolicies:
....
clusterResourcePolicies:
....
```
Suppose in v1.13, we have to introduce a break change, at this time we will bump up the version:
```yaml
version: v2
# This is just an example, we should try to avoid break change
volume-policies:
....
```
We only support one version in Velero, so it won't be recognized if backup using a former version of YAML data.
#### Multiple versions supporting
To manage the effort for maintenance, we will only support one version of the data in Velero. Suppose that there is one break change for the YAML data in Velero v1.13, we should bump up the config version to v2, and v2 is only supported in v1.13. For the existing data with version: v1, it should migrate them when the Velero startup, this won't hurt the existing backup schedule CR as it only references the configmap. To make the migration easier, the configmap for such resource filter policies should be labeled manually before Velero startup like this, Velero will migrate the labeled configmap.
We only support migrating from the previous version to the current version in case of complexity in data format conversion, which users could regenerate configmap in the new YAML data version, and it is easier to do version control.
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
labels:
# This label can be optional but if this is not set, the backup will fail after the breaking change and the user will need to update the data manually
velero.io/resource-filter-policies: "true"
name: example
namespace: velero
data:
.....
```
### Display of resources policies
As the resource policies configmap is referenced by backup CR, the policies in configmap are not so intuitive, so we need to integrate policies in configmap to the output of the command `velero backup describe`, and make it more readable.
## Compatibility
Currently, we have these resources filters:
- IncludedNamespaces
- ExcludedNamespaces
- IncludedResources
- ExcludedResources
- LabelSelector
- OrLabelSelectors
- IncludeClusterResources
- UseVolumeSnapshots
- velero.io/exclude-from-backup=true
- backup.velero.io/backup-volumes-excludes
- backup.velero.io/backup-volumes
- backup.velero.io/must-include-additional-items
So it should be careful with the combination of volumes resources policies and the above resources filters.
- When volume resource policies conflict with the above resource filters, we should respect the above resource filters. For example, if the user used the opt-out approach to `backup.velero.io/backup-volumes-excludes` annotation on the pod and also defined include volume in volumes resources filters configuration, we should respect the opt-out approach to skip backup of the volume.
- If volume resource policies conflict with themselves, the first matched policy will be respect.
## Implementation
This implementation should be included in Velero v1.11.0
Currently, in Velero v1.11.0 we only support `Action`
`skip`, and support `file-system-backup` and `volume-snapshot` for the later version. And `Parameters` in `Action` is also not supported in v1.11.0, we will support in a later version.
In Velero 1.11, we supported Conditions and format listed below:
- capacity
```yaml
capacity: "10Gi,100Gi" // match volume has the size between 10Gi and 100Gi
```
- storageClass
```yaml
storageClass: // match volume has the storage class gp2 or ebs-sc
- gp2
- ebs-sc
```
- volume sources (currently only support below format and attributes)
1. Specify the volume source name, the name could be `nfs`, `rbd`, `iscsi`, `csi` etc.
```yaml
nfs : {} // match any volume has nfs volume source
csi : {} // match any volume has csi volume source
```
2. Specify details for the related volume source (currently we only support csi driver filter and nfs server or path filter)
```yaml
csi: // match volume has nfs volume source and using `aws.efs.csi.driver`
driver: aws.efs.csi.driver
nfs: // match volume has nfs volume source and using below server and path
server: 192.168.200.90
path: /mnt/nfs
```
The conditions also could be extended in later versions, such as we could further supporting filtering other volume source detail not only NFS and CSI.
## Alternatives Considered
### Configmap VS CRD
Here we support the user define the YAML config file and storing the resources policies into configmap, also we could define one resource's policies CRD and store policies imported from the user-defined config file in the related CR.
But CRD is more like one kind of resource with status, Kubernetes API Server handles the lifecycle of a CR and handles it in different statuses. Compared to CRD, Configmap is more focused to store data.
## Open Issues
Should we support more than one version of filter policies configmap?

View File

@@ -0,0 +1,161 @@
# Proposal to add support for Resource Modifiers (AKA JSON Substitutions) in Restore Workflow
- [Proposal to add support for Resource Modifiers (AKA JSON Substitutions) in Restore Workflow](#proposal-to-add-support-for-resource-modifiers-aka-json-substitutions-in-restore-workflow)
- [Abstract](#abstract)
- [Goals](#goals)
- [Non Goals](#non-goals)
- [User Stories](#user-stories)
- [Scenario 1](#scenario-1)
- [Scenario 2](#scenario-2)
- [Detailed Design](#detailed-design)
- [Reference in velero API](#reference-in-velero-api)
- [ConfigMap Structure](#configmap-structure)
- [Operations supported by the JSON Patch library:](#operations-supported-by-the-json-patch-library)
- [Advance scenarios](#advance-scenarios)
- [Conditional patches using test operation](#conditional-patches-using-test-operation)
- [Alternatives Considered](#alternatives-considered)
- [Security Considerations](#security-considerations)
- [Compatibility](#compatibility)
- [Implementation](#implementation)
- [Future Enhancements](#future-enhancements)
- [Open Issues](#open-issues)
## Abstract
Currently velero supports substituting certain values in the K8s resources during restoration like changing the namespace, changing the storage class, etc. This proposal is to add generic support for JSON substitutions in the restore workflow. This will allow the user specify filters for particular resources and then specify a JSON patch (operator, path, value) to apply on a resource. This will allow the user to substitute any value in the K8s resource without having to write a new RestoreItemAction plugin for each kind of substitution.
<!-- ## Background -->
## Goals
- Allow the user to specify a GroupResource, Name(optional), JSON patch for modification.
- Allow the user to specify multiple JSON patch.
## Non Goals
- Deprecating the existing RestoreItemAction plugins for standard substitutions(like changing the namespace, changing the storage class, etc.)
## User Stories
### Scenario 1
- Alice has a PVC which is encrypted using a DES(Disk Encryption Set - Azure example) mentioned in the PVC YAML through the StorageClass YAML.
- Alice wishes to restore this snapshot to a different cluster. The new cluster does not have access to the same DES to provision disk's out of the snapshot.
- She wishes to use a different DES for all the PVCs which use the certain DES.
- She can use this feature to substitute the DES in all StorageClass YAMLs with the new DES without having to create a fresh storageclass, or understanding the name of the storageclass.
### Scenario 2
- Bob has multi zone cluster where nodes are spread across zones.
- Bob has pinned certain pods to a particular zone using nodeSelector/ nodeaffinity on the pod spec.
- In case of zone outage of the cloudprovider, Bob wishes to restore the workload to a different namespace in the same cluster, but change the zone pinning of the workload.
- Bob can use this feature to substitute the nodeSelector/ nodeaffinity in the pod spec with the new zone pinning to quickly failover the workload to a different zone's nodes.
## Detailed Design
- The design and approach is inspired from [kubectl patch command](https://github.com/kubernetes/kubectl/blob/0a61782351a027411b8b45b1443ec3dceddef421/pkg/cmd/patch/patch.go#L102C2-L104C1)
```bash
# Update a container's image using a json patch with positional arrays
kubectl patch pod valid-pod -type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'
```
- The user is expected to create a configmap with the desired Resource Modifications. Then the reference of the configmap will be provided in the RestoreSpec.
- The core restore workflow before creating/updating a particular resource in the cluster will be checked against the filters provided and respective substitutions will be applied on it.
### Reference in velero API
> Example of Reference to configmap in RestoreSpec
```yaml
apiVersion: velero.io/v1
kind: Restore
metadata:
name: restore-1
spec:
resourceModifier:
refType: Configmap
ref: resourcemodifierconfigmap
```
> Example CLI Command
```bash
velero restore create --from-backup backup-1 --resource-modifier-configmap resourcemodifierconfigmap
```
### Resource Modifier ConfigMap Structure
- User first needs to provide details on which resources the JSON Substitutions need to be applied.
- For this the user will provide 4 inputs - Namespaces(for NS Scoped resources), GroupResource (resource.group format similar to includeResources field in velero) and Name Regex(optional).
- If the user does not provide the Name, the JSON Substitutions will be applied to all the resources of the given Group and Kind under the given namespaces.
- Further the use will specify the JSON Patch using the structure of kubectl's "JSON Patch" based inputs.
- Sample data in ConfigMap
```yaml
version: v1
resourceModifierRules:
- conditions:
groupResource: persistentvolumeclaims
resourceNameRegex: "mysql.*"
namespaces:
- bar
- foo
patches:
- operation: replace
path: "/spec/storageClassName"
value: "premium"
- operation: remove
path: "/metadata/labels/test"
```
- The above configmap will apply the JSON Patch to all the PVCs in the namespaces bar and foo with name starting with mysql. The JSON Patch will replace the storageClassName with "premium" and remove the label "test" from the PVCs.
- Note that the Namespace here is the original namespace of the backed up resource, not the new namespace where the resource is going to be restored.
- The user can specify multiple JSON Patches for a particular resource. The patches will be applied in the order specified in the configmap. A subsequent patch is applied in order and if multiple patches are specified for the same path, the last patch will override the previous patches.
- The user can specify multiple resourceModifierRules in the configmap. The rules will be applied in the order specified in the configmap.
> Users need to create one configmap in Velero install namespace from a YAML file that defined resource modifiers. The creating command would be like the below:
```bash
kubectl create cm <configmap-name> --from-file <yaml-file> -n velero
```
### Operations supported by the JSON Patch library:
- add
- remove
- replace
- move
- copy
- test (covered below)
### Advance scenarios
#### **Conditional patches using test operation**
The `test` operation can be used to check if a particular value is present in the resource. If the value is present, the patch will be applied. If the value is not present, the patch will not be applied. This can be used to apply a patch only if a particular value is present in the resource. For example, if the user wishes to change the storage class of a PVC only if the PVC is using a particular storage class, the user can use the following configmap.
```yaml
version: v1
resourceModifierRules:
- conditions:
groupResource: persistentvolumeclaims.storage.k8s.io
resourceNameRegex: ".*"
namespaces:
- bar
- foo
patches:
- operation: test
path: "/spec/storageClassName"
value: "premium"
- operation: replace
path: "/spec/storageClassName"
value: "standard"
```
## Alternatives Considered
1. JSON Path based addressal of json fields in the resource
- This was the initial planned approach, but there is no open source library which gives satisfactory edit functionality with support for all operators supported by the JsonPath RFC.
- We attempted modifying the [https://kubernetes.io/docs/reference/kubectl/jsonpath/](https://kubernetes.io/docs/reference/kubectl/jsonpath/) but given the complexity of the code it did not make sense to change it since it would become a long term maintainability problem.
1. RestoreItemAction for each kind of standard substitution
- Not an extensible design. If a new kind of substitution is required, a new RestoreItemAction needs to be written.
1. RIA for JSON Substitution: The approach of doing JSON Substitution through a RestoreItemAction plugin was considered. But it is likely to have performance implications as the plugin will be invoked for all the resources.
## Security Considerations
No security impact.
## Compatibility
Compatibility with existing StorageClass mapping RestoreItemAction and similar plugins needs to be evaluated.
## Implementation
- Changes in Restore CRD. Add a new field to the RestoreSpec to reference the configmap.
- One example of where code will be modified: https://github.com/vmware-tanzu/velero/blob/eeee4e06d209df7f08bfabda326b27aaf0054759/pkg/restore/restore.go#L1266 On the obj before Creation, we can apply the conditions to check if the resource is filtered out using given parameters. Then using JsonPatch provided, we can update the resource.
- For Jsonpatch - https://github.com/evanphx/json-patch library is used.
- JSON Patch RFC https://datatracker.ietf.org/doc/html/rfc6902
## Future enhancements
- Additional features such as wildcard support in path, regex match support in value, etc. can be added in future. This would involve forking the https://github.com/evanphx/json-patch library and adding the required features, since those features are not supported by the library currently and are not part of jsonpatch RFC.
## Open Issues
NA

View File

@@ -0,0 +1,177 @@
# Proposal to add support for Multiple VolumeSnapshotClasses in CSI Plugin
- [Proposal to add support for Multiple VolumeSnapshotClasses in CSI Plugin](#proposal-to-add-support-for-multiple-volumesnapshotclasses-in-csi-plugin)
- [Abstract](#abstract)
- [Background](#background)
- [Goals](#goals)
- [Non Goals](#non-goals)
- [User Stories](#user-stories)
- [Scenario 1](#scenario-1)
- [Scenario 2](#scenario-2)
- [Detailed Design](#detailed-design)
- [Plugin Inputs Contract Changes](#plugin-inputs-contract-changes)
- [Using Plugin Inputs for CSI Plugin](#using-plugin-inputs-for-csi-plugin)
- [Annotations overrides on PVC for CSI Plugin](#annotations-overrides-on-pvc-for-csi-plugin)
- [Using Plugin Inputs for Other Plugins](#using-plugin-inputs-for-other-plugins)
- [Alternatives Considered](#alternatives-considered)
- [Security Considerations](#security-considerations)
- [Compatibility](#compatibility)
- [Implementation](#implementation)
- [Open Issues](#open-issues)
## Abstract
Currently the Velero CSI plugin chooses the VolumeSnapshotClass in the cluster that has the same driver name and also has the velero.io/csi-volumesnapshot-class label set on it. This global selection is not sufficient for many use cases. This proposal is to add support for multiple VolumeSnapshotClasses in CSI Plugin where the user can specify the VolumeSnapshotClass to use for a particular driver and backup.
## Background
The Velero CSI plugin chooses the VolumeSnapshotClass in the cluster that has the same driver name and also has the velero.io/csi-volumesnapshot-class label set on it. This global selection is not sufficient for many use cases. For example, if a cluster has multiple VolumeSnapshotClasses for the same driver, the user may want to use a VolumeSnapshotClass that is different from the default one. The user might also have different schedules set up for backing up different parts of the cluster and might wish to use different VolumeSnapshotClasses for each of these backups.
## Goals
- Allow the user to specify the VolumeSnapshotClass to use for a particular driver and backup.
## Non Goals
- Deprecating existing VSC selection behaviour. (The current behaviour will remain the default behaviour if the user does not specify the VolumeSnapshotClass to use for a particular driver and backup.)
## User Stories
### Scenario 1
- Consider Alice is a cluster admin and has a cluster with multiple VolumeSnapshotClasses for the same driver. Each VSC stores the snapshots taken in different ResourceGroup(Azure equivalent).
- Alice has configured multiple scheduled backups each covering a different set of namespaces, representing different apps owned by different teams.
- Alice wants to use a different VolumeSnapshotClass for each backup such that each snapshot goes in it's respective ResourceGroup to simply management of snapshots(COGS, RBAC etc).
- In current velero, Alice can't achieve this as the CSI plugin will use the default VolumeSnapshotClass for the driver and all snapshots will go in the same ResourceGroup.
- Proposed design will allow Alice to achieve this by specifying the VolumeSnapshotClass to use for a particular driver and backup/schedule.
## Scenario 2
- Bob is a cluster admin has PVCs storing different types of data.
- Most of the PVCs are used for storing non-sensitive application data. But certain PVCs store critical financial data.
- For such PVCs Bob wants to use a VolumeSnapshotClass with certain encryption related parameters set.
- In current velero, Bob can't achieve this as the CSI plugin will use the default VolumeSnapshotClass for the driver and all snapshots will be taken using the same VolumeSnapshotClass.
- Proposed design will allow Bob to achieve this by overriding the VolumeSnapshotClass to use for a particular driver and backup/schedule using annotations on those specific PVCs.
## Detailed Design
### Staged Approach:
### Stage 1 Approach
#### Through Annotations
1. **Support VolumeSnapshotClass selection at backup/schedule level**
The user can annotate the backup/ schedule with driver and VolumeSnapshotClass name. The CSI plugin will use the VolumeSnapshotClass specified in the annotation. If the annotation is not present, the CSI plugin will use the default VolumeSnapshotClass for the driver.
*example annotation on backup/schedule:*
```yaml
apiVersion: velero.io/v1
kind: Backup
metadata:
name: backup-1
annotations:
velero.io/csi-volumesnapshot-class_csi.cloud.disk.driver: csi-diskdriver-snapclass
velero.io/csi-volumesnapshot-class_csi.cloud.file.driver: csi-filedriver-snapclass
velero.io/csi-volumesnapshot-class_<driver name>: csi-snapclass
```
To query the annotations on a backup: "velero.io/csi-volumesnapshot-class_'driver name'" - where driver names comes from the PVC's driver.
2. **Support VolumeSnapshotClass selection at PVC level**
The user can annotate the PVCs with driver and VolumeSnapshotClass name. The CSI plugin will use the VolumeSnapshotClass specified in the annotation. If the annotation is not present, the CSI plugin will use the default VolumeSnapshotClass for the driver. If the VolumeSnapshotClass provided is of a different driver, the CSI plugin will use the default VolumeSnapshotClass for the driver.
*example annotation on PVC:*
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-1
annotations:
velero.io/csi-volumesnapshot-class: csi-diskdriver-snapclass
```
Consider this as a override option in conjunction to part 1.
**Note**: The user has to annotate the PVCs or backups with the VolumeSnapshotClass to use for each driver. This is not ideal for the user experience.
- **Mitigation**: We can extend Velero CLI to also annotate backups/schedules with the VolumeSnapshotClass to use for each driver. This will make it easier for the user to annotate the backups/schedules. This mitigation is not for the PVCs though, since PVCs is anyways a specific use case. Similar to : " kubectl run --image myimage --annotations="foo=bar" --annotations="another=one" mypod"
We can add support for - velero backup create my-backup --annotations "velero.io/csi:csi.cloud.disk.driver=csi-diskdriver-snapclass"
### Stage 2 Approach
The above annotations route is to get started and for initial design closure/ implementation, north star is to either introduce CSI specific fields (considering that CSI might be a very core part of velero going forward) in the backup/restore CR OR leverage the pluginInputs field as being tracked in: https://github.com/vmware-tanzu/velero/pull/5981
Refer section Alternatives 2. **Through generic property bag in the velero contracts**: in the design doc for more details on the pluginInputs field.
## Alternatives Considered
1. **Through CSI Specific Fields in Velero contracts**
**Considerations**
- Since CSI snapshotting is done through the plugin, we don't intend to bloat up the Backup Spec with CSI specific fields.
- But considering that CSI Snapshotting is the way forward, we can debate if we should add a CSI section to the Backup Spec.
**Approach**: Similar to VolumeSnapshotLocation param in the Backup Spec, we can add a VolumeSnapshotClass param in the Backup Spec. This will allow the user to specify the VolumeSnapshotClass to use for the backup. The CSI plugin will use the VolumeSnapshotClass specified in the Backup Spec. If the VolumeSnapshotClass is not specified, the CSI plugin will use the default VolumeSnapshotClass for the driver.
*example of VolumeSnapshotClass param in the Backup Spec:*
```yaml
apiVersion: velero.io/v1
kind: Backup
metadata:
name: backup-1
spec:
csiParameters:
volumeSnapshotClasses:
driver: csi.cloud.disk.driver
snapClass: csi-diskdriver-snapclass
timeout: 10m
```
1. **Through changes in velero contracts**
1. **Through configmap references.**
Currently even the storageclass mapping plugin expects the user to create a configmap which is used globally, and fetched through labels. This behaviour has same issue as the VolumeSnapshotClass selection. We can introduce a field in the velero contracts which allow passing configmap references for each plugin. And then the plugin can honour the configmap passed in as reference. The configmap can be used to pass the VolumeSnapshotClass to use for the backup, and also other parameters to tweak. This can help in making plugins more flexible while not depending on global behaviour.
*example of configmap reference in the velero contracts:*
```yaml
apiVersion: velero.io/v1
kind: Backup
metadata:
name: backup-1
spec:
configmapRefs:
- name: csi-volumesnapshotclass-configmap
- namespace: velero
- plugin: velero.io/csi
```
2. **Through generic property bag in the velero contracts**: We can introduce a field in the velero contracts which allow passing a generic property bag for each plugin. And then the plugin can honour the property bag passed in.
*example of property bag in the velero contracts:*
```yaml
apiVersion: velero.io/v1
kind: Backup
metadata:
name: backup-1
spec:
pluginInputs:
- name: velero.io/csi
- properties:
- key: csi.cloud.disk.driver
- value: csi-diskdriver-snapclass
- key: csi.cloud.file.driver
- value: csi-filedriver-snapclass
```
**Note**: Both these approaches can also be used to tweak other parameters such as CSI Snapshotting Timeout/intervals. And further can be used by other plugins.
## Security Considerations
No security impact.
## Compatibility
Existing behaviour of csi plugin will be retained where it fetches the VolumeSnapshotClass through the label. This will be the default behaviour if the user does not specify the VolumeSnapshotClass.
## Implementation
TBD based on closure of high level design proposals.
## Open Issues
NA

View File

@@ -0,0 +1,138 @@
# Ensure support for backing up resources based on multiple labels
## Abstract
As of today Velero supports filtering of resources based on single label selector per backup. It is desired that Velero
support backing up of resources based on multiple labels (OR logic).
**Note:** This solution is required because Kubernetes label selectors only allow AND logic of labels.
## Background
Currently, Velero's Backup/Restore API has a spec field `LabelSelector` which helps in filtering of resources based on
a **single** label value per backup/restore request. For instance, if the user specifies the `Backup.Spec.LabelSelector` as
`data-protection-app: true`, Velero will grab all the resources that possess this label and perform the backup
operation on them. The `LabelSelector` field does not accept more than one labels, and thus if the user want to take
backup for resources consisting of a label from a set of labels (label1 OR label2 OR label3) then the user needs to
create multiple backups per label rule. It would be really useful if Velero Backup API could respect a set of
labels (OR Rule) for a single backup request.
Related Issue: https://github.com/vmware-tanzu/velero/issues/1508
## Goals
- Enable support for backing up resources based on multiple labels (OR Logic) in a single backup config.
- Enable support for restoring resources based on multiple labels (OR Logic) in a single restore config.
## Use Case/Scenario
Let's say as a Velero user you want to take a backup of secrets, but all these secrets do not have one single consistent
label on them. We want to take backup of secrets having any one label in `app=gdpr`, `app=wpa` and `app=ccpa`. Here
we would have to create 3 instances of backup for each label rule. This can become cumbersome at scale.
## High-Level Design
### Addition of `OrLabelSelectors` spec to Velero Backup/Restore API
For Velero to back up resources if they consist of any one label from a set of labels, we would like to add a new spec
field `OrLabelSelectors` which would enable user to specify them. The Velero backup would somewhat look like:
```
apiVersion: velero.io/v1
kind: Backup
metadata:
name: backup-101
namespace: openshift-adp
spec:
includedNamespaces:
- test
storageLocation: velero-sample-1
ttl: 720h0m0s
orLabelSelectors:
- matchLabels:
app=gdpr
- matchLabels:
app=wpa
- matchLabels:
app=ccpa
```
**Note:** This approach will **not** be changing any current behavior related to Backup API spec `LabelSelector`. Rather we
propose that the label in `LabelSelector` spec and labels in `OrLabelSelectors` should be treated as different Velero functionalities.
Both these fields will be treated as separate Velero Backup API specs. If `LabelSelector` (singular) is present then just match that label.
And if `OrLabelSelectors` is present then match to any label in the set specified by the user. For backup case, if both the `LabelSelector` and `OrLabelSelectors`
are specified (we do not anticipate this as a real world use-case) then the `OrLabelSelectors` will take precedence, `LabelSelector` will
only be used to filter only when `OrLabelSelectors` is not specified by the user. This helps to keep both spec behaviour independent and not confuse the users.
This way we preserve the existing Velero behaviour and implement the new functionality in a much cleaner way.
For instance, let's take a look the following cases:
1. Only `LabelSelector` specified: Velero will create a backup with resources matching label `app=protect-db`
```
apiVersion: velero.io/v1
kind: Backup
metadata:
name: backup-101
namespace: openshift-adp
spec:
includedNamespaces:
- test
storageLocation: velero-sample-1
ttl: 720h0m0s
labelSelector:
- matchLabels:
app=gdpr
```
2. Only `OrLabelSelectors` specified: Velero will create a backup with resources matching any label from set `{app=gdpr, app=wpa, app=ccpa}`
```
apiVersion: velero.io/v1
kind: Backup
metadata:
name: backup-101
namespace: openshift-adp
spec:
includedNamespaces:
- test
storageLocation: velero-sample-1
ttl: 720h0m0s
orLabelSelectors:
- matchLabels:
app=gdpr
- matchLabels:
app=wpa
- matchLabels:
app=ccpa
```
Similar implementation will be done for the Restore API as well.
## Detailed Design
With the Introduction of `OrLabelSelectors` the BackupSpec and RestoreSpec will look like:
BackupSpec:
```
type BackupSpec struct {
[...]
// OrLabelSelectors is a set of []metav1.LabelSelector to filter with
// when adding individual objects to the backup. Resources matching any one
// label from the set of labels will be added to the backup. If empty
// or nil, all objects are included. Optional.
// +optional
OrLabelSelectors []\*metav1.LabelSelector
[...]
}
```
RestoreSpec:
```
type RestoreSpec struct {
[...]
// OrLabelSelectors is a set of []metav1.LabelSelector to filter with
// when restoring objects from the backup. Resources matching any one
// label from the set of labels will be restored from the backup. If empty
// or nil, all objects are included from the backup. Optional.
// +optional
OrLabelSelectors []\*metav1.LabelSelector
[...]
}
```
The logic to collect resources to be backed up for a particular backup will be updated in the `backup/item_collector.go`
around [here](https://github.com/vmware-tanzu/velero/blob/574baeb3c920f97b47985ec3957debdc70bcd5f8/pkg/backup/item_collector.go#L294).
And for filtering the resources to be restored, the changes will go [here](https://github.com/vmware-tanzu/velero/blob/d1063bda7e513150fd9ae09c3c3c8b1115cb1965/pkg/restore/restore.go#L1769)
**Note:**
- This feature will not be exposed via Velero CLI.

View File

@@ -393,7 +393,7 @@ Deletion of `VolumePluginBackup` CR can be delegated to plugin. Plugin can perfo
### 'core' Velero client/server required changes
- Creation of the VolumePluginBackup/VolumePluginRestore CRDs at installation time
- Persistence of VolumePluginBackup CRs towards the end of the back up operation
- Persistence of VolumePluginBackup CRs towards the end of the backup operation
- As part of backup synchronization, VolumePluginBackup CRs related to the backup will be synced.
- Deletion of VolumePluginBackup when volumeshapshotter's DeleteSnapshot is called
- Deletion of VolumePluginRestore as part of handling deletion of Restore CR
@@ -429,7 +429,7 @@ Instead, a new method for 'Progress' will be added to interface. Velero server r
But, this involves good amount of changes and needs a way for backward compatibility.
As volume plugins are mostly K8s native, its fine to go ahead with current limiation.
As volume plugins are mostly K8s native, its fine to go ahead with current limitation.
### Update Backup CR
Instead of creating new CRs, plugins can directly update the status of Backup CR. But, this deviates from current approach of having separate CRs like PodVolumeBackup/PodVolumeRestore to know operations progress.

View File

@@ -0,0 +1,292 @@
# Plugin Versioning
## Abstract
This proposal outlines an approach to support versioning of Velero's plugin APIs to enable changes to those APIs.
It will allow for backwards compatible changes to be made, such as the addition of new plugin methods, but also backwards incompatible changes such as method removal or method signature changes.
## Background
When changes are made to Veleros plugin APIs, there is no mechanism for the Velero server to communicate the version of the API that is supported, or for plugins to communicate what version they implement.
This means that any modification to a plugin API is a backwards incompatible change as it requires all plugins which implement the API to update and implement the new method.
There are several components involved to use plugins within Velero.
From the perspective of the core Velero codebase, all plugin kinds (e.g. `ObjectStore`, `BackupItemAction`) are defined by a single API interface and all interactions with plugins are managed by a plugin manager which provides an implementation of the plugin API interface for Velero to use.
Velero communicates with plugins via gRPC.
The core Velero project provides a framework (using the [go-plugin project](https://github.com/hashicorp/go-plugin)) for plugin authors to use to implement their plugins which manages the creation of gRPC servers and clients.
Velero plugins import the Velero plugin library in order to use this framework.
When a change is made to a plugin API, it needs to be made to the Go interface used by the Velero codebase, and also to the rpc service definition which is compiled to form part of the framework.
As each plugin kind is defined by a single interface, when a plugin imports the latest version of the Velero framework, it will need to implement the new APIs in order to build and run successfully.
If a plugin does not use the latest version of the framework, and is used with a newer version of Velero that expects the plugin to implement those methods, this will result in a runtime error as the plugin is incompatible.
With this proposal, we aim to break this coupling and introduce plugin API versions.
## Scenarios to Support
The following describes interactions between Velero and its plugins that will be supported with the implementation of this proposal.
For the purposes of this list, we will refer to existing Velero and plugin versions as `v1` and all following versions as version `n`.
Velero client communicating with plugins or plugin client calling other plugins:
- Version `n` client will be able to communicate with Version `n` plugin
- Version `n` client will be able to communicate with all previous versions of the plugin (Version `n-1` back to `v1`)
Velero plugins importing Velero framework:
- `v1` plugin built against Version `n` Velero framework
- A plugin may choose to only implement a `v1` API, but it must be able to be built using Version `n` of the Velero framework
## Goals
- Allow plugin APIs to change without requiring all plugins to implement the latest changes (even if they upgrade the version of Velero that is imported)
- Allow plugins to choose which plugin versions they support and enable them to support multiple versions
- Support breaking changes in the plugin APIs such as method removal or method signature changes
- Establish a design process for modifying plugin APIs such as method addition and removal and signature changes
- Establish a process for newer Velero clients to use older versions of a plugin API through adaptation
## Non Goals
- Change how plugins are managed or added
- Allow older plugin clients to communicate with new versions of plugins
## High-Level Design
With each change to a plugin API, a new version of the plugin interface and the proto service definition will be created which describes the new plugin API.
The plugin framework will be adapted to allow these new plugin versions to be registered.
Plugins can opt to implement any or all versions of an API, however Velero will always attempt to use the latest version, and the plugin management will be modified to adapt earlier versions of a plugin to be compatible with the latest API where possible.
Under the existing plugin framework, any new plugin version will be treated as a new plugin with a new kind.
The plugin manager (which provides implementations of a plugin to Velero) will include an adapter layer which will manage the different versions and provide the adaptation for versions which do not implement the latest version of the plugin API.
Providing an adaptation layer enables Velero and other plugin clients to use an older version of a plugin if it can be safely adapted.
As the plugins will be able to introduce backwards incompatible changes, it will _not_ be possible for older version of Velero to use plugins which only support the latest versions of the plugin APIs.
Although adding new rpc methods to a service is considered a backwards compatible change within gRPC, due to the way the proto definitions are compiled and included in the framework used by plugins, this will require every plugin to implement the new methods.
Instead, we are opting to treat the addition of a method to an API as one requiring versioning.
The addition of optional fields to existing structs which are used as parameters to or return values of API methods will not be considered as a change requiring versioning.
These kinds of changes do not modify method signatures and have been safely made in the past with no impact on existing plugins.
## Detailed Design
The following areas will need to be adapted to support plugin versioning.
### Plugin Interface Definitions
To provide versioned plugins, any change to a plugin interface (method addition, removal, or signature change) will require a new versioned interface to be created.
Currently, all plugin interface definitions reside in `pkg/plugin/velero` in a file corresponding to their plugin kind.
These files will be rearranged to be grouped by kind and then versioned: `pkg/plugin/velero/<plugin_kind>/<version>/`.
The following are examples of how each change may be treated:
#### Complete Interface Change
If the entire `ObjectStore` interface is being changed such that no previous methods are being included, a file would be added to `pkg/plugin/velero/objectstore/v2/` and would contain the new interface definition:
```
type ObjectStore interface {
// Only include new methods that the new API version will support
NewMethod()
// ...
}
```
#### Method Addition
If a method is being added to the `ObjectStore` API, a file would be added to `pkg/plugin/velero/objectstore/v2/` and may contain a new API definition as follows:
```
import "github.com/vmware-tanzu/velero/pkg/plugin/velero/objectstore/v1"
type ObjectStore interface {
// Import all the methods from the previous version of the API if they are to be included as is
v1.ObjectStore
// Provide definitions of any new methods
NewMethod()
```
#### Method Removal
If a method is being removed from the `ObjectStore` API, a file would be added to `pkg/plugin/velero/objectstore/v2/` and may contain a new API definition as follows:
```
type ObjectStore interface {
// Methods which are required from the previous API version must be included, for example
Init(config)
PutObject(bucket, key, body)
// ...
// Methods which are to be removed are not included
```
#### Method Signature modification
If a method signature in the `ObjectStore` API is being modified, a file would be added to `pkg/plugin/velero/objectstore/v2/` and may contain a new API definition as follows:
```
type ObjectStore interface {
// Methods which are required from the previous API version must be included, for example
Init(config)
PutObject(bucket, key, body)
// ...
// Provide new definitions for methods which are being modified
List(bucket, prefix, newParameter)
}
```
### Proto Service Definitions
The proto service definitions of the plugins will also be versioned and arranged by their plugin kind.
Currently, all the proto definitions reside under `pkg/plugin/proto` in a file corresponding to their plugin kind.
These files will be rearranged to be grouped by kind and then versioned: `pkg/plugin/proto/<plugin_kind>/<version>`,
except for the current v1 plugins. Those will remain in their current package/location for backwards compatibility.
This will allow plugin images built with earlier versions of velero to work with the latest velero (for v1 plugins
only). The go_package option will be added to all proto service definitions to allow the proto compilation script
to place the generated go code for each plugin api version in the proper go package directory.
It is not possible to import an existing proto service into a new one, so any methods will need to be duplicated across versions if they are required by the new version.
The message definitions can be shared however, so these could be extracted from the service definition files and placed in a file that can be shared across all versions of the service.
### Plugin Framework
To allow plugins to register which versions of the API they implement, the plugin framework will need to be adapted to accept new versions.
Currently, the plugin manager stores a [`map[string]RestartableProcess`](https://github.com/vmware-tanzu/velero/blob/main/pkg/plugin/clientmgmt/manager.go#L69), where the string key is the binary name for the plugin process (e.g. "velero-plugin-for-aws").
Each `RestartableProcess` contains a [`map[kindAndName]interface{}`](https://github.com/vmware-tanzu/velero/blob/main/pkg/plugin/clientmgmt/restartable_process.go#L60) which represents each of the unique plugin implementations provided by that binary.
[`kindAndName`](https://github.com/vmware-tanzu/velero/blob/main/pkg/plugin/clientmgmt/registry.go#L42) is a struct which combines the plugin kind (`ObjectStore`, `VolumeSnapshotter`) and the plugin name ("velero.io/aws", "velero.io/azure").
Each plugin version registration must be unique (to allow for multiple versions to be implemented within the same plugin binary).
This will be achieved by adding a specific registration method for each version to the Server interface in the plugin framework.
For example, if adding a V2 `RestoreItemAction` plugin, the Server interface would be modified to add the `RegisterRestoreItemActionV2` method.
This would require [adding a new plugin Kind const](https://github.com/vmware-tanzu/velero/blob/main/pkg/plugin/framework/plugin_kinds.go#L28-L46) to represent the new plugin version, e.g. `PluginKindRestoreItemActionV2`.
It also requires the creation of a new implementation of the go-plugin interface ([example](https://github.com/vmware-tanzu/velero/blob/main/pkg/plugin/framework/object_store.go)) to support that version and use the generated gRPC code from the proto definition (including a client and server implementation).
The Server will also need to be adapted to recognize this new plugin Kind and to serve the new implementation.
Existing plugin Kind consts and registration methods will be left unchanged and will correspond to the current version of the plugin APIs (assumed to be v1).
### Plugin Manager
The plugin manager is responsible for managing the lifecycle of plugins.
It provides an interface which is used by Velero to retrieve an instance of a plugin kind with a specific name (e.g. `ObjectStore` with the name "velero.io/aws").
The manager contains a registry of all available plugins which is populated during the main Velero server startup.
When the plugin manager is requested to provide a particular plugin, it checks the registry for that plugin kind and name.
If it is available in the registry, the manager retrieves a `RestartableProcess` for the plugin binary, creating it if it does not already exist.
That `RestartableProcess` is then used by individual restartable implementations of a plugin kind (e.g. `restartableObjectStore`, `restartableVolumeSnapshotter`).
As new plugin versions are added, the plugin manager will be modified to always retrieve the latest version of a plugin kind.
This is to allow the remainder of the Velero codebase to assume that it will always interact with the latest version of a plugin.
If the latest version of a plugin is not available, it will attempt to fall back to previous versions and use an implementation adapted to the latest version if available.
It will be up to the author of new plugin versions to determine whether a previous version of a plugin can be adapted to work with the interface of the new version.
For each plugin kind, a new `Restartable<PluginKind>` struct will be introduced which will contain the plugin Kind and a function, `Get`, which will instantiate a restartable instance of that plugin kind and perform any adaptation required to make it compatible with the latest version.
For example, `RestartableObjectStore` or `RestartableVolumeSnapshotter`.
For each restartable plugin kind, a new function will be introduced which will return a slice of `Restartable<PluginKind>` objects, sorted by version in descending order.
The manager will iterate through the list of `Restartable<PluginKind>`s and will check the registry for the given plugin kind and name.
If the requested version is not found, it will skip and continue to iterate, attempting to fetch previous versions of the plugin kind.
Once the requested version is found, the `Get` function will be called, returning the restartable implementation of the latest version of that plugin Kind.
```
type RestartableObjectStore struct {
kind framework.PluginKind
// Get returns a restartable ObjectStore for the given name and process, wrapping if necessary
Get func(name string, restartableProcess RestartableProcess) v2.ObjectStore
}
func (m *manager) restartableObjectStores() []RestartableObjectStore {
return []RestartableObjectStore{
{
kind: framework.PluginKindObjectStoreV2,
Get: newRestartableObjectStoreV2,
},
{
kind: framework.PluginKindObjectStore,
Get: func(name string, restartableProcess RestartableProcess) v2.ObjectStore {
// Adapt the existing restartable v1 plugin to be compatible with the v2 interface
return newAdaptedV1ObjectStore(newRestartableObjectStore(name, restartableProcess))
},
},
}
}
// GetObjectStore returns a restartableObjectStore for name.
func (m *manager) GetObjectStore(name string) (v2.ObjectStore, error) {
name = sanitizeName(name)
for _, restartableObjStore := range m.restartableObjectStores() {
restartableProcess, err := m.getRestartableProcess(restartableObjStore.kind, name)
if err != nil {
// Check if plugin was not found
if errors.Is(err, &pluginNotFoundError{}) {
continue
}
return nil, err
}
return restartableObjStore.Get(name, restartableProcess), nil
}
return nil, fmt.Errorf("unable to get valid ObjectStore for %q", name)
}
```
If the previous version is not available, or can not be adapted to the latest version, it should not be included in the `restartableObjectStores` slice.
This will result in an error being returned as is currently the case when a plugin implementation for a particular kind and provider can not be found.
There are situations where it may be beneficial to check at the point where a plugin API call is made whether it implements a specific version of the API.
This is something that can be addressed with future amendments to this design, however it does not seem to be necessary at this time.
#### Plugin Adaptation
When a new plugin API version is being proposed, it will be up to the author and the maintainer team to determine whether older versions of an API can be safely adapted to the latest version.
An adaptation will implement the latest version of the plugin API interface but will use the methods from the version that is being adapted.
In cases where the methods signatures remain the same, the adaptation layer will call through to the same method in the version being adapted.
Examples where an adaptation may be safe:
- A method signature is being changed to add a new parameter but the parameter could be optional (for example, adding a context parameter). The adaptation could call through to the method provided in the previous version but omit the parameter.
- A method signature is being changed to remove a parameter, but it is safe to pass a default value to the previous version. The adaptation could call through to the method provided in the previous version but use a default value for the parameter.
- A new method is being added but does not impact any existing behaviour of Velero (for example, a new method which will allow Velero to [wait for additional items to be ready](https://github.com/vmware-tanzu/velero/blob/main/design/wait-for-additional-items.md)). The adaptation would return a value which allows the existing behaviour to be performed.
- A method is being deleted as it is no longer used. The adaptation would call through to any methods which are still included but would omit the deleted method in the adaptation.
Examples where an adaptation may not be safe:
- A new method is added which is used to provide new critical functionality in Velero. If this functionality can not be replicated using existing plugin methods in previous API versions, this should not be adapted and instead the plugin manager should return an error indicating that the plugin implementation can not be found.
### Restartable Plugin Process
As new versions of plugins are added, new restartable implementations of plugins will also need to be created.
These are currently located within "pkg/plugin/clientmgmt" but will be rearranged to be grouped by kind and version like other plugin files.
## Versioning Considerations
It should be noted that if changes are being made to a plugin's API, it will only be necessary to bump the API version once within a release cycle, regardless of how many changes are made within that cycle.
This is because the changes will only be available to consumers when they upgrade to the next minor version of the Velero library.
New plugin API versions will not be introduced or backported to patch releases.
Once a new minor or major version of Velero has been released however, any further changes will need to follow the process above and use a new API version.
## Alternatives Considered
### Relying on gRPCs backwards compatibility when adding new methods
One approach for adapting the plugin APIs would have been to rely on the fact that adding methods to gRPC services is a backwards compatible change.
This approach would allow older clients to communicate with newer plugins as the existing interface would still be provided.
This was considered but ruled out as our current framework would require any plugin that recompiles using the latest version of the framework to adapt to the new version.
Also, without specific versioned interfaces, it would require checking plugin implementations at runtime for the specific methods that are supported.
## Compatibility
This design doc aims to allow plugin API changes to be made in a manner that may provide some backwards compatibility.
Older versions of Velero will not be able to make use of new plugin versions however may continue to use previous versions of a plugin API if supported by the plugin.
All compatibility concerns are addressed earlier in the document.
## Implementation
This design document primarily outlines an approach to allow future plugin API changes to be made.
However, there are changes to the existing code base that will be made to allow plugin authors to more easily propose and introduce changes to these APIs.
* Plugin interface definitions (currently in `pkg/plugin/velero`) will be rearranged to be grouped by kind and then versioned: `pkg/plugin/velero/<plugin_kind>/<version>/`.
* Proto definitions (currently in `pkg/plugin/proto`) will be rearranged to be grouped by kind and then versioned: `pkg/plugin/proto/<plugin_kind>/<version>`.
* This will also require changes to the `make update` build task to correctly find the new proto location and output to the versioned directories.
It is anticipated that changes to the plugin APIs will be made as part of the 1.9 release cycle.
To assist with this work, an additional follow-up task to the ones listed above would be to prepare a V2 version of each of the existing plugins.
These new versions will not yet provide any new API methods but will provide a layout for new additions to be made
## Open Issues

View File

@@ -1,6 +1,6 @@
# Restore API Group Version by Priority Level When EnableAPIGroupVersions Feature is Set
Status: Draft
Status: Accepted
## Abstract

View File

@@ -0,0 +1,130 @@
# Design for RestoreItemAction v2 API
## Abstract
This design includes the changes to the RestoreItemAction (RIA) api design as required by the [Item Action Progress Monitoring](general-progress-monitoring.md) feature.
It also includes changes as required by the [Wait For Additional Items](wait-for-additional-items.md) feature.
The BIA v2 interface will have three new methods, and the RestoreItemActionExecuteOutput() struct in the return from Execute() will have three optional fields added.
If there are any additional RIA API changes that are needed in the same Velero release cycle as this change, those can be added here as well.
## Background
This API change is needed to facilitate long-running plugin actions that may not be complete when the Execute() method returns.
It is an optional feature, so plugins which don't need this feature can simply return an empty operation ID and the new methods can be no-ops.
This will allow long-running plugin actions to continue in the background while Velero moves on to the next plugin, the next item, etc.
The other change allows Velero to wait until newly-restored AdditionalItems returned by a RIA plugin are ready before moving on to restoring the current item.
## Goals
- Allow for RIA Execute() to optionally initiate a long-running operation and report on operation status.
- Allow for RIA to allow Velero to call back into the plugin to wait until AdditionalItems are ready before continuing with restore.
## Non Goals
- Allowing velero control over when the long-running operation begins.
## High-Level Design
As per the [Plugin Versioning](plugin-versioning.md) design, a new RIAv2 plugin `.proto` file will be created to define the GRPC interface.
v2 go files will also be created in `plugin/clientmgmt/restoreitemaction` and `plugin/framework/restoreitemaction`, and a new PluginKind will be created.
Changes to RestoreItemActionExecuteOutput will be made to the existing struct.
Since the new fields are optional elements of the struct, the new enlarged struct will work with both v1 and v2 plugins.
The velero Restore process will be modified to reference v2 plugins instead of v1 plugins.
An adapter will be created so that any existing RIA v1 plugin can be executed as a v2 plugin when executing a restore.
## Detailed Design
### proto changes (compiled into golang by protoc)
The v2 RestoreItemAction.proto will be like the current v1 version with the following changes:
RestoreItemActionExecuteOutput gets three new fields (defined in the current (v1) RestoreItemAction.proto file:
```
message RestoreItemActionExecuteResponse {
bytes item = 1;
repeated ResourceIdentifier additionalItems = 2;
bool skipRestore = 3;
string operationID = 4;
bool waitForAdditionalItems = 5;
google.protobuf.Duration additionalItemsReadyTimeout = 6;
}
```
The RestoreItemAction service gets three new rpc methods:
```
service RestoreItemAction {
rpc AppliesTo(RestoreItemActionAppliesToRequest) returns (RestoreItemActionAppliesToResponse);
rpc Execute(RestoreItemActionExecuteRequest) returns (RestoreItemActionExecuteResponse);
rpc Progress(RestoreItemActionProgressRequest) returns (RestoreItemActionProgressResponse);
rpc Cancel(RestoreItemActionCancelRequest) returns (google.protobuf.Empty);
rpc AreAdditionalItemsReady(RestoreItemActionItemsReadyRequest) returns (RestoreItemActionItemsReadyResponse);
}
```
To support these new rpc methods, we define new request/response message types:
```
message RestoreItemActionProgressRequest {
string plugin = 1;
string operationID = 2;
bytes restore = 3;
}
message RestoreItemActionProgressResponse {
generated.OperationProgress progress = 1;
}
message RestoreItemActionCancelRequest {
string plugin = 1;
string operationID = 2;
bytes restore = 3;
}
message RestoreItemActionItemsReadyRequest {
string plugin = 1;
bytes restore = 2;
repeated ResourceIdentifier additionalItems = 3;
}
message RestoreItemActionItemsReadyResponse {
bool ready = 1;
}
```
One new shared message type will be needed, as defined in the v2 BackupItemAction design:
```
message OperationProgress {
bool completed = 1;
string err = 2;
int64 completed = 3;
int64 total = 4;
string operationUnits = 5;
string description = 6;
google.protobuf.Timestamp started = 7;
google.protobuf.Timestamp updated = 8;
}
```
In addition to the three new rpc methods added to the RestoreItemAction interface, there is also a new `Name()` method. This one is only actually used internally by Velero to get the name that the plugin was registered with, but it still must be defined in a plugin which implements RestoreItemActionV2 in order to implement the interface. It doesn't really matter what it returns, though, as this particular method is not delegated to the plugin via RPC calls. The new (and modified) interface methods for `RestoreItemAction` are as follows:
```
type BackupItemAction interface {
...
Name() string
...
Progress(operationID string, restore *api.Restore) (velero.OperationProgress, error)
Cancel(operationID string, backup *api.Restore) error
AreAdditionalItemsReady(AdditionalItems []velero.ResourceIdentifier, restore *api.Restore) (bool, error)
...
}
type RestoreItemActionExecuteOutput struct {
UpdatedItem runtime.Unstructured
AdditionalItems []ResourceIdentifier
SkipRestore bool
OperationID string
WaitForAdditionalItems bool
}
```
A new PluginKind, `RestoreItemActionV2`, will be created, and the restore process will be modified to use this plugin kind.
See [Plugin Versioning](plugin-versioning.md) for more details on implementation plans, including v1 adapters, etc.
## Compatibility
The included v1 adapter will allow any existing RestoreItemAction plugin to work as expected, with no-op AreAdditionalItemsReady(), Progress(), and Cancel() methods.
## Implementation
This will be implemented during the Velero 1.11 development cycle.

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Some files were not shown because too many files have changed in this diff Show More