Commit Graph

2670 Commits

Author SHA1 Message Date
Wenkai Yin(尹文开)
eb332e6a77 Specify the "--snapshot-volumes=false" option explicitly when running backup with Restic
If the "--snapshot-volumes=false" isn't specified explicitly, the vSphere plugin will always take snapshots for the volumes even though the "--default-volumes-to-restic" is specified
This can be removed if the logic of vSphere plugin changes

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-09-22 22:01:11 +08:00
Daniel Jiang
d08c4bae4d Refine tag-release.sh
This commit makes several changes to `tag-release.sh` according to the
change in release process:
1. It will support a "ON_RELEASE_BRANCH" param passed via env variable.
   When it's set to "TRUE". The release will be created on the commit of
   branch like `release-xxx`.  This enables us to create release branch
   before GA and tag RC release.
2. It removes the code to push a new branch to upstream.  This is
   because we decided to create branch manually.  For patch releases, we
   will not push the change to release branch, instead, we will make
   sure the release branch has all commits cherrypicked BEFORE we run
   this script to tag the release.

After the change the script will focus on only tag the release, not
making other code change to release branches.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-09-22 21:20:03 +08:00
danfengliu
8827b4f1d9 Fix plugins incompatible issue in upgrade test (#4141)
In upgrade test, both original and to-be-upgrading velero installation should use the compatible plugins, but currently, plugin value is determined by provider.

Signed-off-by: danfengl <danfengl@vmware.com>
2021-09-21 19:39:35 -07:00
Daniel Jiang
9b7f2da192 run backup/restore describe in debug subcommand (#4161)
The errors of restore/backup may be stored in object storage
The well formatted output of describe is also helpful for debugging.
This commit add the command to the crashd script so the output of
"velero backup/restore describe xxx" can be collected

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-09-21 08:16:31 -04:00
Daniel Jiang
acea5a7601 Merge pull request #4160 from danfengliu/add-previous-fix-for-aws-back
Recovery the workround for aws pending issue
2021-09-19 16:26:56 +08:00
danfengl
f00ad306bb Recovery the workround for aws pending issue
Signed-off-by: danfengl <danfengl@vmware.com>
2021-09-19 01:27:13 +00:00
Daniel Jiang
6f64052e94 Merge pull request #4140 from ywk253100/210914_debug
Use velero debug command to dump the logs when case failed
2021-09-16 16:55:26 +08:00
Wenkai Yin(尹文开)
64229ed57c Use velero debug command to dump the logs when case failed
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-09-15 21:36:56 +08:00
Daniel Jiang
27c32850f4 Merge pull request #4142 from reasonerjt/fix-upgrade-for-v1.7
Fix the link and content for upgrade instruction
2021-09-15 09:11:47 +08:00
Daniel Jiang
67604f0e03 Fix the link and content for upgrade instruction
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-09-15 00:00:38 +08:00
Daniel Jiang
b9eb6fdb33 Merge pull request #4107 from zubron/release-1.7-rc.1
Generate docs and changelog for v1.7
v1.7.0-rc.1
2021-09-09 08:53:25 +08:00
Bridget McErlean
a4f3dc047b Add upgrade instructions for v1.7.0
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-09-08 15:50:45 -04:00
Wenkai Yin(尹文开)
bd5ba66e42 Merge pull request #4058 from danfengliu/add-upgrade-test-in-e2e-with-kibishii
Add upgrade test into E2E tests
2021-09-08 21:28:42 +08:00
danfengl
4db866a0b2 Add upgrade test into E2E tests
Signed-off-by: danfengl <danfengl@vmware.com>
2021-09-08 13:16:53 +00:00
Bridget McErlean
194a9a5f66 Generate v1.7 docs
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-09-07 23:27:01 -04:00
Bridget McErlean
5e50a50e84 Generate 1.7 changelog
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-09-07 23:03:12 -04:00
Wenkai Yin(尹文开)
9532968435 Merge pull request #4100 from reasonerjt/velero-debug-doc
Add `velero debug` to documentation
2021-09-08 07:17:35 +08:00
Daniel Jiang
2205f9d0ff Add velero debug to documentation
This commits updates the `troubleshooting` section in the doc to ask
users to collect log via `velero debug`.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-09-06 17:46:17 +08:00
codegold79
fbd6bcf504 Validate namespace in velero backup create command (#4057)
* Add namespace validation in the client

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

* Add namespace validation in the backup controller

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

* Add changelog for PR 4057

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

* Update Copyright notice

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

* Update include_excludes_test.go to follow Go standards and be easier to read

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

* Add unit tests for namespace validation functions

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

* Make changes per review comments

- use one set of namespace validation logic instead of writing two
- remove duplicate namespace validation functions and tests
- add namespace validation tests in includes_excludes_test.go

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

* Return all ns validation err msgs as error list

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

* Make error message more clear

Signed-off-by: F. Gold <fgold@vmware.com>
2021-09-03 11:03:35 -04:00
Wenkai Yin(尹文开)
305dfa0d3c Empty the "ClusterIPs" along with "ClusterIP" when "ClusterIP" isn't "None" (#4101)
More details please refer to #4098

Fixes #4098

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-09-03 10:33:50 -04:00
Daniel Jiang
240b4e666f Merge pull request #4026 from sseago/service-action-unnamed-nodeport
Distinguish between different unnamed node ports when preserving
2021-09-03 20:36:58 +08:00
Wenkai Yin(尹文开)
c62b15dff2 Merge pull request #4102 from reasonerjt/pass-velero-cmd
pass velero cli executable to crashd
2021-09-03 11:38:38 +08:00
Daniel Jiang
9d76ea835c pass velero cli executable to crashd
This commit fixes the issue when velero CLI is not in `PATH` or compiled
to other file names.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-09-02 20:02:33 +08:00
Bridget McErlean
edeec848d3 Skip restic backup/restore of DownwardAPI volumes (#4076)
Velero was including DownwardAPI volumes when backing up with restic.
When restoring these volumes, it triggered a known issue with restic (as
seen in #3863). Like projected volumes, these volumes should be skipped
as their contents are populated by the Kubernetes API server.

With this change, we are now skipping the restic backup of volumes with
a DownwardAPI source. We are also skipping the restore of any volume
that had a DownwardAPI source as there will exist backups that were
taken prior to this fix being introduced. This will allow these backups
to be restored succesfully.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-09-01 13:51:44 +08:00
Daniel Jiang
746cd616fd remove IsUnstructuredCRDReady (#4085)
This commit removes `IsUnstructuredCRDReady` since
kubernetes/kubernetes#87675 is fixed.
Is uses `Is1CRDReady` to check the readiness of CRD.

After v1.7 we may consider merge the funcx `IsV1Beta1CRDReady` and
`IsV1CRDReady`

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-09-01 13:38:17 +08:00
Daniel Jiang
8abc80ec41 Merge pull request #4082 from reasonerjt/refine-e2e
Enhance e2e test
2021-09-01 10:12:25 +08:00
Wenkai Yin(尹文开)
8d57215ded Several fixes to improve the stability of E2E testing (#4056)
1. Support to customize the restic restore helper image
2. Use a seperated context when doing the clean up works
3. Wait a while before doing the the restore for aws to avoid #1799

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-08-31 12:50:38 -04:00
Daniel Jiang
70a8a5d54d Enhance e2e test
1. Check the error when waiting for restice daemonset to be ready, so
   the timeout will be reported
2. Add support for gcp provider and fail early if the provider is
   unknown

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-08-31 21:01:21 +08:00
Daniel Jiang
7c75cd6cf8 Implement velero debug (#4022)
This PR added a subcommand `velero debug`, which leverages `crashd` to
collect logs and specs of velero server components and bundle them in a
tarball.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-08-30 18:37:18 -07:00
Daniel Jiang
74476db9d7 Merge pull request #4064 from kahirokunn/main
fixes for CVE-2021-3121 and CVE-2021-3580
2021-08-30 18:33:18 +08:00
Scott Seago
9c0dfd068b Merge pull request #4068 from ywk253100/210824_e2e_cli
Install/uninstall velero by CLI in the E2E test case
2021-08-26 15:56:03 -04:00
Wenkai Yin(尹文开)
a9f411d27a Install/uninstall velero by CLI in the E2E test case
Do this for two reasons:
1. Verify the functionalities for installation and uninstllation of CLI
2. We want to add upgrade test case which needs to install different versions of velero, calling libraries is impossible for this

fixes #4062

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-08-26 09:32:29 +08:00
Jack Lu
6b315ffcd2 Fix log print error using a wrong var name (#4063)
Signed-off-by: jacklu1024 <jacklu1024@outlook.com>
2021-08-24 10:50:45 -04:00
kahirokunn
cf42054c8c add changelog
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
2021-08-24 17:13:11 +09:00
kahirokunn
0eda0ec8b9 fixes for CVE-2021-3121 and CVE-2021-3580
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
2021-08-24 17:08:20 +09:00
eleanor-millman
94549abd90 new roadmap for 1.7 (#4048)
Signed-off-by: Eleanor Millman <emillman@vmware.com>
2021-08-20 09:05:03 -04:00
Wenkai Yin(尹文开)
23e0e5d18f Change the base image to distroless (#4055)
Change the base image to distroless

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-08-20 16:01:06 +08:00
Lars Lehtonen
15d7a9dfb6 internal/delete: fix dropped error (#4016)
Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2021-08-18 15:02:41 +08:00
Himanshu Mehra
326dc07a12 Add documentation for TLS error 116 (#3811)
* Add document for TLS error 116

When using a custom S3 compatible server, backups/restore may fail with
TLS error 116. This happens because the S3 server expects Velero to
send client certificate during SSL TLS v1.3 handshake.
You will need to modify your S3 server settings to turn off client
certificate authentication.

Signed-off-by: Himanshu Mehra <himanshu.mehra91@gmail.com>

* Add document for TLS error 116

When using a custom S3 compatible server, backups/restore may fail with
TLS error 116. This happens because the S3 server expects Velero to
send client certificate during SSL TLS v1.3 handshake.
You will need to modify your S3 server settings to turn off client
certificate authentication.

Signed-off-by: Himanshu Mehra <himanshu.mehra91@gmail.com>

* Address comments from reviewers

Signed-off-by: Himanshu Mehra <himanshu.mehra91@gmail.com>
2021-08-17 18:52:19 -07:00
Dharma Bellamkonda
dc1f17944e Page list requests by default (#3823)
Signed-off-by: Dharma Bellamkonda <bellamko@adobe.com>
2021-08-17 18:49:41 -07:00
Wenkai Yin(尹文开)
31a8e5080c Wait the namespace deletion completed before removing the CRDs (#4007)
Wait the namespace deletion completed before removing the CRDs when uninstalling the velero

Fixes #3974

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-08-17 08:55:22 -07:00
Tiger Kaovilai
8da679aa31 Update ibm-config.md (#4024)
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2021-08-16 07:53:29 -04:00
David L. Smith-Uchida
823bee7761 Changed format of download request name to use a random UUID rather than (#4034)
a timestamp.  If two requests were happening very close together for the
same backup, the second would fail randomly.

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-08-16 07:46:07 -04:00
Wenkai Yin(尹文开)
d913f83c72 Fix the random failure of E2E test cases (#4005)
Fix the random failure by increasing the timeout and introducing few minor refactor/bug fixes

Fixes #3970

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-08-12 09:44:24 +08:00
Scott Seago
bf6062147b Merge pull request #4028 from zubron/add-restore-item-action-to-skip-automanaged-apiservices
Skip restore of APIServices managed by Kubernetes
2021-08-11 20:09:56 -04:00
Bridget McErlean
368098b727 Use LabelSelector in Action ResourceSelector
Instead of converting the unstructured item to check for the presence of
the `kube-aggregator.kubernetes.io/automanaged` label, use this label in
the `AppliesTo` to enable the restore logic to select the item. This
means that any item that matches the selector will have restore skipped.

Also add a new test case to the restore action test to check that label
selectors are applied correctly.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-08-11 17:33:31 -04:00
Bridget McErlean
984176f156 Skip restore of APIServices managed by Kubernetes
It was discovered during Velero 1.6.3 upgrade testing that Velero was
restoring `APIService` objects for APIs that are no longer being served
by Kubernetes 1.22. If these items were restored, it would break the
behaviour of discovery within the cluster.

This change introduces a new RestoreItemAction plugin that skips the
restore of any `APIService` object which is managed by Kubernetes such
as those for built-in APIs or CRDs. The `APIService`s for these will be
created when the Kubernetes API server starts or when new CRDs are
registered. These objects are identified by looking for the
`kube-aggregator.kubernetes.io/automanaged` label.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-08-10 18:22:00 -04:00
Scott Seago
8d714d38ea Distinguish between different unnamed node ports when preserving
Signed-off-by: Scott Seago <sseago@redhat.com>
2021-08-09 16:35:07 -04:00
Scott Seago
ed5809b7fc Merge pull request #4012 from jenting/add-k8s-1.22-ci-test
Add Kubernetes v1.22 CI test
2021-08-05 20:31:58 -04:00
JenTing Hsiao
52896e808f Add Kubernetes v1.22 CI test
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-08-06 06:26:30 +08:00