Nolan Brubaker and GitHub
c1494d6804
Tweak VolumeSnapshotContent describe output ( #2534 )
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-05-12 13:58:47 -07:00
Nolan Brubaker and GitHub
e400be9c8f
Include CSI volume snapshot information in velero backup describe ( #2448 )
...
* Add download methods for CSI objects
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add support for downloading CSI volume objects
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add new methods to mock.
Remove generated information from file since mockery no longer appears
to work. It isn't maintained anymore and doesn't support go module-based
projects.
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add describe command for CSI
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add csi package with helpers
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Remove duplicate import from server
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Remove CSI API that will not be used with describe
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add VolumeSnapshotContents output to describe command
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Document NewCSIListOptions function
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Document csi package
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Remove stutter in function name
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Fix CI
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Fix nil pointer error when not using CSI snapshots
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Remove unused CSI download request kinds
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add back mocks
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Change persistent volumes to velero-native snapshots
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Remove unused function
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Address review feedback
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add changelog
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Remove unnecessary doc.go
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-05-08 12:42:30 -07:00
Nolan Brubaker and GitHub
de8962ea18
Bug fix: Calculate label using backup name for CSI objects ( #2510 )
...
* Use a helper function when querying w/ backup label
Setting or querying for a backup label name should always pass the value
through the GetValidName function. This change passes query uses of the
backup label value through the GetValidName function by introducing 2
new helpers, one for making a Selector, one for making a ListOptions.
It also removes functions returning the same data, but under
unecessarily specific names.
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Document using the label.GetValidName function
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Update copyright year
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Clarify labels.GetValidName and annotations
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Move functions to pkg/label
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Fix function comments
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-05-07 11:56:13 -07:00
Nolan Brubaker and GitHub
abae81ddc8
Merge pull request #2440 from skriss/backup-progress
...
report backup progress
2020-05-07 14:51:20 -04:00
Ashish Amarnath and GitHub
911a607cf8
Allow feature flags to be passed from install CLI ( #2503 )
...
* allow feature flags to be passed from install CLI
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
2020-05-06 10:52:44 -07:00
Ashish Amarnath and GitHub
577e87d1b8
Sync CSI API objects during backup sync ( #2496 )
...
* add changelog
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* Sync CSI API volumesnapshotcontents during backup sync
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
2020-05-06 08:00:05 -06:00
Nolan Brubaker and GitHub
8671a639c9
Backup entire v1beta1 CRD instead of just changing version string ( #2478 )
...
* Switch to backing up v1beta1 CRDs from API server
Instead of simply switching out the APIVersion string on a v1
CustomResourceDefinition object, re-download the object from the API
server entirely to get the correct fields.
This should fix validation errors upon restore.
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Fix existing tests
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add full example CRDs to automated tests
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Move beta CRD lookup into helper function
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add case for preserveUnknownFields CRDs
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add PreserveUnknownFields case and refactor execute
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add older prometheus CRD test cases
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
* Add changelog
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-05-05 13:21:28 -07:00
Ashish Amarnath and GitHub
6b5a084f32
Delete dangling volumesnapshotcontents from velero backups ( #2480 )
...
* Delete dangling volumesnapshotcontents from velero backups
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* add changelog
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* handle not found errors from VSC delete
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* clean up unit tests
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
2020-05-04 15:41:27 -04:00
Steve Kriss
4b0f654a1e
add progress info to backup status
...
Signed-off-by: Steve Kriss <krisss@vmware.com >
2020-05-01 15:30:50 -06:00
Ashish Amarnath and GitHub
bf52caf658
Delete CSI volumesnapshots created as part of a backup in its deletion ( #2411 )
...
* delete CSI volumesnapshots in backup on backup delete
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* set vsc deletionpolicy to delete prior to vs deletion
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* add more unit tests
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* add change log
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* passes build need to pass unit tests
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* remove GetNamespacesInBackup
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* fix unit tests
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* check feature flag instead of nil check
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
* cleanup
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
2020-05-01 16:05:20 -04:00
98d2fc732e
clarify the wording for restore describe for namespaces included ( #2449 )
...
* clarify the wording for restore describe for namespaces included
Instead of showing it as "*" explicitly mention that all the namespaces
from the backup object are included.
refer to https://github.com/vmware-tanzu/velero/issues/1918
Signed-off-by: Raghavendra M <raghavendra@redhat.com >
* Update pkg/cmd/util/output/restore_describer.go
Co-Authored-By: Ashish Amarnath <ashisham@vmware.com >
Signed-off-by: Raghavendra M <raghavendra@redhat.com >
* Update pkg/cmd/util/output/restore_describer.go
Co-Authored-By: Ashish Amarnath <ashisham@vmware.com >
Signed-off-by: Raghavendra M <raghavendra@redhat.com >
Co-authored-by: Ashish Amarnath <ashisham@vmware.com >
2020-04-24 14:44:20 -07: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
ad18318bb1
Rename snapshotter factory variable, return nil in wrapper
...
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
5202885349
Remove unused CSI client variable
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
9719e4de9d
Don't defer cancelFunc, since it causes issues
...
Infomers won't start if cancelFunc is invoked as soon as the newServer
function exits via the defer
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
b7142465fc
Wrap usage of the CSI informer in flag checks
...
Signed-off-by: Nolan Brubaker <brubakern@vmware.com >
2020-04-20 13:49:18 -04:00
Nolan Brubaker
5de15c450b
Address some review feedback on server
...
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
Samuel Lucidi and GitHub
c8223608ba
Add --cacert flag to velero cli commands ( #2364 )
...
* Add --cacert flag to velero cli commands
Adds a --cacert flag to the log and describe commands
that takes a path to a PEM-encoded certificate bundle
as an alternative to --insecure-skip-tls-verify for
dealing with self-signed certificates.
Signed-off-by: Sam Lucidi <slucidi@redhat.com >
2020-04-03 08:02:41 -07:00
Mayank and GitHub
016868ecd3
add restore item action to update PVC selected-node annotation ( #2377 )
...
* New RestoreItemAction for PVC with annotation `volume.kubernetes.io/selected-node`
Signed-off-by: mayank <mayank.patel@mayadata.io >
2020-04-03 08:01:34 -07:00
Samuel Lucidi and GitHub
02b5578810
Add --cacert flag to the installer ( #2368 )
...
* Add --cacert flag to the installer
Allows setting the cacert field on the BSL during
the install process using the file at the path
specified by the --cacert field.
Signed-off-by: Sam Lucidi <slucidi@redhat.com >
* Add changelog for #2368
Signed-off-by: Sam Lucidi <slucidi@redhat.com >
2020-03-31 14:48:16 -06:00
Rafael Brito and GitHub
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
Nolan Brubaker and GitHub
ed42d5a9f1
Merge pull request #2318 from ashish-amarnath/csi-core-changes
...
Add CSI snapshot API types into default restore priorities
2020-03-06 13:53:43 -05:00
Ashish Amarnath
b7cbc4873e
add csi types into restore priorities
...
Signed-off-by: Ashish Amarnath <ashisham@vmware.com >
2020-03-06 10:37:03 -08:00
Nolan Brubaker and GitHub
fd95a59cf7
bug fix: don't panic on nil restic repo maintenance time ( #2315 )
...
* bug fix: don't panic on nil restic repo maintenance time
Signed-off-by: Steve Kriss <krisss@vmware.com >
* changelog
Signed-off-by: Steve Kriss <krisss@vmware.com >
2020-03-05 17:11:59 -05: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
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 and GitHub
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 and GitHub
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 and GitHub
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 and Carlisia Campos
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 and Carlisia Campos
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 and Steve Kriss
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 and Carlisia Campos
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 and Nolan Brubaker
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 and Adnan Abdulhussein
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 and KubeKween
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 and GitHub
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 and Adnan Abdulhussein
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 and Steve Kriss
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 and Adnan Abdulhussein
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 and Steve Kriss
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 and Steve Kriss
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 and Steve Kriss
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