Commit Graph

2054 Commits (v1.4.3)

Author SHA1 Message Date
Nolan Brubaker 4fc1c70028
v1.4.3 cherry-picks and changelogs (#3025)
* 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>

* fix: rename the PV if VolumeSnapshotter has modified the PV name (#2835)

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>
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* 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>

* Update changelogs for v1.4.3

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

Co-authored-by: Pawan Prakash Sharma <pawanprakash101@gmail.com>
Co-authored-by: Scott Seago <sseago@redhat.com>
2020-10-20 14:20:24 -07:00
Nolan Brubaker 56a08a4d69
Backport GitHub Actions Docker image building to 1.4 series (#2706)
* setup ci in github actions

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

* remove travis config

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

* Add changelog for v1.4.2

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

* update build status badge on readme

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

* 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>

* Update changelogs

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

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
Co-authored-by: Steve Kriss <krisss@vmware.com>
2020-07-13 12:35:26 -07:00
Nolan Brubaker 6e0469e7f3
Add changelogs for v1.4.1 (#2703)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-07-13 11:06:46 -07:00
Nolan Brubaker 100541d9c2
v1.4.1 cherrypicks (#2704)
* Adjust restic timeout and pod values up (#2696)

* Adjust restic timeout and pod values up

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

* 🐛 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>

* 🏃‍♂️ pass git state to build from makefile

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

* Add scripts for tagging Velero releases (#2592)

* Add release tools

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

* Document the tag-release release tool

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

* Make sure the upstream used is correct

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

* Add copyright statement

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

* Address review feedback

* Pause to allow for cherry-picking on the release branch before pushing
  it
* Move master branch logic into an else statement
* Correct typo

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

* Uncomment check for dirty git working tree

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

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-13 11:02:42 -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
Nolan Brubaker 7e627f8380
Clarify cloud platform wording in README (#2579)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-26 12:56:05 -07:00
Nolan Brubaker 0effb5d74b
Merge pull request #2576 from skriss/fix-2562
bug fix: pass ca cert file to restic stats command on restore
2020-05-26 15:16:28 -04:00
Steve Kriss 98c1a34558 bug fix: pass ca cert file to restic stats command on restore
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-26 10:16:03 -06:00
Nolan Brubaker 5cc0b0bc6e
Merge pull request #2560 from skriss/save-progress-updates
Save backup progress updates to object storage
2020-05-26 12:10:08 -04:00
Steve Kriss 92693ad422 update backup struct with progress updates
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-21 15:40:59 -06:00
Steve Kriss 3f6183b522 add missing kubebuilder tags
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-21 15:30:12 -06:00
Steve Kriss 98261ee9a0
fix broken link on website (#2556)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-21 09:55:37 -07:00
Nolan Brubaker 3c6341d3fc
Document airgapped installation (#2552)
* Document airgapped installation

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

* Document restic image and specific images

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-20 17:45:58 -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 92cac03a82
📖 Document CSI operation overview and usage (#2517)
* Document CSI operation overview and usage

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

* Move documentation around

* Move some prereqs into installation
* Document deletion logic

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

* Update based on review feedback

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

* Add changes to v1.4-pre version

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

* Correct CSI plugin image

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-18 08:51:22 -06:00
Nolan Brubaker df239b92b6
Document using a public URL to access logs (#2314)
* Document using a public URL to access logs

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

* Update documentation to clarify why HTTP endpoints

Also mention custom certificates on master & v1.4.0.

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

* Remove information about split TLS minio installs

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

* Fix typo and use kubectl patch command

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-12 14:15:40 -07:00
Nolan Brubaker c1494d6804
Tweak VolumeSnapshotContent describe output (#2534)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-12 13:58:47 -07:00
Nolan Brubaker 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 09d9342bd6
Merge pull request #2525 from ashish-amarnath/fix-changelog-gen
🐛 Fix change log generation
2020-05-11 13:46:59 -04:00
Ashish Amarnath e85ffcb415 fix change log generation
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-08 16:38:10 -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
Nolan Brubaker f1eeff7a91
Merge pull request #2521 from ashish-amarnath/add-shortlink
Add shortlink for CSI docs
2020-05-08 15:08:56 -04:00
Ashish Amarnath 8d3ef6384b add shortlink for CSI docs
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-08 11:57:24 -07:00
Nolan Brubaker e91dfe3d91
Remove comment that has been turned into an issue (#2500)
Logged comment as issue #2499

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-08 09:27:01 -07:00
Steve Kriss d498406c35
v1.4 upgrade instructions (#2509)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-08 09:15:53 -07:00
Ashish Amarnath c48354bdd5
document --features (#2511)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-07 15:15:55 -07:00
Nolan Brubaker 5ee4e47b64
Merge pull request #2516 from skriss/2440-changelog
add changelog for PR #2440
2020-05-07 15:14:55 -04: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
Nolan Brubaker de8962ea18
Bug fix: Calculate label using backup name for CSI objects (#2510)
* Use a helper function when querying w/ backup label

Setting or querying for a backup label name should always pass the value
through the GetValidName function. This change passes query uses of the
backup label value through the GetValidName function by introducing 2
new helpers, one for making a Selector, one for making a ListOptions.

It also removes functions returning the same data, but under
unecessarily specific names.

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

* Document using the label.GetValidName function

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

* Update copyright year

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

* Clarify labels.GetValidName and annotations

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

* Move functions to pkg/label

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

* Fix function comments

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-07 11:56:13 -07:00
Nolan Brubaker abae81ddc8
Merge pull request #2440 from skriss/backup-progress
report backup progress
2020-05-07 14:51:20 -04:00
Nolan Brubaker 3411cb7b25
Merge pull request #2512 from ashish-amarnath/revert-verbose-test
🏃‍♂️ Revert verbosity of tests
2020-05-06 20:51:16 -04:00
Ashish Amarnath f3a4efe075 revert verbosity of tests
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-06 16:01:19 -07:00
Ashish Amarnath c49afd44bd
Use label selector to list VSCs to persist (#2502)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-06 11:04:34 -07:00
Ashish Amarnath 911a607cf8
Allow feature flags to be passed from install CLI (#2503)
* allow feature flags to be passed from install CLI

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-06 10:52:44 -07:00
Ashish Amarnath 577e87d1b8
Sync CSI API objects during backup sync (#2496)
* add changelog

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

* Sync CSI API volumesnapshotcontents during backup sync

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-06 08:00:05 -06:00
Nolan Brubaker 8671a639c9
Backup entire v1beta1 CRD instead of just changing version string (#2478)
* Switch to backing up v1beta1 CRDs from API server

Instead of simply switching out the APIVersion string on a v1
CustomResourceDefinition object, re-download the object from the API
server entirely to get the correct fields.

This should fix validation errors upon restore.

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

* Fix existing tests

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

* Add full example CRDs to automated tests

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

* Move beta CRD lookup into helper function

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

* Add case for preserveUnknownFields CRDs

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

* Add PreserveUnknownFields case and refactor execute

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

* Add older prometheus CRD test cases

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

* Add changelog

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-05 13:21:28 -07:00
Ashish Amarnath 6b5a084f32
Delete dangling volumesnapshotcontents from velero backups (#2480)
* Delete dangling volumesnapshotcontents from velero backups

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

* add changelog

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

* handle not found errors from VSC delete

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

* clean up unit tests

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-04 15:41:27 -04:00
Steve Kriss 4b0f654a1e add progress info to backup status
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-01 15:30:50 -06:00
Steve Kriss 30ca0e4322 split out collecting items from backing up items
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-01 15:30:42 -06:00
Steve Kriss 19c52434b4 simplify group/resource/item backupper structure
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-05-01 15:29:01 -06:00
Nolan Brubaker 577af5a5b1
Merge pull request #2487 from skriss/fix-error-logging
don't return an error from log hook if value is not an error type
2020-05-01 16:11:16 -04:00
Nolan Brubaker 1ed5a13012
Merge pull request #2484 from skriss/fix-2319
bug fix: fix int/float conversion issue with CRD type in restore plugin
2020-05-01 16:09:57 -04:00
Ashish Amarnath bf52caf658
Delete CSI volumesnapshots created as part of a backup in its deletion (#2411)
* delete CSI volumesnapshots in backup on backup delete

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

* set vsc deletionpolicy to delete prior to vs deletion

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

* add more unit tests

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

* add change log

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

* passes build need to pass unit tests

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

* remove GetNamespacesInBackup

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

* fix unit tests

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

* check feature flag instead of nil check

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

* cleanup

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-01 16:05:20 -04:00
Rafael Brito 0d97f9400e
Backup all groups and versions with backward compatibility (#2373)
* Backup all API Groups versions while keeping backward compatibility

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

* Backup all API Groups versions while keeping backward compatibility

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

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

Signed-off-by: Rafael Brito <rbrito@vmware.com>
2020-05-01 15:54:57 -04:00
Jonas Rosland e569637dc7
Add GitHub links to team member list (#2492)
Signed-off-by: jonasrosland <jrosland@vmware.com>
2020-05-01 11:46:02 -07: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
Martin Odstrčilík 26f67f1b10
add support for getting Azure Storage Account key from ENV variable (#2455)
Signed-off-by: Martin Odstrcilik <martin.odstrcilik@gmail.com>
2020-05-01 07:55:50 -07:00
Ashish Amarnath d10970b3db
update csi docs with implementation choices and known issues (#2469)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-04-30 16:07:11 -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