Steve Kriss
9e19c1d3bd
fix goimport noise in prep for bump to latest
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2020-03-02 10:55:08 -07:00
Nolan Brubaker
766ab5d3ee
Account for possible missing schemas on v1 CRDs ( #2264 )
...
* Account for possible missing schemas on v1 CRDs
If a v1beta1 CRD without a Schema was submitted to a Kubernets v1.16
cluster, then Kubernetes will server it back as a v1 CRD without a
schema.
However, when Velero tries to restore this document, the request will be
rejected as a v1 CRD must have a schema.
This commit has some defensive coding on the restore side, as well as
potential fixes on the backup side for getting around this.
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Back up nonstructural CRDs as v1beta1
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add tests for remapping plugin
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add builders for v1 CRDs
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Address review feedback
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Remove extraneous log message
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add changelog
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-02-24 12:07:50 -07:00
Steve Kriss
44d3f91e97
backup describer: reword resource list not found msg
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2020-02-06 11:40:15 -07:00
Ashish Amarnath
21264a11ec
Merge pull request #2218 from cpanato/GH-1168
...
remove schedule validation
2020-01-31 13:00:24 -08:00
Carlos Panato
42b6126458
update variable name
...
Signed-off-by: Carlos Panato <ctadeu@gmail.com >
2020-01-31 09:22:46 +01:00
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
Carlos Panato
f7adc4dfd1
check if schedule have a backup
...
Signed-off-by: Carlos Panato <ctadeu@gmail.com >
2020-01-29 18:24:32 +01:00
Carlos Panato
445b5b781e
remove schedule validation
...
Signed-off-by: Carlos Panato <ctadeu@gmail.com >
2020-01-29 18:24:32 +01:00
Nolan Brubaker
5b1280c2cd
Fix restore issues for CRD v1 on Kubernetes v1.16 clusters ( #2197 )
...
Fix restore issues for CRD v1 on Kubernetes v1.16 clusters
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-01-27 13:59:08 -08:00
Steve Kriss
04d8b47d3e
update to k8s 1.17 deps and fix breaks ( #2180 )
...
* update to k8s 1.17 deps
Signed-off-by: Steve Kriss <krisss@vmware.com >
2020-01-10 08:55:58 -08:00
Ashish Amarnath
408c0dfb5a
Add documentation for velero install cli ( #2155 )
...
* Add documentation for velero install cli
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* mirror doc changes into v1.2.0
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
2020-01-06 13:13:02 -07:00
Steve Kriss
be140985c5
bug fix: only prioritize restoring replicasets.apps ( #2157 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-12-19 09:44:08 -08:00
Steve Kriss
96297ea437
add replicasets.apps to prioritized restore resources ( #2120 )
...
* add replicasets.apps to prioritized restore resources
Signed-off-by: Steve Kriss <krisss@vmware.com >
* changelog
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-12-11 15:32:33 -05:00
Steve Kriss
e5a85f140a
use field selector on name when watching download requests ( #2065 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-11-14 16:50:24 -08: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
Adnan Abdulhussein
636a5b9db6
add velero install --crds-only to easily update CRDs ( #2038 )
...
* add velero install --crds-only to easily update CRDs
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
* make update
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-11-04 14:36:04 -08:00
Steve Kriss
0c1fc8195a
add --allow-partially-failed flag to velero restore create ( #1994 )
...
* add --allow-partially-failed flag to velero restore create
Signed-off-by: Steve Kriss <krisss@vmware.com >
* remove extraneous client creation
Signed-off-by: Steve Kriss <krisss@vmware.com >
* add godoc to helper func
Signed-off-by: Steve Kriss <krisss@vmware.com >
* todo
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-10-24 14:20:57 -07: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
KubeKween
d26bf05b33
Extract providers ( #1985 )
...
* Remove cloud providers and reorg code
Signed-off-by: Carlisia <carlisia@vmware.com >
* Update dependencies
Signed-off-by: Carlisia <carlisia@vmware.com >
* Fix tests
Signed-off-by: Carlisia <carlisia@vmware.com >
* fix dependency issues
Signed-off-by: Carlisia <carlisia@vmware.com >
* Delete dup test
Signed-off-by: Carlisia <carlisia@vmware.com >
* Add back spaces to file
Signed-off-by: Carlisia <carlisia@vmware.com >
* Remove and update docs
Signed-off-by: Carlisia <carlisia@vmware.com >
* Make the plugins flag required
Signed-off-by: Carlisia <carlisia@vmware.com >
* Add changelog
Signed-off-by: Carlisia <carlisia@vmware.com >
* Make the plugins flag conditional
Signed-off-by: Carlisia <carlisia@vmware.com >
2019-10-22 15:31:27 -07:00
Alexander Demichev
1564317cef
Restore action for cluster/namespace role bindings ( #1974 )
...
Signed-off-by: Alexander Demichev <ademicev@redhat.com >
2019-10-21 15:11:26 -06:00
FrankChen7
ae33441500
Add --no-default-storage-location flag to velero install to enable velero deployment without default BSL ( #1931 )
...
This closes #1853 .
Signed-off-by: Yunqian <specyq@gmail.com >
2019-10-18 08:41:59 -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 Chung
db59d8d4bc
Revert "Revert "allow self signed certs with insecureSkipVerify"" ( #1793 )
...
* handle self-signed certs with insecureSkipTLSVerify server config
Signed-off-by: Steven Chung <schung@d2iq.com >
2019-10-03 13:46:46 -07:00
Joshua Wong
46822aea2c
Add support for GKE Workload Identity ( #1810 )
...
* Allow the velero server to be created on GCP even without a provided service account key in order to support workload identity and default compute engine credentials. Add option for adding service account annotations.
Signed-off-by: Joshua Wong <joshua99wong@gmail.com >
2019-10-03 13:45:18 -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
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
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
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
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
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
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
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
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
Nolan Brubaker
635dd27e1a
Make secret file optional on install ( #1699 )
...
* Make secret file optional on install
Fixes #1689
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2019-08-01 15:57:36 -07:00
Adnan Abdulhussein
2a6929d453
add velero install flags for configuring restic resource requirements ( #1710 )
...
* add velero install flags for configuring restic resource requirements
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-07-31 12:24:47 -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
Adnan Abdulhussein
248ee89123
add configurable CPU/memory requests/limits for velero pod on install ( #1678 )
...
* add configurable CPU/memory requests/limits for velero pod on install
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com >
2019-07-29 15:13:06 -04: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
Steve Kriss
3c4dd3e526
fix typo in schedule create example ( #1693 )
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2019-07-23 11:02:38 -07:00
Nolan Brubaker
5f409f12c8
Document --pod-annotations install argument ( #1674 )
...
* Document --pod-annotations install argument
Fixes #1667
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Revert v1.0.0 edits
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Make pod annotations example commands complete
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2019-07-19 12:12:57 -07:00