Nolan Brubaker
eefd12b3e4
Rename CSI variables to be more descriptive
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
b567859655
Add data description for encoding JSON in case of error
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
d31951c81c
Add CSI feature flag constant
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
15d4c11305
Wrap CSI lister access in a nil check
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
6c3fc8c780
Addresss simple review feedback
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
9372eaa31b
Reduce duplication in object serialization
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
9c1a2e884b
Update comments
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
5202885349
Remove unused CSI client variable
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
c71318bf19
Address more review feedback
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:17 -04:00
Nolan Brubaker
aff529e5d5
Upload CSI volumesnapshots associated with backup
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:17 -04:00
Nolan Brubaker
6a7beaf5ce
Plumb CSI listers through to backup controller
...
Account for having CSI enabled or not, as well as having the snapshot
CRDs installed in the kubernetes cluster.
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:17 -04:00
Nolan Brubaker
232e1d8927
Add clients for CSI snapshots
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:17 -04:00
Nolan Brubaker
b4be7eccb9
Document locations for CSI support
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:17 -04:00
Nolan Brubaker
67322d555e
Write kubernetes version info to annoations
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-14 17:11:04 -04:00
Samuel Lucidi
4d49b5971c
Support setting a custom CA bundle to use with a BackupStorageLocation ( #2353 )
...
* Support setting a custom CA certificate for a BSL
Signed-off-by: Sam Lucidi <slucidi@redhat.com >
* update CRDS
Signed-off-by: Sam Lucidi <slucidi@redhat.com >
* Add changelog for #2353
Signed-off-by: Sam Lucidi <slucidi@redhat.com >
* Clean up temp file from TestTempCACertFile
Signed-off-by: Sam Lucidi <slucidi@redhat.com >
2020-03-24 15:50:48 -06:00
Rafael Brito
f6cd53c6cb
Adding k8s version labels on backup CRD #2342 ( #2346 )
...
Signed-off-by: Rafael Brito <rbrito@vmware.com >
2020-03-19 09:18:05 -07:00
Steve Kriss
c7f283c7fa
wait for informer caches to sync before running controllers
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2020-03-03 15:55:17 -07:00
JenTing Hsiao
b4446bd358
Fix restic backup volume snapshot to the second location failed ( #2244 )
...
* Fix restic backup volume snapshot to the second location failed
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com >
2020-02-19 11:01:21 -08:00
Ashish Amarnath
ec22f2c88d
Merge pull request #2196 from skriss/fix-1777
...
recompute backup_last_successful_timestamp metric during resync
2020-01-21 17:01:51 -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
aa44cf1c32
Check for nil LastMaintenanceTime in dueForMaintenance ( #2200 )
...
* Check for nil LastMaintenanceTime in dueForMaintenance
ResticRepository.dueForMaintenance causes a panic in the velero pod
("invalid memory address or nil pointer dereference") if
repository.Status.LastMaintenanceTime is nil. This fix returns 'true'
if it's nil, so the repository is due for maintenance if LastMaintenanceTime
is nil *or* the time elapsed since the last maintenance is greater than
repository.Spec.MaintenanceFrequency.Duration
Signed-off-by: Scott Seago <sseago@redhat.com >
* changelog for PR#2200
Signed-off-by: Scott Seago <sseago@redhat.com >
2020-01-15 12:06:16 -05:00
Steve Kriss
9fa302aa8b
recompute backup_last_successful_timestamp metric during resync
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2020-01-14 14:11:21 -07:00
Dinesh Yadav
83ef4eb4d0
Support AWS_PROFILE for restic backups/restore operations ( #2096 )
...
* Support AWS_PROFILE for restic backups/restore operations
It enables Velero to switch credentials if multiple s3-compatible
backupLocations are present.
Signed-off-by: dinesh <dinesh1042@gmail.com >
* better comments and fixing typos
Signed-off-by: dinesh <dinesh1042@gmail.com >
* add changelog entry
Signed-off-by: dinesh <dinesh1042@gmail.com >
2019-12-09 09:46:02 -05:00
Antony S Bett
121dc02d2f
Ensure object store plugin processes are cleaned up after restore and after BSL validation during server start up ( #2041 )
...
* Ensure child object store plugin processes are cleaned up during restore
Signed-off-by: Antony Bett <antony.bett@gmail.com >
2019-11-05 08:58:08 -08:00
Antony S Bett
0450567bba
Allow backup storage locations to specify backup sync period or toggle off sync ( #1936 )
...
* Allow backup storage locations to specify backup sync period or toggle off sync
Signed-off-by: Antony Bett <antony.bett@gmail.com >
* Add --backup-sync-period flag to backup location create command
Signed-off-by: Antony Bett <antony.bett@gmail.com >
2019-10-24 08:32:45 -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
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
d96186473c
sync controller: replace revision file with full diff each interval ( #1892 )
...
* backup sync controller: replace revision file with full diff each interval
Signed-off-by: Steve Kriss <krisss@vmware.com >
* remove getting/setting of metadata/revision file
Signed-off-by: Steve Kriss <krisss@vmware.com >
* changelog
Signed-off-by: Steve Kriss <krisss@vmware.com >
* tweak logging
Signed-off-by: Steve Kriss <krisss@vmware.com >
* don't keep podVolumeBackup log field around after syncing PVBs
Signed-off-by: Steve Kriss <krisss@vmware.com >
* update generated CRDs
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-09-27 16:23:11 -04:00
Adnan Abdulhussein
23376e6293
record restic restore progress in PodVolumeRestore ( #1854 )
...
* record restic restore progress in PodVolumeRestore
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* add progress output to velero describe restore --details
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* test getVolumeSize
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* block on send to finish goroutine
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* remove sync import
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* add changelog
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* make update
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-09-10 15:50:57 -06:00
Steve Kriss
6623e1f273
Change restic prune default interval to 7d and make user-configurable ( #1864 )
...
* change restic prune default interval to 7d, add server flag for it
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-09-10 11:58:42 -07:00
Adnan Abdulhussein
1e182e5837
record restic backup progress in PodVolumeBackup ( #1821 )
...
* record restic backup progress in PodVolumeBackup
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-09-10 11:28:19 -07:00
Steve Kriss
ef911ff21b
when backing up PVCs with restic, explicitly specify --parent ( #1807 )
...
* when backing up PVCs with restic, explicitly specify --parent
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 >
2019-08-27 16:37:51 -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
Steve Kriss
686f41ebec
remove calls to restic check before/after prune ( #1794 )
...
* remove calls to restic check before/after prune
Signed-off-by: Steve Kriss <krisss@vmware.com >
* changelog
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-08-23 10:53:00 -07:00
Steve Kriss
8b6c505817
error if restic repo identifier can't be determined
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-08-22 10:19:22 -06:00
Steve Kriss
5ef0a84128
create pod volume backups in backup's namespace during sync ( #1760 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-08-13 10:20:25 -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
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
6522ba7c42
fix bugs preventing pod volume backups from syncing properly
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-08-06 09:23:49 -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
b24a603711
periodically check for stale restic repo locks ( #1708 )
...
* periodically check for stale restic repo locks
Signed-off-by: Steve Kriss <krisss@vmware.com >
* changelog
Signed-off-by: Steve Kriss <krisss@vmware.com >
* only try to init a restic repo if it doesn't already exist
Signed-off-by: Steve Kriss <krisss@vmware.com >
* reword comment
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-07-31 10:52:23 -07: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
carthewd
22eca22ac8
Add JSON as an option for log output ( #1654 )
...
* Add JSON as an option for log output
Signed-off-by: Donovan Carthew <donovan.carthew@gmail.com >
2019-07-30 16:29:34 -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
Adnan Abdulhussein
2156124dfc
record PodVolumeBackup/Restore start and completion timestamps ( #1609 )
...
* record PodVolumeBackup start and completion timestamps
adds startTimestamp and completionTimestamp fields to the
PodVolumeBackup status spec
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* record PodVolumeRestore start and completion timestamps
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-06-28 11:58:02 -04:00
Steve Kriss
19052994ed
replace TestBackup with pkg/backup.Builder ( #1593 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-06-21 17:08:08 -04:00
Adnan Abdulhussein
d6c60b2dd5
fix panic when processing DeleteBackupRequest objs without labels ( #1556 )
...
This fix initialises an empty map if the request object's Labels map
is nil, allowing the controller to later add and modify labels on the
object.
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-06-10 10:04:51 -07:00
KubeKween
0a771e6a53
Add cmd to list plugins ( #1535 )
...
* Add cmd to list plugins
Signed-off-by: Carlisia <carlisiac@vmware.com >
2019-06-05 13:41:02 -04:00