Commit Graph

66 Commits (30ca0e4322dcc9fd9b4ba9560e9245df81db8d7a)

Author SHA1 Message Date
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
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
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
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
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
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 48792ece1f Updates for org move to vmware-tanzu (#1920)
* update import paths to github.com/vmware-tanzu/...

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

* update other GH org refs to vmware-tanzu

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

* site and docs: update GH org to vmware-tanzu

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

* update travis badge links on docs readmes

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-09-30 17:26:56 -04:00
Nolan Brubaker 8ec1548b3c Add features package (#1849)
* Add features package

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-09-18 10:57:04 -06:00
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 ffa3251efc move contents of pkg/util/test into pkg/test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-07 08:26:00 -06:00
KubeKween 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 660080e6f3 remove all remaining legacy Ark references (#1415)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-29 12:33:54 -07:00
Carlisia 6f496a8921
Bug fix
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-24 14:18:24 -07:00
Carlisia 7d28f82540
Address code review
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-24 10:54:43 -07:00
Andy Goldstein 01d0b026e9
Fail backup if it already exists in object storage
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2019-04-22 15:22:58 -07:00
Nolan Brubaker c326f59627 Prepend velero.io to non-namespaced names
Prior to 1.0, user-provided values such as cloud provider names didn't
need to be namespaced. This change allows those values to continue
working without the user editing the fields manually.

Fixes #1363

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-12 16:31:16 -04:00
KubeKween abee09aa2d Add validation for plugin name format and dups (#1339)
* Add validation for plugin name format and dups

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

* Bug fix

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

* Add changelog

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

* Address code reviews

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

* Fix code

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

* Address code reviews

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

* Add documentation

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

* Update godoc

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

* More doc

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-12 08:25:04 -06:00
KubeKween 13eaad0e64 Refactor protobuf (#1354)
* Update protobuffs

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-09 13:50:05 -04:00
sseago a519547efc Adds support for allowing a RestoreItemAction to skip item restore (#1336)
* Adds support for allowing a RestoreItemAction to skip item restore

This allows a RestoreItemAction plugin to signal to velero that
the returned item should be skipped rather than restored to the
cluster.

To support this, a boolean SkipRestore attribute is added to
RestoreItemActionExecuteOutput. If restore.restoreResource finds
this set to true, any remaining actions on this item are skipped,
and restore on this item is skipped. Execution continues with
the next item of this resource type.

To signal this for a particular item, the RestoreItemAction's
Execute method should call WithoutRestore() on the
RestoreItemActionExecuteOutput before returning it.

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

* Autogenerated code to support SkipRestore

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

* Added changelog for #1336

Signed-off-by: Scott Seago <sseago@redhat.com>
2019-04-04 13:39:54 -06:00
Steve Kriss a696cd09f2 remove Warning from restore item action output (#1318)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-28 13:08:37 -07:00
Steve Kriss be42ea782d turn down log levels in plugin server to DEBUG (#1325)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-28 12:44:26 -07:00
Steve Kriss 9b635c0e14 add additionalItems to restore item actions (#1304)
* add additionalItems to restore item actions

Signed-off-by: Steve Kriss <krisss@vmware.com>
Co-authored-by: Andy Goldstein <goldsteina@vmware.com>
2019-03-28 12:21:56 -07:00
KubeKween 477e42286c Bump plugin client version (#1319)
* Bump plugin client version

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-28 11:34:43 -04:00
Nolan Brubaker 21f3169ad3
Merge pull request #1321 from skriss/rename-block-store
rename BlockStore to VolumeSnapshotter
2019-03-28 11:33:06 -04:00
Steve Kriss 86293b68b3 don't wrap io.EOF errors during gRPC streaming
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-27 16:22:28 -06:00
Steve Kriss bb9c3f6a1a rename BlockStore to VolumeSnapshotter
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-27 14:55:28 -06:00
Nolan Brubaker 3f2c28f6bb
Merge pull request #1301 from skriss/plugins-error-location
log error locations from plugin logger and don't overwrite in client
2019-03-27 11:21:52 -04:00
Steve Kriss 7b0d8217de send plugin error stack traces over gRPC and log error locations
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-27 08:34:03 -06:00
Steve Kriss b1c0e9c49b update plugins to work with updated go-plugin (#1308)
* update plugins to work with updated go-plugin

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-21 12:32:18 -07:00
Steve Kriss ff2db31b32 log error locations from plugin logger and don't overwrite in client
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-20 16:13:37 -06:00
Steve Kriss a111eed2af update license headers to Velero contributors (#1302)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-20 12:32:48 -07:00
Carlisia a71e43b2b7
Split velero plugin client into its own package
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-19 16:05:37 -07:00
Carlisia 7dfe58d37f
Split plugin framework into its own package
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-19 15:36:31 -07:00
KubeKween 73514a003b Move plugin interfaces to same package (#1264)
* Move plugin interfaces to same package

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-14 16:35:06 -04:00
Steve Kriss 7674332313 pass --log-level to plugins (#1278)
Plumb the log level through to plugin processes


Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-14 10:53:36 -07:00
Steve Kriss 409116fce8 add basic plugin panic handlers (#1270)
* add server-side panic handlers to all plugin methods

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-13 14:07:52 -04:00
Michal Wieczorek 1354e2b6ff
Add original item to restore plugin interface
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl>
2019-03-05 17:09:42 -08:00
DheerajSShetty 032aaac508 defer closing the ReadCloser in ObjectStoreGRPCServer.GetObject
Signed-off-by: DheerajSShetty <dheerajs@vmware.com>

Fixes #1093
2019-02-28 11:51:10 -08:00
Nolan Brubaker 43714caaec Rename Ark to Velero!!!
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-04 17:35:22 -05:00
Gábor Lipták daf1a75515 Bring Go current in Travis
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2018-11-21 08:31:14 -05:00
Andy Goldstein bca585162f Run 'make update' to update formatting
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-10-23 13:08:42 -04:00
Steve Kriss 7d8813a96c move ObjectStore mock into pkg/cloudprovider/mocks
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-06 10:53:58 -06:00
Steve Kriss f0edf7335f add a BackupStore to pkg/persistence that supports prefixes
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-06 10:53:58 -06:00
Steve Kriss 1c26fbde32 remove SnapshotService, replace with direct BlockStore usage
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-31 08:58:11 -07:00
Andy Goldstein 130512187a Refactor plugin management
Refactor plugin management:
- support multiple plugins per executable
- support restarting a plugin process in the event it terminates
- simplify plugin lifecycle management by using separate managers for
  each scope (server vs backup vs restore)

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-07-31 08:34:57 -07:00
Andy Goldstein cc9140b3cc Log to stdout instead of stderr
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-06-14 14:02:12 -04:00
Steve Kriss 50d4084fac add restic integration for doing pod volume backups/restores
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-06 09:48:10 -07:00
Andy Goldstein 86b9cc6d15 BackupItemActionPlugin: handle nil updatedItem
Handle the case where a BackupItemAction may return nil for updatedItem,
meaning "no modifications to the item". The backupPVAction does this,
and we were panicking instead of accepting it.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-06-01 14:03:32 -04:00
Steve Kriss 20f56e9868 cleanup plugin subprocesses on server exit
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-11 09:48:46 -07:00
Steve Kriss 041cfc2173 backups: include clusterroles/bindings that reference serviceaccounts
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-09 10:03:55 -07:00