Commit Graph

2454 Commits

Author SHA1 Message Date
JenTing Hsiao
e2581866bc Support both v1beta1 and v1 CRDs for velero
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-07-29 07:37:07 +08:00
Wenkai Yin(尹文开)
037e475227 Upgrade Velero ClusterRoleBinding to use v1 API (#3995)
* Upgrade Velero ClusterRoleBinding to use v1 API

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

* Add the change log

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>

Co-authored-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-07-27 22:38:10 -07:00
Daniel Jiang
8c9cdb9603 Merge pull request #3971 from zubron/release-1.6.2
Add cherry-pick commits and changelog for v1.6.2
v1.6.2
2021-07-20 12:29:28 +08:00
Bridget McErlean
a77702c885 Add changelog for v1.6.2
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-07-16 15:24:05 -04:00
Bridget McErlean
1d882c6509 Merge pull request #3928 from zubron/customize-velero-image-at-build-time
Allow image registry to be configured at build time

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-07-16 15:23:53 -04:00
Bridget McErlean
07060d7fea Update k8s libraries to latest patch version (#3953)
Also enforce the use of the latest version of github.com/gogo/protobuf.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-07-16 15:10:16 -04:00
Bridget McErlean
ef34b9b654 Merge pull request #3889 from zubron/release-1.6.1
Add cherry-pick commits and changelog for v1.6.1
v1.6.1
2021-06-22 09:15:31 -04:00
Bridget McErlean
e22d6591e4 Add changelog for v1.6.1
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-06-21 12:01:27 -04:00
Scott Seago
38493995ad regression introduced in 1.6 restore progress: fix CR restore (#3845)
Signed-off-by: Scott Seago <sseago@redhat.com>
2021-06-21 12:01:21 -04:00
Bridget McErlean
74a0b39e3e Skip volume restores from projected sources (#3877)
In #3863, it was discovered that volumes from projected sources were
being backed up by restic when they should have been skipped. Restoring
these volumes triggers a known bug in restic.

In #3866, we started skipping volumes from a projected source, however
there will exist backups that were taken before this fix was introduced.
This change modifies the restore logic to skip the restore of any volume
that came from a projected source, allowing backups taken before #3866
to be restored successfully.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-06-21 12:01:21 -04:00
codegold79
a378d3a9d4 API groups e2e tests remove controllers (#3564)
* Remove controllers and sleeps in API groups e2e tests

Signed-off-by: F. Gold <fgold@vmware.com>

* Print command in AfterEach(...) and check error

Signed-off-by: F. Gold <fgold@vmware.com>

* Make change ahead of PR3764 changes in main

Signed-off-by: F. Gold <fgold@vmware.com>

* Update go.{mod,sum} files

Signed-off-by: F. Gold <fgold@vmware.com>

* Run make update

Signed-off-by: F. Gold <fgold@vmware.com>
2021-06-21 12:01:21 -04:00
Scott Seago
0f576fb748 Merge pull request #3866 from alaypatel07/fix-projected-volume-for-restic
skip backuping projected volume when using restic

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-06-21 12:00:58 -04:00
Carlisia Thompson
119529c9a2 Consolidate api clients for e2e tests (#3764)
* Consolidate api clients
* Adress Nolan reviews
* Adding back output warning for consistency
* Remove unnecessary documentation
* Address Bridget's reviews
* Update go.sum files

Signed-off-by: Carlisia <carlisia@grokkingtech.io>
Co-authored-by: Bridget McErlean <bmcerlean@vmware.com>
2021-06-21 11:17:35 -04:00
Carlisia Thompson
2c26119b10 A small refactor of the e2e tests (#3726)
* A small refactor of the e2e tests

Signed-off-by: Carlisia <carlisia@grokkingtech.io>

* Add copyright header

Signed-off-by: Carlisia <carlisia@grokkingtech.io>

* Fix CI

Signed-off-by: Carlisia <carlisia@grokkingtech.io>

* Revert unneeded changes

Signed-off-by: Carlisia <carlisia@grokkingtech.io>

* Remove file that doesnt belong here

Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2021-06-21 11:17:08 -04:00
Ashish Amarnath
cbccdbd05a 🐛 Fix plugin name derivation from image name (#3711)
* 🐛 Fix plugin name derivation from image name

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

* changelog

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2021-06-21 09:43:33 -04:00
David L. Smith-Uchida
5bd70fd8ee Merge pull request #3673 from zubron/release-1.6-changelog-docs
Add changelog and docs for v1.6.0
v1.6.0
2021-04-12 14:54:26 -07:00
Bridget McErlean
b7c166e019 Add changelog and docs for v1.6.0
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-04-12 16:00:34 -04:00
Carlisia Thompson
9f24587cef Upgrade docs for v1.6.0-rc2 (#3662)
* Update changelog for v1.6.0-rc.2

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

* Update docs for v1.6.0-rc.2

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

* Upgrade docs for v1.6.0-rc2

Signed-off-by: Carlisia <carlisia@vmware.com>
v1.6.0-rc.2
2021-04-05 15:31:30 -04:00
Carlisia Thompson
c65c17c559 Revert printer columns (#3652)
* Revert "Add additional printer columns for CRDs (#2881)"

This reverts commit 4178d9de32.

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

* Add generated files

Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-31 14:46:37 -07:00
David L. Smith-Uchida
52d4a4693a Merge pull request #3637 from zubron/release-1.6-rc1
Add changelog and docs for v1.6.0-rc.1
v1.6.0-rc.1
2021-03-29 09:32:23 -07:00
Bridget McErlean
5e72b87ef7 Add changelog and docs for v1.6.0-rc.1
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-29 10:56:05 -04:00
Bridget McErlean
9a9525725d Allow Dockerfiles to be configurable (#3634)
For internal builds of Velero, we need to be able to specify an
alternative Dockerfile which uses an alternative image registry to pull
the base images from. This change adapts our Makefile such that both the
main Dockerfile and build image Dockerfile can be overridden.

We have some special handling for the build image to only build when the
Dockerfile has changed. In this case, we check whether a custom
Dockerfile has been provided, and always rebuild in that case. For
custom build image Dockerfiles, use a fixed tag rather than the one
based on commit SHA of the original file.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-26 17:30:40 -07:00
David L. Smith-Uchida
6a6734789e Merge pull request #3618 from carlisia/c-uninstall
Make uninstall more robust and informative
2021-03-25 19:13:01 -07:00
Carlisia
e498a23311 Remove unnecessary check
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-25 17:26:44 -07:00
Carlisia
6decba9dda Adress Ashish's second review
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-25 17:21:23 -07:00
David L. Smith-Uchida
242fba9c05 Runs vSphere tests with snapshots (#3629)
Added wait for vSphere plug-in uploads to complete

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-03-25 17:46:57 -04:00
Carlisia
c64f45e044 Address Ashish's review
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-25 14:31:21 -07:00
Carlisia
ae47ac0948 Addressed Bridget's review
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-25 13:36:49 -07:00
Carlisia
61c891f055 Addressed Dave's review
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-25 13:24:30 -07:00
Carlisia
4fff2a4a5c Make uninstall more robust and informative
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-23 18:00:38 -07:00
David L. Smith-Uchida
e9c997839e Added volume snapshot test for backup/restore. (#3592)
Snapshot tests can be run with Ginkgo focus "Snapshot" and restic tests with Ginkgo focus "Restic".
Restic and volume snapshot tests can now be run simultaneously.
Added check for kibishii app start after restore.
Consolidated kibishii pod checks into waitForKibishiiPods.
Added WaitForPods function to e2e/tests/common.goSnapshot tests are skipped automatically on kind clusters.
Fixed issue where velero_utils InstallVeleroServer was looking for the Restic daemon set in the "velero" namespace only (was ignoring io.Namespace)

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-03-17 14:38:47 -04:00
David L. Smith-Uchida
69334d782b Merge pull request #3590 from carlisia/c-1.2
Upgrade e2e tests to new plugin versions (v1.2)
2021-03-16 11:24:37 -07:00
Carlisia Thompson
68320362d5 Improve GH Action PR assign + labeling (#3584)
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-16 23:52:50 +08:00
Carlisia Thompson
50b7201508 Update upgrade docs (#3568)
* Update upgrade docs

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

* Update TOC

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

* The right next version is v1.6.0-beta.1

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

* Correct the listing order

Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-16 11:43:08 -04:00
Carlisia
c032f12232 Upgrade e2e tests to new plugin versions (v1.2)
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-15 16:06:16 -07:00
codegold79
c8dfd648bb Restore progress reporting bug fix (#3583)
* Improve readbility and formatting of pkg/restore/restore.go

Signed-off-by: F. Gold <fgold@vmware.com>

* Update paths to include API group versions

Signed-off-by: F. Gold <fgold@vmware.com>

* Use full word, 'resource' instead of 'resrc'

Signed-off-by: F. Gold <fgold@vmware.com>
2021-03-15 18:51:07 -04:00
Bridget McErlean
70287f00f9 Install plugins for additional BSL in E2E test (#3582)
The test for multiple credentials assumed that the plugin for the
additional BSL provider was already installed. This will not be the case
when performing a clean install of Velero between tests.

This adds a new utility function to add the plugins that are necessary
for the additional BSL provider. It doesn't check which plugins are
already installed, it will just attempt to install and if the stderr
contains the message that it is a duplicate plugin, we ignore the error
and continue. This could be improved by instpecting the output from
`velero plugin get` but I opted for a quicker solution given the
upcoming release.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-14 23:23:41 -07:00
David L. Smith-Uchida
b191140cf1 Updated Azure plugin in e2e tests to 1.1.2 (latest) (#3585)
Updated vSphere plugin in e2e tests to 1.1.0 (latest)

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-03-14 23:21:05 -07:00
Ashish Amarnath
2cddda84c5 Upgrade restic from v0.9.6 to v0.12.0 (#3528)
* Upgrade restic from v0.9.6 to v0.12.0

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

* add changelog

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2021-03-11 13:11:23 -05:00
Bridget McErlean
9ffffda11e Use Credential from BSL for restic commands (#3489)
* Use Credential from BSL for restic commands

This change introduces support for restic to make use of per-BSL
credentials. It makes use of the `credentials.FileStore` introduced in
PR #3442 to write the BSL credentials to disk. To support per-BSL
credentials for restic, the environment for the restic commands needs to
be modified for each provider to ensure that the credentials are
provided via the correct provider specific environment variables.
This change introduces a new function `restic.CmdEnv` to check the BSL
provider and create the correct mapping of environment variables for
each provider.

Previously, AWS and GCP could rely on the environment variables in the
Velero deployments to obtain the credentials file, but now these
environment variables need to be set with the path to the serialized
credentials file if a credential is set on the BSL.

For Azure, the credentials file in the environment was loaded and parsed
to set the environment variables for restic. Now, we check if the BSL
has a credential, and if it does, load and parse that file instead.

This change also introduces a few other small improvements. Now that we
are fetching the BSL to check for the `Credential` field, we can use the
BSL directly to get the `CACert` which means that we can remove the
`GetCACert` function. Also, now that we have a way to serialize secrets
to disk, we can use the `credentials.FileStore` to get a temp file for
the restic repo password and remove the `restic.TempCredentialsFile`
function.

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

* Add documentation for per-BSL credentials

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

* Address review feedback

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

* Address review comments

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-11 13:10:51 -05:00
Bridget McErlean
3656f45f55 Partially revert adding credentials to VSL (#3561)
We are no longer adding the Credentials field to the VSL so this reverts
part the change that added it (#3409).

The original PR also added the `snapshot-location set` command. This
command only included options for setting the credential but is part of
the work for #2426. Due to this, the command has been left in place
(with the credentials option removed) but has been hidden.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-11 10:10:27 -08:00
David L. Smith-Uchida
574bc16aa1 Merge pull request #3559 from zubron/add-e2e-test-for-multi-creds
Add E2E test for multiple credentials
2021-03-10 15:00:26 -08:00
Bridget McErlean
26c14933cc Address review comments
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-10 17:35:17 -05:00
Bridget McErlean
9ad1e898d6 Add E2E test for multiple credentials
This change adds an E2E test which exercises the mulitple credentials
feature added in #3489. The test creates a secret from the given
credentials and creates a BackupStorageLocation which uses those
credentials. A backup and restore is then performed to the default
BSL and to the newly created BSL.

This change adds new flags to the E2E test suite to configure the BSL
created and used in the test.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-10 16:43:47 -05:00
Ashish Amarnath
55a9b65c17 Prefer conditional waiting over magic sleep (#3527)
* prefer conditional waiting over magic sleep

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

* update go modules

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2021-03-09 13:32:30 -08:00
David L. Smith-Uchida
afe47aeec8 Proposed 1.7.0 roadmap (#3537)
Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-03-08 17:04:30 -08:00
Nolan Brubaker
a76cacd2ca Assign a smaller number of reviewers to PRs (#3543)
Using a smaller number of reviewers should increase responsiveness and
accountability.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2021-03-08 16:28:03 -08:00
Ashish Amarnath
5778752d2c fix broken build (#3525)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2021-03-05 06:30:44 +08:00
Bridget McErlean
b9a8c0b254 Pass configured BSL credential to plugin via config (#3442)
* Load credentials and pass to ObjectStorage plugins

Update NewObjectBackupStore to take a CredentialsGetter which can be
used to get the credentials for a BackupStorageLocation if it has been
configured with a Credential. If the BSL has a credential, use that
SecretKeySelector to fetch the secret, write the contents to a temp file
and then pass that file through to the plugin via the config map using
the key `credentialsFile`. This relies on the plugin being able to use
this new config field.

This does not yet handle VolumeSnapshotLocations or ResticRepositories.

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

* Address code reviews

Add godocs and comments.
Improve formatting and test names.

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

* Address code reviews

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-04 13:43:15 -08:00
Pranav Gaikwad
c46fe71b12 Restore progress reporting (#3125)
* restore progress reporting

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>

* add restore statistics to describe restore

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>

* address feedback, include namespaces in the count

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
2021-03-04 16:21:44 -05:00