Commit Graph

1321 Commits (ba50458ae283f2518a2f245a9c2336be25e431a3)

Author SHA1 Message Date
Ashish Amarnath ecab583680
🐛 Do not run ItemAction plugins for unresolvable types for all types (#3059)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-11-11 09:50:57 -05:00
Mateusz Gozdek dbc83af77b
Fix various typos found by codespell (#3057)
By running the following command:

codespell -S .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico -L \
iam,aks,ist,bridget,ue

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2020-11-10 11:48:35 -05:00
Ashish Amarnath dc6762a895
🐛 Use namespace and name to match PVB to Pod restore (#3051)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-11-10 11:36:49 -05:00
Mayank 68a4b23722
fixing 'velero.io/change-pvc-node-selector' plugin to fetch configmap using plugin name (#2970)
* fixing label for 'velero.io/change-pvc-node-selector' plugin in site document

Signed-off-by: mayank <mayank.patel@mayadata.io>

* Fixing "velero.io/change-pvc-node-selector" to fetch config using plugin name

Signed-off-by: mayank <mayank.patel@mayadata.io>

* adding changelog

Signed-off-by: mayank <mayank.patel@mayadata.io>
2020-11-04 11:45:39 -08:00
Ashish Amarnath 1be97a2b04
🏃‍♂ Improve log message clarity (#3047)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-11-02 13:39:32 -08:00
Bridget McErlean 4178d9de32
Add additional printer columns for CRDs (#2881)
This change modifies the kubebuilder annotations for the Velero CRDs to
include `additionalPrinterColumns` so that more information is exposed
when using `kubectl get`.

For each of the CRDs, annotations have been added to make the output
for `kubectl get` match the output from the equivalent `velero get`
command as closely as possible. There are some cases where this output
could not be replicated, such as the `EXPIRES` column for Backups, due
to the limitations of JSONPath expressions within the resulting CRD
defition. Some columns undergo processing and formatting before being
printed by the Velero CLI which cannot be replicated using JSONPath. In
these cases, these printer columns have been omitted.

For other CRDs where there is no `velero get` equivalent, such as
`PodVolumeBackup` and `PodVolumeRestore`, a best effort has been made to
expose information that provides value.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2020-10-27 15:19:33 -07:00
Hariharan df982c9fc9
Add warning to velero version cmd. Fixes #3017 (#3024)
Signed-off-by: Hariharan <cvhariharan@protonmail.com>
2020-10-23 17:33:13 -04:00
Piper Dougherty 60ff351269
Adding fix for restic init container index on restores. (#3011)
* Adding handling of restic-wait init container at any order with warning.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>

* Adding newline at end of files to match convention.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>

* Formatting.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>

* Update copyright year on modified files.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>
2020-10-21 15:15:03 -07:00
Nolan Brubaker 28a46d3a8b
Ensure PVs and PVCs remain bound when doing a restore (#3007)
* Only remove the UID from a PV's claimRef

The UID is the only part of a claimRef that might prevent it from being
rebound correctly on a restore. The namespace and name within the
claimRef should be preserved in order to ensure that the PV is claimed
by the correct PVC on restore.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Remap PVs claimRef.namespace on relevant restores

When remapping namespaces, any included PVs need to have their claimRef
updated to point remapped namespaces to the new namespace name in order
to be bound to the correct PVC.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Update tests and ensure claimRef namespace remaps

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Remove lowercased uid field from unstructured PV

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Fix issues that prevented PVs from being restored

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add changelog

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Dynamically reprovision volumes without snapshots

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Update test for lower case uid field

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Remove stray debugging print statement

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Fix typo, remove extra code, add tests.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-10-15 16:57:43 -07:00
Alay Patel 467f5fb723
create CRB with velero-<namespace> (#2886)
* create CRB with velero-<namespace>

This will allow creating multiple instances of velero,
across two different namespaces

Signed-off-by: Alay Patel <alay1431@gmail.com>

* add changelog

Signed-off-by: Alay Patel <alay1431@gmail.com>

* add package var DefaultVeleroNamespace and use it wherever needed

Signed-off-by: Alay Patel <alay1431@gmail.com>
2020-10-13 16:13:42 -07:00
Antony S Bett 35d25c81ec
Fix BSL controller to avoid invoking init() on all BSLs regardless of ValidationFrequency (#2992)
Signed-off-by: Bett, Antony <antony.bett@dell.com>
2020-10-13 12:10:32 -07:00
Carlisia Thompson c6aa54a009
Fix version cmd getting nil pointer (#2996)
Signed-off-by: Carlisia <carlisia@vmware.com>
2020-10-12 16:17:10 -04:00
Carlisia Thompson e69fac153b
Centralize + rename controller names and list (#2936)
* Centralize + rename controller names and list

Signed-off-by: Carlisia <carlisia@vmware.com>

* Rename file

Signed-off-by: Carlisia <carlisia@vmware.com>

* Reset restic-repo name

Signed-off-by: Carlisia <carlisia@vmware.com>

* Reset gc controller name

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-10-06 13:58:56 -04:00
Scott Seago d820bc5e72
restore proper lowercase/plural CRD resource (#2949)
* restore proper lowercase/plural CRD resource

This commit restores the proper resource string
"customresourcedefinitions" for CRD. The prior change to
"CustomResourceDefinition" was made because this was being used
in another place to populate the CRD "Kind" field in
remap_crd_version_action.go -- there, just use the correct Kind
string instead of pulling from Resource.

Signed-off-by: Scott Seago <sseago@redhat.com>

* add changelog

Signed-off-by: Scott Seago <sseago@redhat.com>
2020-10-02 09:48:12 -04:00
Ashish Amarnath cfc4651078
🏃‍♂️ add shortnames for CRDs (#2911)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-09-10 12:28:17 -07:00
JenTing Hsiao cd31141b93
Show format version on velero backup describe (#2901)
* Show format version on velero backup describe

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>

* Add changelog

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2020-09-08 16:08:56 -04:00
Andrew Reed 0547b1d945
Restore hooks exec (#2804)
* Exec hooks in restored pods

Signed-off-by: Andrew Reed <andrew@replicated.com>

* WaitExecHookHandler implements ItemHookHandler

This required adding a context.Context argument to the ItemHookHandler
interface which is unused by the DefaultItemHookHandler implementation.
It also means passing nil for the []ResourceHook argument since that
holds BackupResourceHook.

Signed-off-by: Andrew Reed <andrew@replicated.com>

* WaitExecHookHandler unit tests

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Changelog and go fmt

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Fix double import

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Default to first contaienr in pod

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Use constants for hook error modes in tests

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Revert to separate WaitExecHookHandler interface

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Negative tests for invalid timeout annotations

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Rename NamedExecRestoreHook PodExecRestoreHook

Also make field names more descriptive.

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Cleanup test names

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Separate maxHookWait and add unit tests

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Comment on maxWait <= 0

Also info log container is not running for hooks to execute in.
Also add context error to hooks not executed errors.

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Remove log about default for invalid timeout

There is no default wait or exec timeout.

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Linting

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Fix log message and rename controller to podWatcher

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Comment on exactly-once semantics for handler

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Fix logging and comments

Use filed logger for pod in handler.
Add comment about pod changes in unit tests.
Use kube util NamespaceAndName in messages.

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Fix maxHookWait

Signed-off-by: Andrew Reed <andrew@replicated.com>
2020-09-08 11:33:15 -07:00
Carlisia Thompson be1cd03023
Refactor BSL related code (#2870)
* Refactor BSL related code

Signed-off-by: Carlisia <carlisia@vmware.com>

* Increase # of max concurrent reconciles

Signed-off-by: Carlisia <carlisia@vmware.com>

* Clean up for better, more precise interfaces

Signed-off-by: Carlisia <carlisia@vmware.com>

* Minor clean up - code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address code review

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add import and fix CI

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-09-02 13:12:37 -04:00
Pawan Prakash Sharma debcbd2f8e
fix: rename the PV if VolumeSnapshotter has modified the PV name (#2835)
* fix: rename the PV if VolumeSnapshotter has modified the PV name

When VolumeSnapshotter sets the PV name via SetVolumeID and PV is
not there in the cluster, velero does not rename the PV. Which causes
the pvc to be in the lost state as pvc points to the old PV but pv object
has been renamed by VolumeSnapshotter.

Signed-off-by: Pawan <pawan@mayadata.io>

* adding a test case for pv rename

Signed-off-by: Pawan <pawan@mayadata.io>
2020-09-01 14:25:13 -07:00
Carlisia Campos c952932f1b
Migrate ServerStatusRequest controller and resource to kubebuilder (#2838)
* Convert ServerStatusRequest controller to controller-runtime

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add select stm

Signed-off-by: Carlisia <carlisia@vmware.com>

* Fixed status patch bug

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add mgr start

Signed-off-by: Carlisia <carlisia@vmware.com>

* Trying to sync

Signed-off-by: Carlisia <carlisia@vmware.com>

* Clean async now

Signed-off-by: Carlisia <carlisia@vmware.com>

* Clean up + move context out

Signed-off-by: Carlisia <carlisia@vmware.com>

* Bug: not closing the channel

Signed-off-by: Carlisia <carlisia@vmware.com>

* Clean up some tests

Signed-off-by: Carlisia <carlisia@vmware.com>

* Much better way to fetch an update using a backoff loop

Signed-off-by: Carlisia <carlisia@vmware.com>

* Even better way to retry: use apimachinery lib

Signed-off-by: Carlisia <carlisia@vmware.com>

* Refactor controller + add test

Signed-off-by: Carlisia <carlisia@vmware.com>

* partially fix unit tests

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* Fix and add tests

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add changelog

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add ability to disable the controller + cleanups

Signed-off-by: Carlisia <carlisia@vmware.com>

* Fix bug w/ disabling controllers + fix test + clean up

Signed-off-by: Carlisia <carlisia@vmware.com>

* Move role.yaml to the correct folder

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add sample serverstatusrequest.yaml

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add requeue + better formatting

Signed-off-by: Carlisia <carlisia@vmware.com>

* Increase # of max concurrent reconciles

Signed-off-by: Carlisia <carlisia@vmware.com>

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
2020-09-01 14:15:23 -07:00
JenTing Hsiao 1513674548
fix EnableAPIGroupersions output log format (#2882)
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2020-09-01 13:50:44 -04:00
Dylan Murray 7369e4d99e
Check for errors on restic backup command (#2863)
* Check for errors on restic backup command

Signed-off-by: Dylan Murray <dymurray@redhat.com>

* Add changelog

Signed-off-by: Dylan Murray <dymurray@redhat.com>
2020-08-25 08:51:50 -07:00
Carlisia Campos 03bd6c85c8
Better var names (#2848)
Signed-off-by: Carlisia <carlisia@vmware.com>
2020-08-24 15:14:07 -04:00
Nolan Brubaker 718a94ad05
Invoke DeleteItemActions on backup deletion (#2815)
* Add serving and listing support

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-08-20 17:24:29 -07:00
Nolan Brubaker e9ece0f7b5
Implement DeleteItemAction plugin support (#2808)
* Add DeleteItemAction struct & protobuf definition

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-08-18 12:16:26 -07:00
Benoit Gagnon 5d2c9e2ba1
Override logrus.ErrorKey when json logging is enabled (#2830)
* override logrus.ErrorKey when json logging is enabled

Signed-off-by: Benoit Gagnon <benoit.gagnon@ubisoft.com>

* document the logrus.ErrorKey override

Signed-off-by: Benoit Gagnon <benoit.gagnon@ubisoft.com>

* add changelog entry

Signed-off-by: Benoit Gagnon <benoit.gagnon@ubisoft.com>
2020-08-18 13:53:45 -04:00
runzexia 3a4e441af8
add kindfor func to get apiresource from gvk (#2764)
* add kindfor func to get apiresource from gvk

Signed-off-by: RyderXia <ryder.xia@sap.com>

* impl interface & changelog

Signed-off-by: RyderXia <ryder.xia@sap.com>
2020-08-17 15:52:33 -07:00
Phuong N. Hoang 14170b52a8
Enhance Backup to backup resources in specific order. (#2724)
Signed-off-by: Phuong Hoang <phuong.n.hoang@dell.com>

Co-authored-by: Phuong Hoang <phuong.n.hoang@dell.com>
2020-08-12 17:17:31 -07:00
Jason Scarano 827d5d34f5
Improve and clarify cmd help documentation, flags, and examples (#2736)
* capitalize `backup create` cmd comments & examples

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyright and capitilize flags and comments

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyright and capitilize flags and comments

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyright and capitilize flags and comments

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update backuplocation, restic, & restore cmd doc

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* fix local typo

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyrights & capitalize pflag/help strings

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyright in utils dir

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* Revert "update copyright in utils dir"

This reverts commit d116efe3a3.

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* revert copyright changes

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* restore missing file

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* revert copyright changes

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* add cacert flag back

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

Co-authored-by: Carlisia Campos <carlisia@vmware.com>
2020-08-12 18:13:44 -04:00
Ashish Amarnath 9eca0fcbff
Pass default-volumes-to-restic flag from create schedule to backup (#2776)
* Pass default-volumes-to-restic flag from create schedule to backup

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-08-12 12:09:07 -07:00
Ashish Amarnath e391e43192 🐛 Supply command to run restic-wait init container
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-08-11 11:05:30 -07:00
Ashish Amarnath 5d6da6517b
Implement restore hooks injecting init containers into pod spec (#2787)
*  Implement restore hooks injecting init containers into pod spec

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-08-11 10:38:44 -07:00
Ashish Amarnath 9b9bb62968
🐛 Make init and exec restore hooks as omitempty in restore hookSpec (#2793)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-08-11 10:13:41 -07:00
Benoit Gagnon 0e8a7a23cb
always use groupResource.String() when logging (fixes #2795) (#2796)
Signed-off-by: Benoit Gagnon <benoit.gagnon@ubisoft.com>
2020-08-06 10:10:59 -07:00
Piper Dougherty 19e65689ef
Add the ability to set the allowPrivilegeEscalation property on the Restic restore helper via plugin ConfigMap (#2792)
* Add the ability to set the `allowPrivilegeEscalation` security context attribute on the Restic restore helper init container.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>

* Add changelog.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>

* Fix old tests and add tests for new allowPrivilegeEscalation config option.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>

* Correct spelling in changelog.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>

* Switch to boolptr type.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>

* Reorder imports for sanity.

Signed-off-by: Piper Dougherty <doughertypiper@gmail.com>
2020-08-06 13:08:36 -04:00
JenTing Hsiao 1fdb647c7f
Add cacert flag for velero backup-location create (#2778)
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2020-07-30 11:33:45 -07:00
Ashish Amarnath 9de644f1a4
Add types to implement restore hooks (#2761)
* Add types to implement restore hooks

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-29 13:29:40 -07:00
Ashish Amarnath 028818a053
exclude vols mounting secrets and configmaps from defaultVolumesToRestic (#2762)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-27 20:27:49 -07:00
Andrew Reed 9011b192e9
Add hooks fields to restore context (#2755)
* Add hooks fields to restore context

Signed-off-by: Andrew Reed <andrew@replicated.com>

* Changelog

Signed-off-by: Andrew Reed <andrew@replicated.com>
2020-07-24 11:43:44 -07:00
Nolan Brubaker bbcbde084d
Create hook package (#2734)
* Move pkg/backup/item_hook_handler to internal/hoo

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add internal packages to test target

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-07-22 14:26:14 -07:00
Ashish Amarnath 2636730ef2 fix copyright year
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-22 12:11:59 -07:00
Martin Odstrčilík 86efd1577e
add support for setting SecurityContext (user, group) for restic restore (#2621)
* add support for setting SecurityContext (user, group) for restic restore

Signed-off-by: Martin Odstrcilik <martin.odstrcilik@gmail.com>
2020-07-22 12:10:25 -07:00
Ashish Amarnath 91ccc4adb2
Add metrics for restic back up operation (#2719)
* add metrics for restic back up operation

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* changelog

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-22 15:07:52 -04:00
Thejas Babu d0d143e119
Add StartTimestamp and CompletionTimestamp in Restore Status (#2748)
Signed-off-by: thejas <thejasb99@gmail.com>
2020-07-22 11:40:39 -07:00
Carlisia Campos e60d9f2821
Remove unneeded auto-generated files (#2732)
Signed-off-by: Carlisia <carlisia@vmware.com>
2020-07-20 15:37:27 -07:00
fvsqr 01e2dcb364
StorageGrid compatibility (#2712)
* remove explicit Accept-Encoding header

For StorageGrid compatibility the Accept-Encoding header should not be set, otherwise StorageGrid compresses the already compressed log files which are only decompressed by the client once

Signed-off-by: fvsqr <48791253+fvsqr@users.noreply.github.com>

* Removed explicit gzip Accept-Encoding header

For StorageGrid compatibility the Accept-Encoding header should not be set, otherwise StorageGrid compresses the already compressed log files which are only decompressed by the client once.
Unclear, how this affects Backup endpoints from Azure or GCP

Signed-off-by: fvsqr <48791253+fvsqr@users.noreply.github.com>

* Create 2712-fvsqr

Signed-off-by: fvsqr <48791253+fvsqr@users.noreply.github.com>
2020-07-20 13:11:26 -04:00
Nolan Brubaker f42c63af1b
Address insensitive language (#2677)
* Change master to main in most uses

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-07-17 14:59:51 -07:00
kathpeony 243ac62e3f
Add backupValidationFailureTotal to metrics (#2714)
* Add backValidationFailureTotal to metrics

Signed-off-by: Kathrin Mao <kathrin.mao@sap.com>
2020-07-16 10:13:17 -07:00
Andrew Lavery a368370bef
k8s 1.18 import (#2651)
* k8s 1.18 import wip

backup, cmd, controller, generated, restic, restore, serverstatusrequest, test and util

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* go mod tidy

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* add changelog file

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* go fmt

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* update code-generator and controller-gen in CI

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* checkout proper code-generator version, regen

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* fix remaining calls

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* regenerate CRDs with ./hack/update-generated-crd-code.sh

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* use existing context in restic and server

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* fix test cases by resetting resource version

also use main library go context, not golang.org/x/net/context, in pkg/restore/restore.go

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* clarify changelog message

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* use github.com/kubernetes-csi/external-snapshotter/v2@v2.2.0-rc1

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* run 'go mod tidy' to remove old external-snapshotter version

Signed-off-by: Andrew Lavery <laverya@umich.edu>
2020-07-16 12:21:37 -04:00
Carlisia Campos 13e1eeabfe
Return early from a BSL controller (#2709)
Signed-off-by: Carlisia <carlisia@vmware.com>
2020-07-14 15:09:11 -07:00
Carlisia Campos dbd0aa4915
Add a BSL controller to handle validation + update BSL status phase (#2674)
* Add BSL controller

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add changelog

Signed-off-by: Carlisia <carlisia@vmware.com>

* Make update

Signed-off-by: Carlisia <carlisia@vmware.com>

* Update docs

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add kubebuilder dependency

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add export

Signed-off-by: Carlisia <carlisia@vmware.com>

* add kubebuilder binaries into velero builder image

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* Reset velero dockerfile

Signed-off-by: Carlisia <carlisia@vmware.com>

* Consolidate all logic

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add copyright header

Signed-off-by: Carlisia <carlisia@vmware.com>

* Clean up + add "last validated" column

Signed-off-by: Carlisia <carlisia@vmware.com>

* Better tests

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add more tests

Signed-off-by: Carlisia <carlisia@vmware.com>

* Better logging

Signed-off-by: Carlisia <carlisia@vmware.com>

* Format

Signed-off-by: Carlisia <carlisia@vmware.com>

* Code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address code review

Signed-off-by: Carlisia <carlisia@vmware.com>

* Remove redundant logic

Signed-off-by: Carlisia <carlisia@vmware.com>

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-14 17:47:00 -04:00
Ashish Amarnath 3d3b9e312a
Revert "🐛 fix file perissions on the manifest JSON in backup archive (#2685)" (#2700)
dae5230aae

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-10 14:07:05 -07:00
Nolan Brubaker 54aa75a4cd
Adjust restic timeout and pod values up (#2696)
* Adjust restic timeout and pod values up

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-07-08 14:59:19 -07:00
Ashish Amarnath dae5230aae
🐛 fix file perissions on the manifest JSON in backup archive (#2685)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-08 06:37:59 -07:00
Ashish Amarnath b4465e92b8
🐛 Use CRD version prior to remap_crd_version backup item action (#2683)
* 🐛 preserve crd version before remapping

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-07 10:59:41 -07:00
Daniel Thrasher 94a9522f75
updated acceptable values on cron schedule for day of the week from 0-7 to 0-6 (#2676)
* updated acceptable values on cron schedule for day of the week from 0-7 to 0-6

Signed-off-by: Daniel Thrasher <dannythrasher@gmail.com>

* added a changelog file to changelog directory

Signed-off-by: Daniel Thrasher <dannythrasher@gmail.com>

Co-authored-by: Daniel Thrasher <dannythrasher@gmail.com>
2020-07-06 17:14:44 -04:00
Carlisia Campos 4048c020a8
Convert manifests + BSL api client to kubebuilder (#2561)
* kubebuilder init - minimalist version

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add back main.go, apparently kb needs it

Signed-off-by: Carlisia <carlisia@vmware.com>

* Tweak makefile to accomodate kubebuilder expectations

Signed-off-by: Carlisia <carlisia@vmware.com>

* Port BSL to kubebuilder api client

Signed-off-by: Carlisia <carlisia@vmware.com>

* s/cache/client bc client fetches from cache
And other naming improvements

Signed-off-by: Carlisia <carlisia@vmware.com>

* So, .GetAPIReader is how we bypass the cache
In this case, the cache hasn't started yet

Signed-off-by: Carlisia <carlisia@vmware.com>

* Oh that's what this code was for... adding back

We still need to embed the CRDs as binary data in the Velero binary to
access the generated CRDs at runtime.

Signed-off-by: Carlisia <carlisia@vmware.com>

* Tie in CRD/code generation w/ existing scripts

Signed-off-by: Carlisia <carlisia@vmware.com>

* Mostly result of running update-fmt, updated file formatting

Signed-off-by: Carlisia <carlisia@vmware.com>

* Just a copyright fix

Signed-off-by: Carlisia <carlisia@vmware.com>

* All the test fixes

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add changelog + some cleanup

Signed-off-by: Carlisia <carlisia@vmware.com>

* Update backup manifest

Signed-off-by: Carlisia <carlisia@vmware.com>

* Remove unneeded auto-generated files

Signed-off-by: Carlisia <carlisia@vmware.com>

* Keep everything in the same (existing) package

Signed-off-by: Carlisia <carlisia@vmware.com>

* Fix/clean scripts, generated code, and calls

Deleting the entire `generated` directory and running `make update`
works. Modifying an api and running `make verify` works as expected.

Signed-off-by: Carlisia <carlisia@vmware.com>

* Clean up schema and client calls + code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>

* Move all code gen to inside builder container

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address code review

Signed-off-by: Carlisia <carlisia@vmware.com>

* Fix imports/aliases

Signed-off-by: Carlisia <carlisia@vmware.com>

* More code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add waitforcachesync

Signed-off-by: Carlisia <carlisia@vmware.com>

* Have manager register ALL controllers

This will allow for proper cache management.

Signed-off-by: Carlisia <carlisia@vmware.com>

* Status subresource is now enabled; cleanup

Signed-off-by: Carlisia <carlisia@vmware.com>

* More code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>

* Clean up

Signed-off-by: Carlisia <carlisia@vmware.com>

* Manager registers ALL controllers for restic too

Signed-off-by: Carlisia <carlisia@vmware.com>

* More code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add deprecation warning/todo

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add documentation

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add helpful comments

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address code review

Signed-off-by: Carlisia <carlisia@vmware.com>

* More idiomatic Runnable

Signed-off-by: Carlisia <carlisia@vmware.com>

* Clean up imports

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-06-24 12:55:18 -04:00
Carlisia Campos 0b8e2cbbe5
Improve velero download doc (#2660)
* Improve velero download doc

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add changelog

Signed-off-by: Carlisia <carlisia@vmware.com>

* Better message

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-06-23 11:12:01 -07:00
Ashish Amarnath e5e7c025dd fix copyright boilerplate
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-18 14:14:15 -07:00
Ashish Amarnath 7abd2c6db9 doc updates
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-18 13:57:59 -07:00
Ashish Amarnath 6a8dca6b84 add default-volumes-to-restic flag to velero installation
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-16 14:46:36 -07:00
Ashish Amarnath 63f7690f44 more tests
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-16 14:46:36 -07:00
Ashish Amarnath b0fd3d35c1 rename field
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-15 15:26:44 -07:00
Ashish Amarnath b71173228a add velero server flag to allow default restic use on all pod volumes
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-15 14:46:06 -07:00
Ashish Amarnath 8a2a852b87 use backup's defaultRestic flag to identify pod volumes using restic
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-15 14:46:06 -07:00
Ashish Amarnath f34aab251e add default restic flag to backup create cli
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-15 14:46:06 -07:00
Ashish Amarnath 69cceb0d7e add backup level flag to opt-in for default restic use
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-15 14:46:06 -07:00
Steve Kriss a5346c1a87
azure: support aad-pod-identity auth when using restic (#2602)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-06-08 11:17:43 -07:00
Nolan Brubaker d9d9dc60da
Log when a hook timeout duration can't be parsed (#2610)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-06-05 12:45:50 -07:00
Steve Kriss 1c80ba903e
don't error during backup when additional items returned by plugin don't exist (#2595)
* log a warning instead of erroring if additional item can't be found

Signed-off-by: Steve Kriss <krisss@vmware.com>

* always show backup warning/error count in get/describe

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-06-04 16:29:55 -07:00
Christoph Blecker ceae7a2fdc
When creating backup from schedule, allow default name (#2569)
* When creating backup from schedule, allow default name

Signed-off-by: Christoph Blecker <admin@toph.ca>
2020-05-28 12:31:25 -07:00
Carlisia Campos 40d8511f64
Add status column to get BSL output (#2493)
* Add status column to get BSL output

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address code review

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-05-28 10:52:46 -07:00
Steve Kriss 5b52fd3efd
re-instantiate backup store just before persisting artifacts (#2550)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-27 16:03:52 -07:00
Jonas Rosland d10eea3ba3
Add up and down votes to the issue templates and contributing guide (#2583)
Signed-off-by: jonasrosland <jrosland@vmware.com>
2020-05-27 14:09:07 -07:00
Nolan Brubaker 0effb5d74b
Merge pull request #2576 from skriss/fix-2562
bug fix: pass ca cert file to restic stats command on restore
2020-05-26 15:16:28 -04:00
Steve Kriss 98c1a34558 bug fix: pass ca cert file to restic stats command on restore
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-26 10:16:03 -06:00
Steve Kriss 92693ad422 update backup struct with progress updates
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-21 15:40:59 -06:00
Steve Kriss 3f6183b522 add missing kubebuilder tags
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-21 15:30:12 -06:00
Ashish Amarnath 532c6c5dc3
increment restic volumesnapshot count after successful pvb create (#2542)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-20 09:05:23 -07:00
Nolan Brubaker c1494d6804
Tweak VolumeSnapshotContent describe output (#2534)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-12 13:58:47 -07:00
Nolan Brubaker 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 e91dfe3d91
Remove comment that has been turned into an issue (#2500)
Logged comment as issue #2499

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-08 09:27:01 -07:00
Nolan Brubaker 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 abae81ddc8
Merge pull request #2440 from skriss/backup-progress
report backup progress
2020-05-07 14:51:20 -04:00
Ashish Amarnath c49afd44bd
Use label selector to list VSCs to persist (#2502)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-06 11:04:34 -07:00
Ashish Amarnath 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 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 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 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
Steve Kriss 30ca0e4322 split out collecting items from backing up items
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-01 15:30:42 -06:00
Steve Kriss 19c52434b4 simplify group/resource/item backupper structure
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-01 15:29:01 -06:00
Nolan Brubaker 577af5a5b1
Merge pull request #2487 from skriss/fix-error-logging
don't return an error from log hook if value is not an error type
2020-05-01 16:11:16 -04:00
Nolan Brubaker 1ed5a13012
Merge pull request #2484 from skriss/fix-2319
bug fix: fix int/float conversion issue with CRD type in restore plugin
2020-05-01 16:09:57 -04:00
Ashish Amarnath 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
Rafael Brito 0d97f9400e
Backup all groups and versions with backward compatibility (#2373)
* Backup all API Groups versions while keeping backward compatibility

Signed-off-by: Rafael Brito <rbrito@vmware.com>

* Backup all API Groups versions while keeping backward compatibility

Signed-off-by: Rafael Brito <rbrito@vmware.com>

* Adding feature flag to enable backup of multiple API group versions

Signed-off-by: Rafael Brito <rbrito@vmware.com>
2020-05-01 15:54:57 -04:00
Martin Odstrčilík 26f67f1b10
add support for getting Azure Storage Account key from ENV variable (#2455)
Signed-off-by: Martin Odstrcilik <martin.odstrcilik@gmail.com>
2020-05-01 07:55:50 -07:00
Steve Kriss 5cc6c12eb4 don't return an error from log hook if value is not an error type
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-30 15:30:22 -06:00
Steve Kriss e148ddad8f
Add backwards-compatibility for flags passed to plugins (#2479)
* update plugin server to ignore unknown flags during parse

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-30 13:19:55 -07:00
Steve Kriss 2d55cd2ed8 bug fix: fix int/float conversion issue with CRD type in restore plugin
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-30 09:06:03 -06:00
Steve Kriss 15b2a1c9c6
bug fix: don't remove unresolvable includes from includes-excludes lists (#2462)
* bug fix: don't remove unresolvable includes from includes-excludes lists

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-27 17:17:39 -04:00
FNU Raghavendra Manjunath 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
Mayank 962f5d6859
Skipping validation for volumesnapshotlocation for backup if snapshotvolume set to false (#2450)
* Disabling validation for volumesnapshotlocation if the backup has snapshotvolume set to false

Signed-off-by: mayank <mayank.patel@mayadata.io>

* adding a changelog

Signed-off-by: mayank <mayank.patel@mayadata.io>

* addressing review comment

Signed-off-by: mayank <mayank.patel@mayadata.io>
2020-04-24 09:46:20 -07:00
Nolan Brubaker aa3abefdbf Address review feedback
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:18 -04:00
Nolan Brubaker 16cf2780d8 Fetch contents based on volumesnapshots found
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:18 -04:00
Nolan Brubaker bc04c568cd Return list of errors for encoding/zipping
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:18 -04:00
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 b4e18b489c Clean up object contents when other files fail
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 9372eaa31b Reduce duplication in object serialization
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:18 -04:00
Nolan Brubaker 850554911f Reduce duplication in object storage uploads
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 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 c71318bf19 Address more review feedback
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:17 -04:00
Nolan Brubaker 5bde12939e Address review feedback on object store
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:17 -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 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 29769eeb5b
Merge pull request #2439 from skriss/dynamic-list-refactor
change dynamic client's List return type to UnstructuredList
2020-04-16 15:16:30 -04:00
Ashish Amarnath bf2ef69aa7
Merge pull request #2431 from nrb/fix2429
Annotate backups with kubernetes version information
2020-04-15 11:45:10 -07:00
Steve Kriss ca58d7ab90 change dynamic client's List return type to UnstructuredList
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-15 12:41:47 -06:00
Steve Kriss 1826b6b67b
bug fix: populate namespace in logs for backup errors (#2438)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-15 10:31:40 -07: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
Ashish Amarnath 824bc8eec5
Merge pull request #2390 from skriss/fix-2366
bug fix: save PVBs even if no snapshot was taken
2020-04-08 12:21:43 -07:00
Samuel Lucidi 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 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
Ashish Amarnath 061b4463ce
ensure target namespace exists prior to retoring a resource (#2389)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-04-03 07:57:01 -07:00
Steve Kriss 91228522be bug fix: save PVBs even if no snapshot was taken
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-02 13:17:41 -06:00
Ashish Amarnath 969526cee5
Merge pull request #2381 from nrb/plugin-feature-flag
Add features flag to plugin server
2020-03-31 16:57:02 -07:00
Samuel Lucidi 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
Nolan Brubaker bc2717fca1 Add features flag to plugin server
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-03-31 14:01:47 -04:00
Nolan Brubaker 7c87aebe5f Only add CA cert to plugin config if it's defined
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-03-31 13:59:37 -04:00
Ashish Amarnath 4961040652
add secrets to kuberesource (#2369)
CSI plugin for velero will use this to return secrets as additional
resource while backing up CSI objects

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-03-30 09:43:58 -07: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 4a5e70e00d allow plugins/ as a valid directory in the BSL bucket
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-17 11:14:41 -06:00
Nolan Brubaker 7258167548
Merge pull request #2248 from skriss/refactor-restore-priorities
refactor restore priorities code to use single loop and lazy discovery
2020-03-10 12:16:42 -04:00
Nolan Brubaker 040f6806f1
Fix int/float conversion issues in CRD version remapping plugin (#2322)
* Add builders for CRD schemas

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add test case for #2319

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add failing test case

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Remove unnecessary print and temporary variable

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add some options for fixing the test case

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Switch to a JSON middle step to "fix" conversions

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add comment and changelog

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-03-10 09:24:22 -06:00
Steve Kriss 583ef4258a refactor restore priorities code to use single loop and lazy discovery
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-10 08:57:50 -06:00
Nolan Brubaker 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 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 ac7a84cc58 update generated CRDs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:08 -07:00
Steve Kriss ea418ceda7 update generated CRDs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:08 -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
Ashish Amarnath 31dca0ea1b
add GroupResources for volumesnapshot types (#2288)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-02-24 11:47:35 -08: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
Ashish Amarnath e681759178
export restic pod annotation (#2283)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-02-19 12:37:40 -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
Mayank 1a1372550d
Use PV name returned from volumesnapshotter while creating a PV (#2216)
* Using PV name returned from volumesnapshotter while creating a PV

Signed-off-by: mayank <mayank.patel@mayadata.io>
2020-02-10 13:17:15 -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
Brad Koehn b25fea3bea
properly handle empty restic stdout during progress updates (#2231)
* properly handle empty restic stdout during progress updates

Signed-off-by: Brad Koehn <brad@koehn.com>
2020-02-03 12:49:23 -07:00
Steve Kriss 08c549a092
Restore result refactoring (#2234)
* move Result helper funcs to be methods

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-02-03 10:56:57 -08:00
Carlos Tadeu Panato Junior c9bc6646a5
use GA topology labels for PVs (#2219)
* use GA toplogy labels for PVs

Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2020-02-03 10:47:18 -08:00
Ashish Amarnath 21264a11ec
Merge pull request #2218 from cpanato/GH-1168
remove schedule validation
2020-01-31 13:00:24 -08:00
Steve Kriss 37011ee5ac
bug fix: back up server-preferred version of CRD (#2230)
* bug fix: back up server-preferred version of CRD

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-01-31 08:45:46 -07: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
JenTing Hsiao b19097f825 Pruning unknown fields (#2187)
* Pruning unknown fields

In CRD apiversion v1beta1, default preserveUnknownFields=true.

In CRD apiversion v1, the preserveUnknownFields can only be false.
Otherwise, the k8s validation bumps out error message for the
invalid preserveUnknownFields value.

Deploy Velero on k8s 1.16+ with CRD apiversion v1beta1, the
k8s cluster converts apiversion from v1beta1 to v1 automatically.

Fully backup and restore the cluster, restore bumps out error message
due to the preserveUnknownFields=true is not allowed on k8s 1.16+.

Since the CRD structural schema had been defined, enable the preserveUnknownFields
to false to solves the restore bumps out error message on k8s 1.16+.

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>

* Add changelog

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2020-01-28 14:04:28 -05: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
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
Ashish Amarnath 421dcd4e8d
Merge pull request #2201 from skriss/fix-2121
fix race condition in waiting for restic restores to complete
2020-01-21 15:16:08 -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
Steve Kriss ae316193ea move log statement
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-01-21 12:36:46 -07:00
Steve Kriss 3b80e00d62 fix race condition in waiting for restic restores to complete
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-01-15 16:09:54 -07:00
Nolan Brubaker ee0cbcf11e
Merge pull request #2199 from jnaulty/jnaulty/improve-config-file-perms
Restrict file permissions for config file/dir
2020-01-15 15:13:22 -05:00
John Naulty 254a5eebb5
Restrict file permissions for config file/dir
Velero client config file should have restricted file permissions to be
read/write-able for the user that creates it--similiar to files like
`.ssh/id_rsa`

Refer to OTG-CONFIG-009: Test File Permission
> Impoper file permission configuration may result in privilledge
escalation, information explousure, DLL injection, or unauthorized file
access.
Therefore, files permission must be properly configured with minium
access permission by default.

[source](https://www.owasp.org/index.php/Test_File_Permission_(OTG-CONFIG-009))

Ticket: #1758
Signed-off-by: John Naulty <johnnaulty@bitgo.com>
2020-01-15 09:41:25 -08: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
Steve Kriss b2acd3b683 bump go-hclog and prometheus dependency versions in prep for go modules (#2188)
* update revision of go-hclog to match go.mod requirement

Signed-off-by: Steve Kriss <krisss@vmware.com>

* update prometheus dep to prepare for go module migration

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-01-14 11:29:37 -05: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
JenTing Hsiao 97b33402a4 Assign default CPU/Memory resource value if not present (#2176)
Install restic with CPU/Memory limits is optional.
If velero cannot parse resource requirements, use default value instead.

After that, the administrator won't get confused that something recovered failed.

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2020-01-09 08:48:35 -07:00
Shuwei Hao c832e52905 add ALIBABA_CLOUD_CREDENTIALS_FILE env in deployment and daemonset installation (#2166)
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
2020-01-06 14:56:23 -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
JenTing Hsiao 93e4737258 Fix incorrect output log format (#2165)
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2020-01-06 09:05:38 -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
John Naulty Jr cd860771c2 Add error return to pvRenamer func (#2138)
Migrate logic from NewUUID function into the pvRenamer function.

PR #2133 switched to a new NewUUID function that returns an error, but
the invocation of that function needs to happen within the pvRenamer
closure. Because the new function returns an error, the pvRenamer should
return the error, the signature needs to be changed and the return
checked.

Signed-off-by: John Naulty <johnnaulty@bitgo.com>
2019-12-17 10:23:58 -08:00
John Naulty ff889283b8
Switch from satori/go.uuid to gofrs/uuid
satori/go.uuid has a known issue with random uuid generation.
gofrs/uuid is still maintained and has fixed the random uuid generation
issue present in satori/go.uuid

Signed-off-by: John Naulty <johnnaulty@bitgo.com>
2019-12-14 10:27:00 -08:00
Steve Kriss 7c60829f38 bug fix: don't restore cluster-scoped resources by default when restoring specific namespaces (#2118)
* add failing test case for bug

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-12-12 12:45:41 -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
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
Steve Kriss f42406723c bug fix: deep-copy backup's labels for snapshot tags (#2075)
* bug fix: deep-copy backup's labels for snapshot tags

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-12-05 12:54:19 -08:00
Roman Klimenko 87be775139 Add support for private registry with custom port in restic-helper image (#1999)
* Add support for private registry with custom port in restic-helper image definition

Signed-off-by: Roman Klimenko <cognoz@ya.ru>
2019-12-04 08:01:39 -08: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
Steve Kriss 5a31a78df5 add better error message when cluster config can't be found
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-11-08 15:01:12 -07: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
Steve Kriss 4fb1bc2ef3
restic: don't try to restore PVBs with no snapshotID (#2031)
* restic: don't try to restore PVBs with no snapshotID

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-11-04 16:18:08 -07: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 83752d28d7 Restic restore fixes (#2013)
* restic: use restore cmd's env when getting snapshot size

Signed-off-by: Steve Kriss <krisss@vmware.com>

* restic: remove code that considers 0-byte backups an error

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-10-29 07:42:12 -07:00
Steve Kriss 5d6b129ea5 fix typo in download request validation tag (#2009)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-10-28 16:00:03 -07: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
Adnan Abdulhussein 69f993aebd update gcr.io/heptio-images/ references to velero/ (#1988)
* update gcr.io/heptio-images/ references to velero/

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-10-22 14:39:43 -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
Adnan Abdulhussein f2eb072694 fix controller-gen version in builder image (#1984)
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-10-21 13:49:32 -07: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
Steve Kriss 92ea44e8e6 tweak test case names for clarity (#1976)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-10-17 12:39:42 -07:00
Scott Seago 970f17c1ef If includeClusterResources is nil/auto, pull in necessary CRDs (#1831)
Related issue: https://github.com/heptio/velero/issues/1830

This accomplishes everything
that's needed, although there might be room for improvement in avoiding
a GET call for matching CRDs for each resource backed up. An alternative
could be a single call to get all CRDs prior to iterating over resources
and passing this into the backupResource function.

Signed-off-by: Scott Seago <sseago@redhat.com>
2019-10-17 12:31:04 -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
KubeKween d868b71e29 Move validation of plugins (#1953)
* Move validation of plugins

Signed-off-by: Carlisia <carlisia@vmware.com>
2019-10-09 10:48:37 -06:00
Steve Kriss 557d170541 restic: only backup ReadWriteMany PVC's once per velero backup (#1896)
* restic: only backup ReadWriteMany PVC's once per velero backup

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-10-08 17:16:35 -04:00
Steve Kriss d3e30dd58b Azure china/germany support (#1938)
* feat: add azure china support

Signed-off-by: andyzhangx <xiazhang@microsoft.com>

* remove AZURE_CLOUD_NAME from required env var fetching

Signed-off-by: Steve Kriss <krisss@vmware.com>

* minor simplification of parseAzureEnvironment

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>

* remove cloudNameEnvVar from getRequiredValues call

Signed-off-by: Steve Kriss <krisss@vmware.com>

* just check for err != nil

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-10-08 17:13:51 -04: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
Moritz Schmitz von Hülst eadac44e10 Add option for Azure cross subscription backups (#1895)
* add option for different subscription id

Signed-off-by: Moritz Schmitz von Hülst <msc@marketlogicsoftware.com>
2019-10-03 13:31:35 -07:00
KubeKween e054a2f0b3 Make "not restored" message a bit better (#1901)
* Make "not restoring" message a bit better

Signed-off-by: Carlisia <carlisia@vmware.com>

* Tweak error msg

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address feedback

Signed-off-by: Carlisia <carlisia@vmware.com>
2019-10-01 16:47:21 -04: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
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
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 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
Steve Kriss bf247836e6 Migrate restic backup tests (#1703)
* migrate pkg/backup restic tests to new structure

Signed-off-by: Steve Kriss <krisss@vmware.com>

* rename backup_new_test.go to backup_test.go

Signed-off-by: Steve Kriss <krisss@vmware.com>

* use pod volume backup builder

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-29 15:29:44 -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
Adnan Abdulhussein 52d97e7bd7 proposal: expose list of backed up resources in backup details (#1682)
* proposal: expose list of backed up resources in backup details

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-29 14:00:56 -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
Nolan Brubaker aa8c0cd471 Honor kube client flags in install command (#1656)
Flags specifying the kubeconfig or kubecontext to use weren't actually
being used by the install command.

Fixes #1651

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-17 14:19:14 -07:00
Nolan Brubaker 3124570c7f Remove references to apps/v1beta1 API group (#1673)
* Remove references to apps/v1beta1 API group

In Kubernetes v1.16, the apps/v1 API group will be the default served
for relevant resources.

Update any references to apps/v1beta1 for fowards compatibility.

Fixes #1672

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Update API group on plugin commands

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-17 15:03:48 -06:00
Steve Kriss 1bb167ef90 add restore item action to change PVC/PV storage class name (#1621)
* add restore item action to change PVC/PV storage class name

Signed-off-by: Steve Kriss <krisss@vmware.com>

* code review

Signed-off-by: Steve Kriss <krisss@vmware.com>

* change existing plugin names to lowercase/hyphenated

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add validation for new storage class name

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add test cases

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>

* fix imports

Signed-off-by: Steve Kriss <krisss@vmware.com>

* update plugin names to be more consistent

Signed-off-by: Steve Kriss <krisss@vmware.com>

* update unit tests to use pkg/test object constructors

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-15 11:19:38 -07: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
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
John Matthews afa49f398f bug fix: Fixed namespace usage with cli command 'version'
Signed-off-by: John Matthews <jwmatthews@gmail.com>
2019-07-07 13:54:46 -04:00
Traci Kamp f829dabcf4 Add pod-annotations CLI flag to the install command (#1626)
* allow users to specify additional Velero/restic pod annotations on the command line with the pod-annotations flag

Signed-off-by: Traci Kamp <traci.kamp@gmail.com>
2019-07-03 15:22:34 -07:00
Adnan Abdulhussein eec5cc687e validate pod volumes hostpath mount on restic server startup (#1616)
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-03 14:20:31 -06:00
Steve Kriss bf00754280 fix schedule create examples to use hours as units (#1625)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-03 12:20:49 -07:00
Steve Kriss 567802299b move PV/PVC setup helpers into pkg/test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-03 08:50:11 -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
Nolan Brubaker e371ba78b0
Merge pull request #1612 from skriss/restore-addl-items-bugs
properly filter additional items returned from restore item actions
2019-06-28 17:12:38 -04: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 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 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 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
Adnan Abdulhussein b0bdaeea73 ensure correct backup item actions run with namespace selector (#1601)
* ensure correct backup item actions run with namespace selector

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* changelog

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* don't run backup item actions for namespace resources

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* simplify cluster-scope resources checks

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-24 15:50:25 -06:00
Nolan Brubaker 08fe7be851 Fix test conflicts from #1595 and #1598 (#1602)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-06-24 15:34:56 -06:00
Nolan Brubaker 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
Nolan Brubaker 37c7b618ad
Merge pull request #1598 from skriss/rm-has-controller-owner
remove unused hasControllerOwner func and tests
2019-06-24 16:51:28 -04:00
Steve Kriss 5634a4f463 migrate backup hooks tests (#1591)
* migrate hooks tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add more test cases

Signed-off-by: Steve Kriss <krisss@vmware.com>

* refactor to strongly typed expectation, add pre+post hook test case

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-24 12:23:17 -07: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
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
Steve Kriss 0735ee7218 extract shared API test helpers to pkg/test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-20 14:57:31 -06:00
Adnan Abdulhussein 1f4139a5bf allow exclusion of resources using standard label (#1588)
* allow exclusion of resources using standard label

excludes any resources with the velero.io/exclude-from-backup=true label

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-19 10:58:02 -04:00
Adnan Abdulhussein 2d81e29276 ensure backup item action modifications reflected in tarball filepath (#1587)
* ensure backup item action modifications reflected in tarball filepath

This patch ensures the updated backup item's name and namespace are used
when constructing the filepath for the tarball.

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* changelog

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-18 12:19:00 -06:00
Steve Kriss e2bf39a027 migrate PV snapshot tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-12 13:03:32 -06:00
Steve Kriss 6513e8f30e migrate more backup action tests, remove obsolete test code (#1564)
* migrate more backup action tests, remove obsolete test code

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-12 14:45:04 -04:00
Steve Kriss 49f52b54b2
Merge pull request #1562 from carlisia/c-bug-sort
Fix test comparison
2019-06-11 12:34:35 -06:00
Adnan Abdulhussein 74b575200c hide server commands in velero CLI (#1561)
* hide server commands in velero CLI

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* changelog

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* remove unnecessary comment

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-10 19:20:17 -06:00
Carlisia 520077c3a9
Fix test comparison
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-06-10 16:34:29 -07:00
Steve Kriss e183c4b597 remove glog (#1559)
* remove glog refs, replace with klog equivalents

Signed-off-by: Steve Kriss <krisss@vmware.com>

* remove glog from deps

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-10 15:44:44 -07: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
Steve Kriss 9e7ff4e3d9 Refactoring for backup item action tests (#1545)
* migrate and enhance backup item action tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate terminating resource test

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add godoc for test functions

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-09 21:02:49 -07:00
Pranav Gaikwad bb12cbd2d7 Support for multiple AWS profiles (#1548)
* added support for multiple AWS credential profiles

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
2019-06-07 11:01:39 -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
Steve Kriss bc7ee686d7
Merge pull request #1428 from guilhem/glob
Add ability to use wildcard in includes/excludes
2019-06-05 09:53:37 -06:00
Guilhem Lettron 81a26e4aad Add ability to use wildcard in includes/excludes
Use https://github.com/gobwas/glob as glob engine
Fix #373

Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
2019-06-05 16:28:25 +02:00
Steve Kriss caa0bff5a3 Initial pkg/backup test refactoring (#1532)
Initial pkg/backup test refactoring

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-04 19:47:22 -07:00
KubeKween 0804f34644 Don't log error if restic volume is empty (#1480)
* Don't log error if restic volume is empty

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-05-30 12:48:21 -04:00
Steve Kriss 411d44a673 allow individual backup storage locations to be read-only (#1517)
* allow individual backup storage locations to be read-only

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-29 14:21:25 -04:00
Steve Kriss 9287505f62 fixes for breaking changes
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-20 13:25:36 -06:00
Steve Kriss 02c7df9ea0 update generated code
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-20 13:25:36 -06:00
Nolan Brubaker b3c6e5e483 Add more examples to schedule create (#1473)
Partially addresses #1464

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-13 09:25:25 -07:00
Nolan Brubaker c209f0c0c3 Add snapshot-location to `velero create` command (#1472)
`velero snapshot-location create` existed, but not `velero create
snapshot-location`; update subcommand for parity with backup-location

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-13 09:23:25 -07:00
Nolan Brubaker e0bc14d56b Add flag to disable creation of VSL on install
Fixes #1453

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-09 15:04:42 -04:00
Fábio Franco Uechi 58d34700da Add new gauge to hold the timestamp of the last successful backup (#1448)
* add new gauge to hold the timestamp of the last sucessfull backup

Signed-off-by: fabito <fuechi@ciandt.com>

* add changelog entry

Signed-off-by: fabito <fuechi@ciandt.com>

* fix gauge name

Signed-off-by: fabito <fuechi@ciandt.com>

* renaming metric to backup_last_successful_timestamp

Signed-off-by: fabito <fuechi@ciandt.com>

* fix typo

Signed-off-by: fabito <fuechi@ciandt.com>

* ✏️ fix typo II

Signed-off-by: fabito <fuechi@ciandt.com>

* 🔀 rename method

Signed-off-by: fabito <fuechi@ciandt.com>
2019-05-08 07:00:26 -06:00
Nolan Brubaker 05b8edf894
Merge pull request #1457 from skriss/shortcuts-perf-issue
shortcut expander: use discovery helper's cached resource list
2019-05-07 15:57:12 -04:00
Steve Kriss 90c89f764e shortcut expander: use discovery helper's cached resource list
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-07 12:23:45 -06:00
Fábio Franco Uechi 24d28c8633 Check for backup existence before download (#1447)
* check for backup existence in download command

Signed-off-by: fabito <fuechi@ciandt.com>
2019-05-06 12:24:29 -04:00
Nolan Brubaker 884e512f93 Use latest container image when version is empty (#1439)
When using `velero install`, the image used should be a reasonable
default, even if buildinfo.Version is missing (such as when using `go
build` directly).

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-03 11:10:47 -07:00
Nolan Brubaker de79f4d0b7
Merge pull request #1405 from skriss/gcp-project
GCP: add optional 'project' config to volume snapshot location
2019-05-03 11:24:42 -04:00
Steve Kriss 2406994740 remove ref to v0.10 from BSL validation error msg (#1429)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-02 11:20:50 -07: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
Nolan Brubaker 28612afa27
Merge pull request #1416 from skriss/restic-connect
switch to snapshots cmd for checking repo exists
2019-04-30 12:24:17 -04:00
Steve Kriss 660080e6f3 remove all remaining legacy Ark references (#1415)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-29 12:33:54 -07:00
Steve Kriss dea81bbe15 switch to snapshots cmd for checking repo exists
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-29 12:19:03 -06:00
Steve Kriss 3b5de11c74 update to optionally use distinct snapshot vs volume project
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-29 09:47:13 -06:00
Steve Kriss 4ed63edea0 GCP: add optional 'project' config to volume snapshot location
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-29 09:47:13 -06:00
Steve Kriss 8392e6d83f add PartiallyFailed phase for backups, log+continue on errors (#1386)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-26 09:14:26 -07:00
Steve Kriss 42f351b000
Merge pull request #1407 from nrb/bucket-dashes
Throw an error on an invalid bucket name
2019-04-25 15:41:19 -06:00
Nolan Brubaker bf19623e82
Merge pull request #1389 from skriss/restore-partially-failed
Add PartiallyFailed phase for restores
2019-04-25 17:06:26 -04:00
Nolan Brubaker 9e19ab8d8b Throw an error on an invalid bucket name
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-25 16:26:03 -04:00