Steve Kriss
7c60829f38
bug fix: don't restore cluster-scoped resources by default when restoring specific namespaces ( #2118 )
...
* add failing test case for bug
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-12-12 12:45:41 -08:00
Steve Kriss
4fb1bc2ef3
restic: don't try to restore PVBs with no snapshotID ( #2031 )
...
* restic: don't try to restore PVBs with no snapshotID
Signed-off-by: Steve Kriss <krisss@vmware.com>
* changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-11-04 16:18:08 -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
Steve Kriss
2e849dcb99
Fix for #1888 : check item's original namespace, not remapped one, for inclusion/exclusion ( #1909 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-09-25 18:01:16 -07:00
Steve Kriss
e210626a36
create pkg/archive with functionality extracted from pkg/restore ( #1801 )
...
* move pkg/restore's backup extractor to pkg/archive
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-28 18:03:01 -07:00
Steve Kriss
60f9898ca0
restore: rename PV when remapping a namespace if PV exists in-cluster ( #1779 )
...
* rename PV during restore when cloning a namespace
Signed-off-by: Steve Kriss <krisss@vmware.com>
* rename func and vars, switch to if..else
Signed-off-by: Steve Kriss <krisss@vmware.com>
* make pv renamer func configurable for testing purposes
Signed-off-by: Steve Kriss <krisss@vmware.com>
* add unit test cases
Signed-off-by: Steve Kriss <krisss@vmware.com>
* changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
* address review feedback
Signed-off-by: Steve Kriss <krisss@vmware.com>
* address review feedback
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-27 16:42:38 -07: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
Steve Kriss
ffa3251efc
move contents of pkg/util/test into pkg/test
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-07 08:26:00 -06:00
Steve Kriss
80692a8a39
Properly restore PVs with a reclaim policy of Retain and restic backups ( #1713 )
...
* reorganize persistent volume restore code for clarity
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-06 13:40:35 -07:00
KubeKween
4accb8512a
Restore from PodVolumeBackups ( #1723 )
...
* Restore from PodVolumeBackups
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Partially address code reviews
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Partially address code reviews #2
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Clean up struct
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Fix log messages
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Fix tests
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Clean up
Signed-off-by: Carlisia <carlisiac@vmware.com>
* Add changelog
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-08-06 13:17:36 -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
KubeKween
3b9af8c654
Store PodVolumeBackups in obj storage & use as source of truth ( #1577 )
...
* Store PodVolumeBackups in object storage
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-07-24 15:51:20 -04:00
Nolan Brubaker
63964fc6f9
Append "/mount" to directory for CSI volumes ( #1615 )
...
CSI volumes are mounted one level deeper than "native" kubernetes
volumes, and this needs to be appended for proper restic support.
Fixes #1313 .
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-10 15:16:21 -07:00
Steve Kriss
d1025f7547
rename restore_new_test.go to restore_test.go
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-10 09:59:27 -06:00
Steve Kriss
678c02c560
move contents of restore_test.go into other files and delete it
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-10 09:59:01 -06:00
Steve Kriss
adb93c33b1
migrate restore PV tests
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-03 08:50:09 -06:00
Steve Kriss
db393ec199
properly filter additional items returned from restore item actions
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-28 08:59:23 -06:00
Steve Kriss
022099a62e
Refactor pkg/restore tests (part 3) ( #1611 )
...
* add modifying restore item action tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
* add restore item action additional items tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
* migrate ShouldRestore test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-27 15:43:59 -07:00
Steve Kriss
75a96dfa92
fix bugs in finding applicable restore item actions
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-27 13:06:16 -06:00
Steve Kriss
81c2adc059
Refactor pkg/restore tests (part 2) ( #1606 )
...
* update TestPrioritizeResources to use real discovery helper
Signed-off-by: Steve Kriss <krisss@vmware.com>
* migrate invalid tarball contents tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
* migrate item restore tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
* migrate restore item action tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-27 11:57:47 -07:00
Steve Kriss
0089fa4d93
migrate restore resource priorities test
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-26 10:24:02 -06:00
Steve Kriss
5d8ba1b90d
migrate namespace mapping tests
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-24 16:57:30 -06:00
Steve Kriss
1a339f06ac
migrate restore resource filtering tests
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-24 15:53:15 -06:00
Nolan Brubaker
67512a3808
Merge pull request #1595 from skriss/restore-test-refactor-1
...
initial refactoring for pkg/restore tests
2019-06-24 17:08:51 -04:00
Steve Kriss
0d326a3903
remove unused hasControllerOwner func and tests
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-21 11:44:13 -06:00
Steve Kriss
d421fcd85c
initial structure for refactored pkg/restore tests
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-21 09:15:18 -06:00
Anshul Chandra
4e12b08953
Validate restore name label length
...
Velero should handle cases when the label length exceeds 63 characters.
- if the length of the backup/restore name is <= 63 characters, use it as the value of the label
- if it's > 63 characters, take the SHA256 hash of the name. the value of
the label will be the first 57 characters of the backup/restore name
plus the first six characters of the SHA256 hash.
Fixes heptio#1021
Signed-off-by: Anshul Chandra <anshulc@vmware.com>
2019-05-01 10:25:11 -07:00
Steve Kriss
3155bb159f
remove VolumeBackupInfo from API pkg ( #1388 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-24 13:16:03 -07:00
Steve Kriss
5bc6695109
move RestoreResult from api to pkg/restore, rename to Result
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-16 12:57:02 -06:00
Steve Kriss
c59544cb79
remove backup.status.volumeBackups and all related code
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:40 -06:00
Steve Kriss
9b635c0e14
add additionalItems to restore item actions ( #1304 )
...
* add additionalItems to restore item actions
Signed-off-by: Steve Kriss <krisss@vmware.com>
Co-authored-by: Andy Goldstein <goldsteina@vmware.com>
2019-03-28 12:21:56 -07:00
Steve Kriss
bb9c3f6a1a
rename BlockStore to VolumeSnapshotter
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-27 14:55:28 -06:00
Steve Kriss
a111eed2af
update license headers to Velero contributors ( #1302 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-20 12:32:48 -07:00
KubeKween
73514a003b
Move plugin interfaces to same package ( #1264 )
...
* Move plugin interfaces to same package
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-14 16:35:06 -04:00
Nolan Brubaker
394548afcd
Merge pull request #1254 from skriss/remove-wait-for-pv
...
remove restore code that waits for a PV to become Available
2019-03-11 13:20:59 -04:00
Michal Wieczorek
1354e2b6ff
Add original item to restore plugin interface
...
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl>
2019-03-05 17:09:42 -08:00
Steve Kriss
e29aa74a23
remove restore code that waits for a PV to become Available
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-05 17:04:52 -07:00
Steve Kriss
88e6a740f2
move pvRestorer and tests to their own files
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-01 15:07:25 -07:00
Nolan Brubaker
fcf21813a5
Merge pull request #1246 from skriss/preserve-storageclass
...
when restoring a PV, don't remove its spec.storageClassName
2019-02-28 18:02:20 -05:00
Steve Kriss
21c57c46b3
when restoring a PV, don't remove its spec.storageClassName
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 14:34:36 -07:00
Steve Kriss
780dc4551f
fix compile err & test
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:45:04 -07:00
Steve Kriss
38ad7d71f5
pkg/restore: remove usage of pkg/util/collections
...
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:20:41 -07:00
Nolan Brubaker
890202f2e4
Wait for PV/namespace to delete before restore
...
If a PV already exists, wait for it, it's associated PVC, and associated
namespace to be deleted before attempting to restore it.
If a namespace already exists, wait for it to be deleted before
attempting to restore it.
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-06 15:43:50 -05:00
Nolan Brubaker
43714caaec
Rename Ark to Velero!!!
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-04 17:35:22 -05:00
Michal Wieczorek
43cd2ca36f
Delete spec.priority in pod restore action
...
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl>
2018-11-22 09:54:49 +01:00
Andy Goldstein
3788014552
Fix check for non-found PV
...
We were checking for nil, but were getting back an empty
*unstructured.Unstructured{} instead, along with a NotFound error.
Change the logic to check for the NotFound error instead of a nil
object.
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-11-08 10:56:14 -05:00
Nolan Brubaker
6231aaa875
Verify PV doesn't exist before creating new volume
...
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-10-30 13:57:00 -04:00
Steve Kriss
195e6aaf00
fix bug preventing PV snapshots from v0.10 backups from restoring
...
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-23 12:44:05 -06:00
Andy Goldstein
bca585162f
Run 'make update' to update formatting
...
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-10-23 13:08:42 -04:00
Steve Kriss
90d9be59d3
support restoring/deleting legacy backups with .status.volumeBackups
...
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-23 09:55:40 -06:00