Commit Graph

569 Commits (d6d9a0ec085edc53a74762a51f9491b6ef43ea37)

Author SHA1 Message Date
Carlisia 4b2aae308c Add changelog
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-02-09 13:11:12 -08:00
Mikael Manukyan 36fc42761b
Add colors to describe command (#3275)
* Add colors to describe command

* Add colors to describe backups/restore/schedules commands
* Make name in the output bold
* Disable colors via `--colorized` flag or if velero isn't in TTY

Co-authored-by: Clay Kauzlaric <ckauzlaric@vmware.com>
Signed-off-by: Clay Kauzlaric <ckauzlaric@vmware.com>
Signed-off-by: Mikael Manukyan <mmanukyan@vmware.com>

* Add changelog
* and run make update

Co-authored-by: Mikael Manukyan <mmanukyan@vmware.com>
Signed-off-by: Mikael Manukyan <mmanukyan@vmware.com>
Signed-off-by: Clay Kauzlaric <ckauzlaric@vmware.com>

* Add colorized to the client config file

Co-authored-by: Mikael Manukyan <mmanukyan@vmware.com>
Signed-off-by: Clay Kauzlaric <ckauzlaric@vmware.com>
Co-authored-by: Mikael Manukyan <mmanukyan@vmware.com>

* allow client config to use string values

* the command `velero client config set colorized=false` writes a string
value of "false" into the config. This change allows that string to be
accepted and converted into a boolean when used in program.

Signed-off-by: Clay Kauzlaric <ckauzlaric@vmware.com>

* Add docs about colored CLI output

Co-authored-by: Mikael Manukyan <mmanukyan@vmware.com>
Signed-off-by: Clay Kauzlaric <ckauzlaric@vmware.com>

* Update site/content/docs/main/customize-installation.md

Co-authored-by: JenTing Hsiao <jenting.hsiao@suse.com>
Signed-off-by: Clay Kauzlaric <ckauzlaric@vmware.com>

* docs: remove comma

* as per @carlisia 's suggestion

Signed-off-by: Clay Kauzlaric <ckauzlaric@vmware.com>

Co-authored-by: Clay Kauzlaric <ckauzlaric@vmware.com>
Co-authored-by: Clay Kauzlaric <clay.kauzlaric@gmail.com>
Co-authored-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-02-09 08:39:41 -08:00
JenTing Hsiao e115949d9b
feat: support set BackupStorageLocation(BSL) CA certificate (#3167)
* Rename --cacert-file to --cacert in the CLI design doc

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

* Add a new flag --cacert under `velero backup-location set`

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

* Add changelog

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

* Changelog rewording

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

* Revert CLI design doc

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-02-08 13:28:47 -05:00
Taeuk Kim 529e05d6b2
Modify InitContainer checking function that potentially incurs error (#3198)
Signed-off-by: Taeuk Kim <taeuk_kim@tmax.co.kr>
2021-02-08 13:26:56 -05:00
Nolan Brubaker e5d83197f6 Add changelog entry
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2021-02-05 14:00:09 -05:00
Ron Green c4484d1c7e chore(changelog): add changelog message
Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com>
2021-01-26 13:06:27 +02:00
JenTing Hsiao 870291141f
Support fish shell completion (#3231)
* Support fish shell completion

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

* Use spf13/cobra library to generate zsh completion

reference to https://github.com/spf13/cobra/blob/v1.1.1/shell_completions.md

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

* Update velero completion help message

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

* Add changelog

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

* Update cobra version in go.mod instead of replace

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

* Replace yourprogram to velero

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-01-25 12:45:53 -05:00
Madhav Jivrajani 01853826b5
Raise logging level for PV deletion timeout (#3316)
* raised logging level for PV deletion timeout

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

* add changelog

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2021-01-21 19:48:33 -05:00
Dave Smith-Uchida bb2891a881 Increased limit for Velero pod to 512M. Fixes #3234
Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-01-12 15:42:45 -08:00
JenTing Hsiao 4ae55bb20a
Capitalize all help messages (#3209)
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-01-05 16:36:15 -08:00
JenTing Hsiao 6fee09bbb9
Merge pull request #3172 from carlisia/c-bsl-imp
Improvements to BSL logic
2020-12-16 23:16:36 +08:00
matheusjuvelino 73693de5a3
issue: add flag to the schedule cmd to configure the `useOwnerReferencesInBackup` option #3176 (#3182)
* resolve: #3176

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* created changelog

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* fixed use-owner-rferences-in-backup flag for use-owner-references-in-backup

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>
2020-12-14 19:30:35 -05:00
matheusjuvelino 309d3dcf0a
Owner reference in backup when created from schedule (#3127)
* added useOwnerReferencesInBackup to crd velerio.io_schedules

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* added UseOwnerReferencesInBackup property to schedule.go

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* deepcopy schedule configured for reference the property UseOwnerReferencesInBackup

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* added UseOwnerReferencesInBackup property verification to modify OwnerReferences from backup

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* created changelog

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* removed deepcopy schedule configured for reference the property UseOwnerReferencesInBackup

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* running make update

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* running make update

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>

* updated the year at the top of the schedule.go file for 2020

Signed-off-by: matheusjuvelino <matheus.juvelino@outlook.com>
2020-12-11 13:10:34 -05:00
Carlisia fa65af87d0 Add changelog
Signed-off-by: Carlisia <carlisia@vmware.com>
2020-12-09 15:00:37 -08:00
yusufgungor 3b2e9036d1
Preserve nodePort support with --preserve-nodeports flag (#3095)
* -> Preserve nodePort support when restoring via "--preserve-nodeports" flag

Signed-off-by: Yusuf Güngör <yusuf.gungor@hepsiburada.com>

* -> Added changelog.

Signed-off-by: Yusuf Güngör <yusuf.gungor@hepsiburada.com>

* -> Unit test added.
-> Using boolptr.IsSetToTrue for bool ptr check.

Signed-off-by: Yusuf Güngör <yusuf.gungor@hepsiburada.com>

* -> Unit test added.
-> Using boolptr.IsSetToTrue for bool ptr check.

Signed-off-by: Yusuf Güngör <yusuf.gungor@hepsiburada.com>

* -> Other restore errors log level changed from info to error.
-> Documentation updated about Velero nodePort restore logic and preservation of them.

Signed-off-by: Yusuf Güngör <yusuf.gungor@hepsiburada.com>

Co-authored-by: Yusuf Güngör <yusuf.gungor@hepsiburada.com>
2020-12-09 09:32:34 -08:00
JenTing Hsiao 9dd158d13d
feat: support configure BSL CR to indicate which one is the default (#3092)
* Add default field to BSL CRD

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

* Add a new flag `--default` under `velero backup-location create`

add a new flag `--default` under `velero backup-location create`
to specify this new location to be the new default BSL.

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

* Add a new default field under `velero backup-location get`

add a new default field under `velero backup-location get` to indicate
which BSL is the default one.

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

* Add a new sub-command and flag under `velero backup-location`

Add a new sub-command called `velero backup-location set` sub-command
and a new flag `velero backup-cation set --default` to configure which
BSL is the default one.

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

* Add new flag to get the default backup-location

Add a new flag `--default` under `velero backup-location get`
to displays the current default BSL.

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

* Configures default BSL in BSL controller

When upgrade the BSL CRDs, none of the BSL has been labeled as default.
Sets the BSL default field to true if the BSL name matches to the default BSL setting.

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

* Configures the default BSL in BSL controller for velero upgrade

When upgrade the BSL CRDs, none of the BSL be marked as the default.
Sets the BSL `.spec.default: true` if the BSL name matches against the
`velero server --default-backup-storage-location`.

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

* Add unit test to test default BSL behavior

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

* Update check which one is the default BSL in backup/backup_sync/restore controller

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

* Add changelog

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

* Update docs locations.md and upgrade-to-1.6.md

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2020-12-08 16:38:29 -05:00
Ashish Amarnath 7727d535a4
🐛 BSLs with validation disabled should be validated at least once (#3084)
* 🐛 BSLs with validation disabled should be validated at least once

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

* review comments

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-12-03 07:52:36 -08:00
JenTing Hsiao 7f2de65b5b
feat: add delete sub-command for backup-location (#3073)
* feat: add delete sub-command for backup-location

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

* Change to use kubebuilder/runtimecontroller API

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

* fix get BSL by label doesn't work

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

* Update changelog

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

* Ordering by alphabet

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

* Better example format for help message

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

* Capital the comments

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2020-11-30 13:59:42 -05:00
Bridget McErlean a877354750
Don't fail backup deletion if downloading tarball fails (#2993)
* Don't fail backup if downloading tarball fails

Previously, we would always attempt to download the tarball for a backup
for processing DeleteItemAction plugins, even if there weren't any.
This caused an issue for some users in the case where the backup tarball
had been deleted from object storage as the backup deletion would fail.

Now, we only attempt to download the tarball in the case where there are
DeleteItemAction plugins. If downloading that tarball fails, we log
the error, skip the processing of the DeleteItemAction plugins and
proceed with the rest of the deletion.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>

* Skip file removal in closeAndRemoveFile if nil

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2020-11-30 10:58:34 -08:00
David L. Smith-Uchida aa47309700
Add an E2E test framework to test Velero across cloud platforms (#3060)
* Basic end-to-end tests, generate data/backup/remove/restore/verify
Uses distributed data generator

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Moved backup/restore into velero_utils, started using a name for the restore

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* remove checked in binary and update test/e2e Makefile

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

* Ran make update

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Save

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

* Ran make update

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Basic end-to-end test, generate data/backup/remove/restore/verify
Uses distributed data generator

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Changed tests/e2e Makefile to just use go get to install ginkgo in the GOPATH/bin
Updated to ginkgo 1.14.2
Put cobra back to v0.0.7

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Added CLOUD_PLATFORM env variable to Makefile, updated README, removed ginkgo from .gitignore

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* choose velero CLI binary based on local env

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

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
2020-11-24 14:12:52 -05:00
Taeuk Kim 12d70e30a8
Modify function name typo (#3106)
Signed-off-by: Taeuk Kim <taeuk_kim@tmax.co.kr>
2020-11-23 11:28:34 -05:00
Misha Ketslah 8c8385aabb
pass annotations from scheduler to created backup (#3067)
* pass annotations from scheduler to created backup

Signed-off-by: Michael <michael.ketslah@tufin.com>

* add change log

Signed-off-by: Michael <michael.ketslah@tufin.com>

* add test for annotations in controller

Signed-off-by: Michael <michael.ketslah@tufin.com>

* If no annotations are set - do not copy empty list

Signed-off-by: Michael <michael.ketslah@tufin.com>

* remove unneeded var

Signed-off-by: Michael <michael.ketslah@tufin.com>

* add empty annotations and actually check annotations in backups

Signed-off-by: Michael <michael.ketslah@tufin.com>

* add empty missing label and empty annotations

Signed-off-by: Michael <michael.ketslah@tufin.com>

* revert empty annotations as seems they are nil as expected

Signed-off-by: Michael <michael.ketslah@tufin.com>

* fix typo in changelog

Signed-off-by: Michael <michael.ketslah@tufin.com>

Co-authored-by: Michael <michael.ketslah@tufin.com>
2020-11-19 13:19:42 -08:00
Madhav Jivrajani a386139788
Add instructions to clone repo for examples (#3074)
* Add instructions to clone repo for examples

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

* Add changelog

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

* Revert changes in v1.4 and 1.3.x

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

* Revert changes for v1.2.0

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2020-11-17 16:28:03 -08:00
Ashish Amarnath 4f1d46c452
🏃‍♂️ update setup-kind github actions CI (#3085)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-11-17 12:31:14 -05:00
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 9acd4ac4d5
.github/workflows: add PR codespell workflow (#3064)
To avoid adding typos to the code base.

Follow up to #3057.

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2020-11-10 12:43:32 -08: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
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
Gábor Lipták 3fb57c6b2e
Bump Go to 1.15 (#2974)
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2020-10-13 12:42:06 -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
mickkael 228b474859
Allow Timezone change in the container (#2944)
* Allow Timezone change in the container

Allow Timezone change by specifying the env TZ in the deployment manifest
Signed-off-by: mickkael <19755421+mickkael@users.noreply.github.com>

* Change log for 2944

Signed-off-by: mickkael <19755421+mickkael@users.noreply.github.com>
2020-10-06 13:58:16 -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
Nolan Brubaker 2fa96d0839
Fix 'subcommand required' error w/ cobra upgrade (#2947)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-09-17 14:08:26 -07:00
Nolan Brubaker 87d86a45a6
Add changelog and docs for v1.5 release (#2941)
* Add changelog and docs for v1.5 release

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

* Fix markdown indentation

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

* Fix URLs with patch version

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

* Fix example link

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-09-16 17:17:30 -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
Carlisia Thompson b60e6ff21e
v1.5.0-rc.1 release (#2921)
* v1.5.0-rc.1 release

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

* Reviews

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

* Re-generate docs

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-09-09 16:25:47 -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
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
Nolan Brubaker f5d10c5474
Merge pull request #2853 from ashish-amarnath/fix-server-version
🐛  fix passing LDFLAGS across build stages
2020-08-21 18:18:34 -04:00
Ashish Amarnath 20ac603747 🐛 fix passing LDFLAGS across build stages
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-08-21 14:20:37 -07:00
Nolan Brubaker 45168087f1
v1.5.0-beta.1 changelog and docs (#2849)
* Add changelogs for v1.5.0-beta.1

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

* Add v1.5-pre docs

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-08-21 12:07:24 -07: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
Tony Batard c663ce15ab
Hugo migration (#2720)
* Move files to a Hugo structure

Signed-off-by: Tony Batard <tbatard@pivotal.io>
2020-08-13 09:09:15 -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
Ashish Amarnath d4bbd7b817
🐛 Patch generated yaml for restore CRD as a hacky workaround (#2814)
* 🐛 Patch generated yaml for restore CRD as a hacky workaround

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

* changelog

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-08-12 18:43:29 -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 a68e5fc330
🏃‍♂️ Setup crd validation github action on k8s versions (#2805)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-08-11 10:45:12 -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
Rob Reus db139cf07c
Refactor image builds to use buildx for multi arch image building (#2754)
* Refactor image builds to use buildx for multi arch image building

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Adding image build sanity checks to Makefile

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Making locally building of docker images possible

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Adding docs on building container images using buildx

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Adding changelog and implementing feedback from PR

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Making GOPROXY used in the build containers configurable

Signed-off-by: Rob Reus <rob@devrobs.nl>
2020-08-04 11:40:05 -07: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
Ashish Amarnath bc25e789e0
Add constants for restore hook annotation keys (#2750)
* add annotation key constants for restore hooks

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-24 13:05:27 -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
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
Nolan Brubaker caeb4ae404
Update changelogs for v1.4.2 (#2705)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-07-21 11:14:41 -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 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
Duffie Cooley 2d48ac79c2
Image handling (#2620)
* Fix Image Handling

Signed-off-by: Duffie Cooley <cooleyd@vmware.com>

Co-authored-by: Carlisia <carlisia@vmware.com>
2020-07-06 15:15:38 -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
Tony Batard b968813058
Add linter (#2615)
* Add linter to Makefile and build image

* Also make it part of verify step

Signed-off-by: Tony Batard <tbatard@pivotal.io>

* clean up of Makefile and permissions for .go/golangci-lint

Signed-off-by: Duffie Cooley <cooleyd@vmware.com>

* changed verify-lint.sh to lint.sh to avoid breaking ci

Signed-off-by: mtritabaugh <mtritabaugh@vmware.com>

* Add changelog

Signed-off-by: Tony Batard <tbatard@pivotal.io>

* Add LINTERS option to run only specific linters

* e.g. make lint LINTERS=unused,deadcode

Signed-off-by: Tony Batard <tbatard@pivotal.io>

* adding timeout to golangci-lint, and checking cache

Signed-off-by: Matyas Danter <mdanter@vmware.com>

* Fixed some formatting and added comments

Signed-off-by: Matyas Danter <mdanter@vmware.com>

* modifying lint script to use golangci.yaml

Signed-off-by: Matyas Danter <mdanter@vmware.com>

* update to move default linters to Makefile

Signed-off-by: mtritabaugh <mtritabaugh@vmware.com>

* Adding documentation for lint make targets.

Signed-off-by: Matyas Danter <mdanter@vmware.com>

* Update Copyright with current year

Signed-off-by: Tony Batard <tbatard@pivotal.io>

* initial git workflow commit

Signed-off-by: mtritabaugh <mtritabaugh@vmware.com>

* Added lint-all target and implemented -n as default

* Added a local-lint-all and lint-all target that will show lint errors
for all of the codebase
* changed the default of lint and local-lint to only show new lint
errors

Signed-off-by: Duffie Cooley <cooleyd@vmware.com>

* updated docs to reflect new target

Signed-off-by: mtritabaugh <mtritabaugh@vmware.com>

Co-authored-by: Duffie Cooley <cooleyd@vmware.com>
Co-authored-by: mtritabaugh <mtritabaugh@vmware.com>
Co-authored-by: Matyas Danter <mdanter@vmware.com>
2020-06-30 12:51:10 -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 fcf0f3e5c2
move csi pluing out of prototype (#2636)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-19 13:27:00 -07:00
Nolan Brubaker ae1f4e284f
Merge pull request #2611 from ashish-amarnath/restic-by-default
  Implement option to back up all volumes by default with restic
2020-06-19 12:42:25 -04:00
Nolan Brubaker af79f96513
Merge pull request #2638 from adamrushuk/update-docs
Update basic-install and release-instructions documentation
2020-06-17 15:20:56 -04:00
Jess G c58331d408
add a supported provider: Storj object storage (#2635)
* add storj as provider

Signed-off-by: Jessica Grebenschikov <Jessica.greben1+github@gmail.com>

* update plugin list and master docs

Signed-off-by: Jessica Grebenschikov <Jessica.greben1+github@gmail.com>

* add changelog

Signed-off-by: Jessica Grebenschikov <Jessica.greben1+github@gmail.com>

* fix name of changelog

Signed-off-by: Jessica Grebenschikov <Jessica.greben1+github@gmail.com>

* add newline

Signed-off-by: Jessica Grebenschikov <Jessica.greben1+github@gmail.com>
2020-06-17 11:19:10 -07:00
Adam Rush 2af9d6a52a Changed pr number for changelog
Signed-off-by: Adam Rush <adamrushuk@gmail.com>
2020-06-17 09:04:51 +01:00
Adam Rush e7b413c7de Update basic-install and release-instructions documentation for Windows Chocolatey package
Signed-off-by: Adam Rush <adamrushuk@gmail.com>
2020-06-17 08:58:53 +01:00
Nolan Brubaker 0bdd6ef5a4
Merge pull request #2629 from adamrushuk/master
Update basic-install.md: Add windows cli installation option via chocolatey
2020-06-16 17:24:00 -04:00
Ashish Amarnath dd11b175ec changelog
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-15 14:46:06 -07:00
Adam Rush d1b188421f changed pr number for changelog
Signed-off-by: Adam Rush <adamrushuk@gmail.com>
2020-06-13 13:01:58 +01:00
Adam Rush a728ea8015 add windows cli installation option via chocolatey
Signed-off-by: Adam Rush <adamrushuk@gmail.com>
2020-06-13 12:53:17 +01:00
Tony Batard 9518ac898a Add changelog
Signed-off-by: Tony Batard <tbatard@pivotal.io>
2020-06-11 14:57:28 -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
Ashish Amarnath e1eba6f4a6 changelog
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-08 09:48:33 -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
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
Nolan Brubaker 5963650c9d
v1.4.0 changelog and docs (#2577)
* Add changelog for v1.4.0

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

* Add v1.4.0 docs

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

* Fix broken CI, links, and date

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

* Fix duplicate and missing TOC info

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-26 13:27:26 -07: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 2a144ec3b3
Add changelog entries for PR #2373 (#2529)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-11 14:16:16 -07:00
Nolan Brubaker 8bf75bd4f2
Add change log and docs site for v1.4.0-beta.1 (#2523)
* Update site for v1.4.0-beta.1

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

* Add v1.4.0-beta.1 changelogs

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

* Update upgrade link to v1.4

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

* Correct docs links in changelog

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-08 16:40:29 -06: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
Steve Kriss d0ea0e617e add changelog for PR #2440
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-07 13:00:01 -06: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
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
Steve Kriss 234bd1e361
changelog for PR #2455 (#2491)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-01 10:06:24 -07:00
Steve Kriss bfc6bd3587
update container base images from bionic to focal (#2471)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-30 15:13:20 -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 dc3593ab15
Revert "Install ca-certificates for ARM based container builds. (#2481)" (#2486)
This reverts commit 0e5ca82dba.

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-30 13:07:58 -07:00
twoequaldots 0e5ca82dba
Install ca-certificates for ARM based container builds. (#2481)
* Install ca-certificates for ARM based container builds.

Signed-off-by: David Colon <dave@colon.dev>

* Adding changelog for PR 2481

Signed-off-by: David Colon <dave@colon.dev>
2020-04-30 09:27:02 -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 68ee0ecfed Add changelog
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 14:39:45 -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 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 29c837557f Add changelog
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-14 17:34:20 -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
Steve Kriss 72524ffd18
bump k8s deps to v0.17.4 (#2407)
* bump k8s deps to v0.17.4

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-08 09:57:02 -07:00
Steve Kriss a65eff6fde
Merge pull request #2388 from skriss/v1.3.2-release
v1.3.2 changelog & docs
2020-04-03 11:21:43 -06: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
Steve Kriss a6b60f9f9f changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-02 13:25:00 -06:00
Steve Kriss 2203a9a055 v1.3.2 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-02 09:00:50 -06: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
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 32ab45fa27 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-17 11:21:56 -06:00
Nolan Brubaker 4f6e8c98a7
Update changelog for v1.3.1 (#2337)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-03-10 13:06:56 -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 9f8e0ca752 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-03 15:55:17 -07:00
Steve Kriss 514e24ff2c changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:22 -07:00
Steve Kriss ba7f8d2e62 v1.3.0 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-02-28 09:44:04 -07:00
Rushinth John 2ff8ad192c
Corrected selfLink in site/docs/master/output-file-format.md (#2292)
Signed-off-by: Rushinth John <rushinth@appranix.com>
2020-02-25 16:01:13 -07:00
Steve Kriss 486fc07e85 v1.3.0-beta.2 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-02-24 12:08:58 -07:00
Nolan Brubaker 766ab5d3ee
Account for possible missing schemas on v1 CRDs (#2264)
* Account for possible missing schemas on v1 CRDs

If a v1beta1 CRD without a Schema was submitted to a Kubernets v1.16
cluster, then Kubernetes will server it back as a v1 CRD without a
schema.

However, when Velero tries to restore this document, the request will be
rejected as a v1 CRD must have a schema.

This commit has some defensive coding on the restore side, as well as
potential fixes on the backup side for getting around this.

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

* Back up nonstructural CRDs as v1beta1

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

* Add tests for remapping plugin

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

* Add builders for v1 CRDs

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

* Address review feedback

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

* Remove extraneous log message

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

* Add changelog

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-02-24 12:07:50 -07:00
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
Mark Davydov 95c8cd3d66
Replaced deprecated helm repo url at docs 📄 (#2209)
* Replaced deprecated helm repo url at docs 📄

Signed-off-by: Mark Davydov <mark@monday.com>
2020-02-05 11:52:27 -08:00
Steve Kriss 88d123fcdc v1.3.0-beta.1 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-02-04 09:38:13 -07:00
Shane Utt e794d8404d
Add ARM container builds (#2227)
Signed-off-by: Shane Utt <shaneutt@linux.com>
2020-02-03 13:12:47 -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
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 4a5a63fc92
add changelog
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2020-01-29 18:24:36 +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
Patrik Cyvoct 823b1f7d6d
bump restic to 0.9.6
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-01-21 18:12:15 +01:00
Steve Kriss 65e970f59d changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-01-15 16:09:54 -07: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 f4f2351411 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-01-14 14:29:46 -07:00
Prajyot-Parab b9d02795b5 Multiarch image support (#1768)
* multi-arch docker image support

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* updated manifest for latest tag

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* updated manifest part

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* update changelog

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* Removed commented out code lines

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* minor changes

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* bumped restic version

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* refactoring vars

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* added purge flag to manifest push command

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* removed all-build from workflow

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* enabled docker_cli_experimental flag for docker manifest

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* Updated manifest related info

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>

* Updated manifests info to doc

Signed-off-by: Prajyot Parab <prajyot.parab@ibm.com>
2020-01-07 13:33:31 -05:00
Steve Kriss be140985c5 bug fix: only prioritize restoring replicasets.apps (#2157)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-12-19 09:44:08 -08:00
Steve Kriss 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 36c7ebf4b7 remove fsfreeze-pause image, replace with ubuntu in nginx example (#2068)
* remove fsfreeze-pause image, replace with ubuntu in nginx example

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

* changelog

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

* switch to sleep infinity for clarity

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-12-02 11:48:47 -08:00
Steve Kriss 3add90ba52 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-11-08 15:02:37 -07:00
Steve Kriss f016aae9c3 v1.2.0 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-11-07 08:20:22 -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
Naina Verma 984e2ce589 Update Restore Documentation (#1957)
Signed-off-by: naina verma <vnaina@cloudhealthtech.com>
2019-11-04 08:21:42 -07:00
Steve Kriss 558e4b9075
v1.2.0-beta.1 release (#1995)
* generate v1.2.0-beta.1 docs site

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

* v1.2.0-beta.1 changelog

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

* add PR 1994 changelog

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

* fix image tag

Co-Authored-By: Adnan Abdulhussein <adnan@prydoni.us>
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-10-24 15:24:18 -06:00
Steve Kriss 0c1fc8195a add --allow-partially-failed flag to velero restore create (#1994)
* add --allow-partially-failed flag to velero restore create

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

* remove extraneous client creation

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

* add godoc to helper func

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

* todo

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-10-24 14:20:57 -07:00
Antony S Bett 0450567bba Allow backup storage locations to specify backup sync period or toggle off sync (#1936)
* Allow backup storage locations to specify backup sync period or toggle off sync

Signed-off-by: Antony Bett <antony.bett@gmail.com>

* Add --backup-sync-period flag to backup location create command

Signed-off-by: Antony Bett <antony.bett@gmail.com>
2019-10-24 08:32:45 -06:00
KubeKween d26bf05b33 Extract providers (#1985)
* Remove cloud providers and reorg code

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

* Update dependencies

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

* Fix tests

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

* fix dependency issues

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

* Delete dup test

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

* Add back spaces to file

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

* Remove and update docs

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

* Make the plugins flag required

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

* Add changelog

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

* Make the plugins flag conditional

Signed-off-by: Carlisia <carlisia@vmware.com>
2019-10-22 15:31:27 -07:00
Alexander Demichev 1564317cef Restore action for cluster/namespace role bindings (#1974)
Signed-off-by: Alexander Demichev <ademicev@redhat.com>
2019-10-21 15:11:26 -06:00
FrankChen7 ae33441500 Add --no-default-storage-location flag to velero install to enable velero deployment without default BSL (#1931)
This closes #1853.

Signed-off-by: Yunqian <specyq@gmail.com>
2019-10-18 08:41:59 -06:00
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
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
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
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
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
Steve Kriss b51d725c81 changelog for PR #1864
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-09-11 09:30:37 -06:00
Adnan Abdulhussein 23376e6293 record restic restore progress in PodVolumeRestore (#1854)
* record restic restore progress in PodVolumeRestore

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

* add progress output to velero describe restore --details

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

* test getVolumeSize

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

* block on send to finish goroutine

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

* remove sync import

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

* add changelog

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

* make update

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-09-10 15:50:57 -06:00
colin bayer 8b0cf3855c Bug/1848 (#1865)
* Modifies documentation to use a wider layout; adds better md table formatting

Signed-off-by: Colin Bayer <ccbayer@gmail.com>

* Adds Changelog notes

Signed-off-by: Colin Bayer <ccbayer@gmail.com>

* remove redundant css rule

Signed-off-by: Colin Bayer <ccbayer@gmail.com>
2019-09-10 14:33:26 -06: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
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
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
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 efc0be5e48
Merge pull request #1781 from mesosphere/fix_url
fix error formatting
2019-08-22 09:32:14 -06:00
Steve Kriss dfb225807b v1.1.0 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-21 15:01:10 -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
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 76a91a80b2 v1.1.0-beta.2 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-13 13:38:01 -06: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 f18d7300a8 changelog
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-08 13:56:48 -07:00
Steve Kriss 9d9c232729
add v1.1.0-beta.1 changelog (#1733)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-07 07:51:46 -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
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
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
carthewd 22eca22ac8 Add JSON as an option for log output (#1654)
* Add JSON as an option for log output

Signed-off-by: Donovan Carthew <donovan.carthew@gmail.com>
2019-07-30 16:29:34 -07:00
Adnan Abdulhussein 248ee89123 add configurable CPU/memory requests/limits for velero pod on install (#1678)
* add configurable CPU/memory requests/limits for velero pod on install

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-29 15:13:06 -04:00
KubeKween 3b9af8c654 Store PodVolumeBackups in obj storage & use as source of truth (#1577)
* Store PodVolumeBackups in object storage

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-07-24 15:51:20 -04:00
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
Nolan Brubaker 7724464017
Merge pull request #1605 from Prajyot-Parab/add-ppc64le-support
enable support for ppc64le architecture
2019-07-09 13:43:11 -04: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
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 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