Commit Graph

155 Commits (7c80939d894de0feff866355777a86ef3a063cca)

Author SHA1 Message Date
danfengliu ef443fece0
Add UT for pkg/cmd/cli/backup (#6400)
Signed-off-by: danfengl <danfengl@vmware.com>
2023-06-21 11:10:13 +08:00
danfengliu 114193ae3b
add ut for pkg client factory (#6371)
Signed-off-by: danfengl <danfengl@vmware.com>
2023-06-09 09:59:19 +08:00
Wenkai Yin(尹文开) 4d28a1a2a3 Skip running unit test for pkg/builder package
Skip running unit test for pkg/builder package

fixes #6251

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-05-29 09:26:12 +08:00
lyndon 5b75f35262
Add data mover CRD under v2alpha1 (#6176)
* add data mover CRD under v1alpha1

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* data mover CRDs to v2alpha1

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* data mover crd changes

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-16 15:09:54 -04:00
lyndon ea4e49f503
Merge pull request #6248 from Lyndon-Li/bump-up-kopia-v0.13
Bump up kopia v0.13
2023-05-15 10:44:19 +08:00
Lyndon-Li 307b82a2ec bump up kopia v0.13.0
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-15 07:23:38 +08:00
Tiger Kaovilai 07712f4d6a
run gofmt goimports for every files in parallel
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-05-05 13:59:40 -04:00
Xun Jiang bbc1e2e151 Enable stylecheck linter and resolve found issues.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-25 14:37:02 +08:00
Xun Jiang/Bruce Jiang 1fd28e8a36
Fix usestdlibvars and whitespace linters issues. (#6162)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-24 09:10:55 +08:00
Daniel Jiang 14f31eed8c
Merge pull request #6109 from blackpiglet/modify_goreleaser
Fix goreleaser issues and add new goreleaser action.
2023-04-18 15:00:41 +08:00
Xun Jiang 0be3f5a3e7 Update Golang to v1.20 for main branch.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-17 13:26:46 +08:00
Xun Jiang e779cd2b76 Fix goreleaser issues and add new goreleaser action.
Fix goreleaser script's bug.
Add a new Github action to verify goreleaser related modification.

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-11 17:03:20 +08:00
Xun Jiang/Bruce Jiang 42ec72146d Merge branch 'main' into update_golang_version_new
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-04 05:56:05 +00:00
Xun Jiang fc692c49e6 Update Golang version to v1.19 for branch main.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-04 12:00:19 +08:00
Xun Jiang/Bruce Jiang 15d44724e7
Modify golangci.yaml file. Resolve found lint issues. (#6008)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-24 12:15:08 +08:00
Wenkai Yin(尹文开) c58854fc41 Skip running unit test for test package
Skip running unit test for test package

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2023-03-15 17:49:24 +08:00
Anshul Ahuja 1730f8bcb4 upgrade and fix goreleaser issue
Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com>
2023-02-22 06:36:51 +00:00
Xun Jiang 955eec7033 Enable staticcheck linter. Disable check for folder /pkg and /test by now.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-20 13:52:13 +08:00
Ming e6c8f3afa5 Bump up restic version to 0.15.0
Signed-off-by: Ming <mqiu@vmware.com>
2023-01-19 02:43:09 +00:00
Xun Jiang 601f4a9985 Add GOARM in Restic builder. Add PR container build action.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-17 17:24:21 +08:00
Xun Jiang 7d916485ec Add Restic builder in Dockerfile.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-13 14:32:22 +08:00
Scott Seago 9a54142257 BackupItemAction v2 API implementation
Signed-off-by: Scott Seago <sseago@redhat.com>
2023-01-09 18:36:47 -05:00
Daniel Jiang 2dce4a7cb5 Update the api-types doc
This commit makes update to the update api-types docs to add missing
fields.
It also includes misc changes to the inline comment, and a change to
Dockerfile to make sure the build-image works on mac

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-11-25 14:39:41 +08:00
lyndon 9dbd9694d8
Merge pull request #5606 from jenting/bump-goreleaser
Bump goreleaser to v1.12.3
2022-11-24 16:42:03 +08:00
JenTing Hsiao 31e2137154
Bump goreleaser to v1.12.3
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-11-22 13:34:11 +08:00
Ming 9a5ba8f08b Fix restic cross platform compile
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-09 12:42:44 +00:00
Ming fc0c470395 Add compile restic binary for CVE fix
Signed-off-by: Ming <mqiu@vmware.com>
2022-11-09 07:29:18 +00:00
danfengl 0b6df61eca Upload Velero build package saved from build image to Google cloud storage
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-08 13:44:04 +00:00
Lyndon-Li df5436b380 upgrade velero docker image
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-18 20:23:42 +08:00
Scott Seago b15c59ba69 Don't move velero v1 plugins to new proto dir
To preserve backwards compatibility, don't move velero
v1 plugins to new proto dir.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-09-05 16:01:56 -04:00
Scott Seago 4f2c2d2679 updated to newer protoc/protoc-gen-go
Signed-off-by: Scott Seago <sseago@redhat.com>
2022-08-25 21:28:03 -04:00
Scott Seago 6b8353081a renamed update files so that protoc is run before CRD update.
If generating protoc go files from scratch, `make update` fails if
CRD generation happens first, since the protoc-generated
files are imported by the api go files.
protoc generation needs to happen earlier.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-08-25 17:23:35 -04:00
Hoang, Phuong b54424bdc6 Refactor BackupItemAction to backupitemaction/v1
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-08-25 17:10:09 -04:00
lyndon 775943c858
code spell check (#5230)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-08-18 18:17:39 +08:00
Xun Jiang e8da5df57a Reduce CRD size.
1. Make the Restore hook.InitConatianer server side field pruing disable.
2. Remove restore patch in update-generate-crd-code.sh.
3. Modify related testcases.
4. Add Container fields validation in Restore Init hook.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-08-02 19:45:01 +08:00
Wenkai Yin(尹文开) 28bc8b7eef Use controller-gen to generate the deep copy methods for objects
As we are refactoring controllers with kubebuilder, use the controller-gen rather than code-generator to generate the deep copy methods for objects

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-18 21:18:00 +08:00
Wenkai Yin(尹文开) 016ac129c6 Refactor schedule controller with kubebuilder
Refactor schedule controller with kubebuilder

fixes #4671

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-07 17:32:52 +08:00
Wenkai Yin(尹文开) 0b9c704da1
Merge pull request #4677 from ywk253100/220221_main
[cherry-pick]Enable building and pushing image for release branches
2022-02-28 16:01:34 +08:00
Daniel Jiang 9f46b10b70 Enable coverage in test.sh and upload to codecov
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-02-28 10:59:49 +08:00
Wenkai Yin(尹文开) fc2760d206 Append "-dev" suffix for the image tag of release branches
Append "-dev" suffix for the image tag of release branches: release-1.0-dev

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-02-21 19:29:02 +08:00
Wenkai Yin(尹文开) 59ff57b3c6 Enable building and pushing image for release branches
Enable building and pushing image for release branches

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-02-21 17:47:06 +08:00
Wenkai Yin(尹文开) f1dea158d0 Don't exit when getting no match for grep
Don't exit when getting no match for grep

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-02-18 09:08:33 +08:00
Daniel Jiang a251fffc69 Make sure the tag-release script fail on any error
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-02-08 10:55:19 +08:00
Daniel Jiang a3d196ee85 Bump up Go to 1.17
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-12-06 20:16:24 +08:00
Xun Jiang 303d3dcad3 feat: migrate kubebuilder from v2 to v3
1. remove config/crd/v1beta1
2. remove PROJECT file
3. update controller-gen and kubebuilder version
4. generate client and CRD file
5. add changelog and remove v1beta1 CRD generated code.
6. add kubebuilder test bundle setup command.
7. due to apiextensions.k8s.io/v1beta1 is not supported, only k8s after v1.16 is supported, so remove v1.15 check.
8. add CRD and k8s suppored version update in changelog.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2021-11-23 19:32:19 +08:00
Wenkai Yin(尹文开) 9f0ea22c60
Fix CVE-2020-29652 and CVE-2020-26160 (#4274)
Bump up restic to v0.12.1 to fix CVE-2020-26160.
Bump up module "github.com/vmware-tanzu/crash-diagnostics" to v0.3.7 to fix CVE-2020-29652.
The "github.com/vmware-tanzu/crash-diagnostics" updates client-go to v0.22.2 which introduces several break changes, this commit updates the related codes as well

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-11-03 13:30:26 -07: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
Daniel Jiang 6ae9a6eb37
Bump up Go to 1.16 (#3990)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-07-29 23:56:08 -07:00
JenTing Hsiao 11fcace0c4 Update script to generate both v1beta1 and v1 CRDs
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-07-27 17:55:10 -04:00
Bridget McErlean 198ea57407 Allow registry to be configured at build time
This adds a new `buildinfo` variable `ImageRegistry` that can set at
build time like the `Version` variable. This allows us to customise the
Velero binary to use different registries.

If the variable is set, this variable wille be used when creating the
URIs for both the main `velero` and `velero-restic-restore-helper`
images. If it is not set, default to using Dockerhub (`velero/velero`,
`velero/velero-restic-restore-helper`).

There are numerous ways in which the Velero binary can be built so all
of them have been updated to add the new link time flag to set the
variable:
* `make local` (used for local developer builds to build for the local
  OS and ARCH)
* `make build` (used by developers and also VMware internal builds to
  build a specific OS and ARCH)
* Goreleaser config (used when creating OSS release binaries)
* Dockerfile (used to build the Velero binary used within the image)

All of these workflows are currently triggered from our Makefile where
the variable `REGISTRY` is already available with the default value of
`velero` and used to build the image tag. Where the new `ImageRegistry`
build variable is needed, we pass through this Makefile variable to
those tasks so it can be used accordingly.

The GitHub action and the `./hack/docker-push.sh` script used to push
container images has not been modified. This will continue to use the
default registry specified in the Makefile and will not explicitly pass
it in.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-07-14 15:42:53 -04:00