Nolan Brubaker
6745979a7b
Wait for CRDs to be ready before restoring CRs ( #1937 )
...
* Wait for CRDs to be available and ready
When restoring CRDs, we should wait for the definition to be ready and
available before moving on to restoring specific CRs.
While the CRDs are often ready by the time we get to restoring a CR,
there is a race condition where the CRD isn't ready.
This change waits on each CRD at restore time.
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-01-30 09:19:13 -08:00
Steve Kriss
71201fe929
extract helper func and add unit tests
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-01-21 13:21:28 -07:00
Scott Seago
970f17c1ef
If includeClusterResources is nil/auto, pull in necessary CRDs ( #1831 )
...
Related issue: https://github.com/heptio/velero/issues/1830
This accomplishes everything
that's needed, although there might be room for improvement in avoiding
a GET call for matching CRDs for each resource backed up. An alternative
could be a single call to get all CRDs prior to iterating over resources
and passing this into the backupResource function.
Signed-off-by: Scott Seago <sseago@redhat.com>
2019-10-17 12:31:04 -06:00
Adnan Abdulhussein
e3d64d9dd9
use pointer types for metav1.Time fields ( #1951 )
...
* use pointer types for metav1.Time fields
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
* simpler metav1.Time ptrs
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
* remove test debug println
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-10-14 10:20:28 -06:00
Nolan Brubaker
f009fe9bd1
Add --plugins flag to velero install ( #1930 )
...
* Add plugins flag to install
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-10-03 16:44:52 -07:00
Steve Kriss
48792ece1f
Updates for org move to vmware-tanzu ( #1920 )
...
* update import paths to github.com/vmware-tanzu/...
Signed-off-by: Steve Kriss <krisss@vmware.com>
* update other GH org refs to vmware-tanzu
Signed-off-by: Steve Kriss <krisss@vmware.com>
* site and docs: update GH org to vmware-tanzu
Signed-off-by: Steve Kriss <krisss@vmware.com>
* update travis badge links on docs readmes
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-09-30 17:26:56 -04:00
KubeKween
6b66a49a21
Unit tests for restic restore ( #1747 )
...
* Add unit tests for PVB restore functionality
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Add tests for restore action
Signed-off-by: Carlisia <carlisiac@vmware.com>
* TestRestoreWithRestic wip
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Fix build
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Mockery
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Cleanup mocks
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Remove unused mock
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Use consistent pattern for test building
Signed-off-by: Carlisia <carlisia@vmware.com>
* Test cleanup
Signed-off-by: Carlisia <carlisia@vmware.com>
* Better godoc
Signed-off-by: Carlisia <carlisia@vmware.com>
* Improve test cases
Signed-off-by: Carlisia <carlisia@vmware.com>
* Fix build
Signed-off-by: Carlisia <carlisia@vmware.com>
* Minor test cleanup
Signed-off-by: Carlisia <carlisia@vmware.com>
* New pvb test input names
Signed-off-by: Carlisia <carlisia@vmware.com>
2019-08-27 15:49:23 -07:00
Adnan Abdulhussein
6aa0215137
create backups from schedules using velero create backup ( #1734 )
...
* add --from-schedule to `velero backup create` to create backups from schedules
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-23 13:03:51 -07:00
Nolan Brubaker
a4e70456a1
Add resource limits to restic init container ( #1677 )
...
* Add resource limits to restic init container
Fixes #1201
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Start restic restore item action tests
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Get initial tests for restore action working
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Add new test case
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Move resource parsing into a shared function
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Fetch request/limits from plugin's ConfigMap
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Use builders
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Use moved ParseResourceRequirements function
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Move init container building inline
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Drop CPU limit down a bit and clarify error message
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Fix godoc
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
* Add resource requirements to doc
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-08-05 13:18:11 -06:00
Adnan Abdulhussein
07525bd593
store backup resource list metadata in object storage ( #1709 )
...
* move backedUpItems to pkg/backup.Request struct
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
* construct resource itemKey field from gvk
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
* store backup resource list metadata in object storage
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
* remove debug log
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
* fix formatting
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
* add missing license blocks and split BackupInfo struct lines
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
* add test for checking BackedUpItems matches tarball contents
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
* add comment to explain test
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-05 11:15:55 -06:00
Steve Kriss
f2d06bc5e9
strip leading/trailing slashes from BSL bucket & prefix vals ( #1694 )
...
* strip leading/trailing slashes from BSL bucket & prefix vals
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-31 08:27:12 -07:00
Steve Kriss
4543258970
Update tests to use object builders in pkg/builder ( #1707 )
...
* add pkg/builder with BackupBuilder and ObjectMeta functional options
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-31 07:46:48 -07:00