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
Christopher Angelo Phillips
ca6c0a5a3d
Increment logging for item backupper ( #1904 )
...
Signed-off-by: Christopher Phillips <cphillips918@gmail.com >
2019-09-27 13:17:54 -07:00
lintongj
2d845683a2
Add LD_LIBRARY_PATH as an env varible for the use of vsphere plugin ( #1893 )
...
* Add LD_LIBRARY_PATH as an env varible for the use of vsphere plugin
Signed-off-by: Lintong Jiang <lintongj@vmware.com >
2019-09-27 13:10:00 -07: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
Adnan Abdulhussein
dd088e3475
velero API type changes for structural schema CRDs ( #1898 )
...
* velero API type changes for structural schema CRDs
- make optional fields consistent with comment and omitempty struct tags
- adds kubebuilder annotations for structural schema validations
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* update generated crds
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* update velero install to use structural schema generated crds
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* move enum declarations closer to type declarations
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* add labels to generated crds
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* allow null values in some fields
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* allow labelSelector to be null
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* remove debug statement
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* make update
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* add enum validations for CRD phases
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* changelog
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-09-24 18:37:28 -04:00
Adnan Abdulhussein
5e22f9c1c8
Generate CRDs with structural schema ( #1885 )
...
* generating CRDs with controller-tools and embedding in binary
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-09-23 10:25:48 -06:00
Nolan Brubaker
8ec1548b3c
Add features package ( #1849 )
...
* Add features package
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2019-09-18 10:57:04 -06:00
Steve Kriss
fdd04b4d90
GCP: support specifying Cloud KMS key name for backup storage locations ( #1879 )
...
GCP: support specifying Cloud KMS key for backup storage location
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-09-17 16:35:28 -04:00
Steve Kriss
bc60412f29
AWS: add support for arbitrary SSE algorithms, e.g. AES256 ( #1869 )
...
* AWS: add support for arbitrary SSE algorithms, e.g. AES256
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-09-12 10:13:46 -07: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
26e06dae53
fix excluding additional items with the exclude-from-backup label ( #1843 )
...
* fix excluding additional items with the exclude-from-backup label
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-09-10 11:45:55 -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
KubeKween
fc39ac6d51
Add a check to avoid nil pointer ( #1861 )
...
Signed-off-by: Carlisia <carlisia@vmware.com >
2019-09-10 09:29:32 -06:00
Steve Kriss
11190065fd
velero install: wait for restic daemonset to be ready ( #1859 )
...
* velero install: wait for restic daemonset to be ready
Signed-off-by: Steve Kriss <krisss@vmware.com >
* changelog
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-09-09 17:54:47 -04:00
Nolan Brubaker
8da9ef2b03
Make GCP credentials parsing errors less ambiguous ( #1850 )
...
A user encountered the following error on a GCP project:
An error occurred: some backup storage locations are invalid: error getting backup store for location "default": rpc error: code = Unknown desc = invalid character '-' in numeric literal
This error was ambiguous and took some time to track down to the fact
that their credentials file wasn't a JSON file, but instead the contents
of the private key field. This change makes the problem slightly easier
to debug.
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2019-09-09 08:22:00 -06:00
Steve Kriss
29f29f9d61
Merge pull request #1828 from carlisia/c-1826-test-bug
...
Sort mounts in test case to avoid intermittent fail
2019-09-03 12:39:59 -06:00
Carlisia
966222ac0f
Sort mounts in test case to avoid intermitent fail
...
Closes #1826 .
Signed-off-by: Carlisia <carlisia@vmware.com >
2019-08-29 17:55:13 -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
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
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
7ea065a94f
Upgrade kubernetes dependencies to 1.15.3 ( #1808 )
...
* bump kubernetes dependency to 1.15.3
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-08-27 13:58:15 -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
32d46871cc
allow custom restic repo prefix to be specified in BSL config
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-08-22 10:19:22 -06: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
efc0be5e48
Merge pull request #1781 from mesosphere/fix_url
...
fix error formatting
2019-08-22 09:32:14 -06:00
Steven Chung
8ae40b55ec
fix error formatting
...
would interpret % as printf formatted strings
Signed-off-by: Steven Chung <schung@d2iq.com >
2019-08-21 12:49:59 -04:00
KubeKween
b25865f5bb
Revert "allow self signed certs with insecureSkipVerify ( #1769 )"
...
This reverts commit 8e35ce0bde .
Signed-off-by: Carlisia <carlisiac@vmware.com >
2019-08-20 11:02:27 -07:00
Steve Chung
8e35ce0bde
allow self signed certs with insecureSkipVerify ( #1769 )
...
* patch velero to handle self-signed certs on client
you'll get this error otherwise:
x509: certificate signed by unknown authority
Signed-off-by: Steven Chung <schung@d2iq.com >
2019-08-20 10:29:02 -07:00
betta1
cfb663f795
Add the prefix to BSL config map so that object stores can use it when initializing ( #1767 )
...
Signed-off-by: Antony Bett <antony.bett@gmail.com >
2019-08-19 14:05:38 -06:00
Steve Kriss
3c8020e922
Merge pull request #1748 from nrb/fix-1743
...
Use custom namespace when creating Velero clients
2019-08-13 12:08:30 -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
Nolan Brubaker
363c2692a1
Use custom namespace when creating Velero clients
...
The Velero deployment did not have a way of exposing the namespace it
was installed in to the API client. This is a problem for plugins that
need to query for resources in that namespaces, such as the restic
restore process that needs to find PodVolume(Backup|Restore)s.
While the Velero client is consulted for a configured namespace, this
cannot be set in the server pod since there is no valid home directory
in which to place it.
This change provides the namespace to the deployment via the downward
API, and updates the API client factory to use the VELERO_NAMESPACE
before looking at the config file, so that any plugins using the client
will look at the appropriate namespace.
Fixes #1743
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2019-08-13 13:06:12 -04:00
Adnan Abdulhussein
7b7b96de74
velero install: support velero/restic pod cpu/mem requests with unbounded limits ( #1745 )
...
* support velero/restic pod cpu/mem requests with unbounded limits
explicitly treat "0" value as unbounded
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* update flag documentation
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* changelog
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* update restic configmap docs
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-08-09 12:54:04 -06:00
Adnan Abdulhussein
92b930d351
sort GVKs in output
...
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-08-08 15:13:35 -07:00
Adnan Abdulhussein
faef20d45a
ensure backup resource list per gvk is sorted
...
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-08-08 13:53:40 -07:00
Steve Kriss
c69fa4d0e1
bug fix: upload pod volume backups from *all* pods to obj storage
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-08-08 09:27:46 -06: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
Adnan Abdulhussein
4e1b1f9457
use Backup CR labels as tags for snapshots ( #1729 )
...
* use Backup CR labels as tags for snapshots
This allows users to define custom tags to be added to snapshots, by
specifying custom labels on the Backup CR with the `velero backup create
--labels` flag.
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-08-06 13:01: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
Steve Kriss
a590fc9468
refactor GetBackupVolumeSnapshots and GetPodVolumeBackups ( #1721 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-08-05 15:42:01 -06:00
Steve Kriss
539e0b54c6
use the persistent --namespace flag in 'velero install' ( #1722 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-08-05 15:40:39 -06: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
2254635bcb
print resource list metadata in velero backup describe --details ( #1714 )
...
* print resource list metadata in velero backup describe details
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* rewrite TestGetDownloadURL to test more scenarios
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* move backup printer helpers to backup_printer.go
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* move describe printer helpers back to backup_describer
and rename to prefix with describe* to indicate that they are used for the describe command
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* split backup and restore tests for TestGetDownloadURL
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* friendlier error message when backup resource list missing
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-08-05 12:23:20 -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