Steve Kriss and KubeKween
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 and Nolan Brubaker
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 and KubeKween
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 and Adnan Abdulhussein
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 and Adnan Abdulhussein
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 and GitHub
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 and KubeKween
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
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 and KubeKween
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 and Nolan Brubaker
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 and GitHub
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 and Carlisia
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 and GitHub
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 and 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 and Andy Goldstein
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
Wayne Witzel III and Steve Kriss
406b50a71b
update restore process using snapshot locations
...
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com >
2018-10-17 13:40:42 -06:00
Michal Wieczorek
0f1c5c283f
Enable restoring resources with ownerReference set
...
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl >
2018-10-02 12:04:51 +02:00
Steve Kriss
729a688b36
remove restore log helper for accurate line #'s
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-09-30 14:45:32 -06:00
Nolan Brubaker and GitHub
65cd5c602f
Merge pull request #754 from skriss/namespace-restore-label
...
update how we label restored objects
2018-08-09 15:17:50 -04:00
Steve Kriss
95b2b90006
add backup name label to restored objects
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-08-08 16:51:33 -07:00
Steve Kriss
0c3ac67b6d
start using a namespaced label on restored objects, deprecate old label
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-08-08 16:34:39 -07:00
Steve Kriss and GitHub
1f7a4a1665
Merge pull request #712 from timoreimann/preserve-node-ports-when-specified-in-annotation
...
Preserve node ports during restore when annotations hold specification.
2018-08-07 09:17:27 -07:00
Timo Reimann
3aa241a74c
Preserve node ports during restore when annotations hold specification.
...
This is to better reflect the intent of the user when node ports are
specified explicitly (as opposed to being assigned by Kubernetes). The
`last-applied-configuration` annotation added by `kubectl apply` is one
such indicator we are now leveraging.
We still default to omitting the node ports when the annotation is
missing.
Signed-off-by: Timo Reimann <ttr314@googlemail.com >
2018-08-07 07:47:17 +02:00
Steve Kriss
1c26fbde32
remove SnapshotService, replace with direct BlockStore usage
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-07-31 08:58:11 -07:00
Andy Goldstein
255a991c6e
Stop restoring mirror pods
...
Mirror pods are pods created from static manifest files on a node.
They're mirrored to the apiserver so they're visible when querying the
apiserver for a list of pods, but it's not possible to send a pod
containing the mirror pod annotation to the apiserver and have it be
created successfully. Instead of trying to do this, log a message that
we're skipping restoring the pod because it's a mirror pod.
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com >
2018-06-28 10:06:55 -04:00