Commit Graph

120 Commits (752b28166fccf82384e924b59f72465571c835ac)

Author SHA1 Message Date
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
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 3286834a90
Download restic binary using curl (#3421)
With #3327, the restic binary for the Tilt Velero image is downloaded on
the local machine using the `./hack/download-restic.sh` script. This
script relies on `wget` being availabe on the local machine. `wget` is
not commonly available on macOS but `curl` is. This change modifies the
`./hack/download-restic.sh` script to use `curl` instead as it is
available on both Linux and macOS and is available in our `golang`
docker build image.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-02-08 10:31:20 -08:00
Bridget McErlean 65c16a1d00
Download restic binary outside container (#3327)
In #3310, the Dockerfile for the Tilt Velero container was modified to
call the `./hack/download-restic.sh` script. A side effect of this
change was that the context for the docker build was much larger as it
was the root of the Velero repo, rather than just the `_tiltbuild`
directory. With the frequent rebuilds of the image that happen when
using Tilt, a large amounts of disk space was being consumed by the
different layers of images builds in the Docker overlay filesystem (as
diffs could include the `.go` directory which can be several GBs).

This change modifies the `download-restic.sh` script to allow the output
directory for the restic binary to be configured. This means that the
script can be called directly from the Tiltfile and can be managed
outside the container build. This allows us to restore the previous
`_tiltbuild` context. It also speeds up image builds as we can download
restic once and use it for all builds rather than redownloading
frequently.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-02-08 09:42:15 -08:00
Bridget McErlean a42284ed17
Add Tilt configuration to debug using Delve (#3189)
* Add Tilt configuration to debug using Delve

This change adds support to run the Velero process in Tilt using
[Delve](https://github.com/go-delve/delve).
This does not include support for debugging the Velero process in the
restic pods, just in the Velero deployment.

For an optimal debugging experience, this change also introduces a new
flag (`DEBUG`) to the `hack/build.sh` script to enable a "debug" build
of the Velero binary. This flag, if enabled, will build the binary
without optimisations and inlining. Disabling optimisations and inlining
is recommended by Delve.

Two configuration options have been added to the Tilt settings. The
first, `enable_debug`, is to control whether debugging should be
enabled. If enabled, the process will be started by Delve, and the Delve
server port (2345) will be forwarded to the local machine.
The second option, `debug_continue_on_start`, is to control whether the
process should "continue" when started by Delve or should be paused.
By default, debugging is disabled, and if in debug mode, the process
will continue.

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

* Add spaces around keyword args

Starlark prefers spaces around `=` in keyword arguments:
https://docs.bazel.build/versions/master/skylark/bzl-style.html#keyword-arguments

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

* Remove unnecessary command from Dockerfile

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

* Add note to connect after Tilt is running

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-01-22 10:12:04 +08:00
Carlisia Thompson 9e29e50773
Minor kubebuilder related items to clean up (#3180)
* Remove unnecessary files

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

* Switch to CAPI patch function for updates

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

* Improve table test format

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

* Refactor and add test for disabling controller

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

* Add tests

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

* Change test to use real word

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

* Fix CI

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

* Minor test fixes

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

* Remove rback/role generation

Signed-off-by: Carlisia <carlisia@vmware.com>
2021-01-21 18:22:34 -05:00
Ashish Amarnath 249215f1ff
Add more E2E tests and improvement (#3111)
* remove checked in binary and update test/e2e Makefile

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

* remove platform specific tests for now

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

* install velero before running tests and robust makefiles

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

* changelog

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

* running e2e tests expects credentials file to be supplied
run e2e tests on velero/velero:main image by default

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

* refactor to parameterize tests

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

* rename files to use provider tests convention

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

* rename tests file

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

* remove providerName config

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

* run kibishii test on azure

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

* refactor to make bsl vsl configurable

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

* skip e2e tests when not explicitly running e2e tests

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

* update e2e docs

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

* refactor and update docs

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

* refactor

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

* cleanup

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

* use velero's exec package

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

Co-authored-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2020-12-09 16:26:05 -08:00
Carlisia Thompson 5eb64eb84b
Add Tilt configs (#3119)
* Adding Tilt configs

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

* Fix spelling

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

* Reuse sample BSL yaml file

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

* Minor fix and more documentation

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

* Reuse our build.sh script

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

* Finish tweaking Tilt build

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

* Improvements

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

* This will make a better startup config

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

* Code review + improvements

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

* Improvements

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

* Reset go.sum

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

* Address code reviews

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

* Improve Tilt code

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

* Address code reviews

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

* Fix links

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

* Add CSI image to example deployment

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-12-08 13:42:03 -05:00
Bridget McErlean 704bf01fab
Check existing remote branches in release script (#2951)
The command to check for an existing release branch only checked for
local branches. We should be considering both local and remote branches
before cherry-picking commits for the new release.

This change checks for existing local and remote release branches and
creates or updates them accordingly.
* If a remote branch exists, but a local branch does not, checkout the
  remote branch and track it.
* If the remote branch and local branch exists, checkout the local
  branch and ensure that the latest commits from the remote are pulled.
* Otherwise, if the remote branch does not exist, create it locally if
  needed.

This also handles the case where an existing release branch may be
tracked in multiple remotes as the remote to use is explicitly stated.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2020-10-13 13:02:21 -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
Bridget McErlean ea23d28192
Allow remote for release process to be configured (#2950)
The release script assumes that the remote for the vmware-tanzu/velero
repository is called `upstream`. It may be the case that this remote is
configured to use a different name. This change updates the script to
allow the remote name being used to be configured by setting the
environment variable `REMOTE` before running the script. If the variable
is not set, the remote defaults to `upstream`.

The release instructions have also been updated to reflect this change.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2020-09-24 14:29:46 -07:00
Carlisia Thompson 6e20eaaba8
Spruce up release instructions and release scripts (#2931)
* Update tag-release script

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

* Reorg release instructions

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

* Move "troubleshooting" to proper section

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

* Better formatting

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

* Fix sorcery

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

* Address code review

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

* More code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-09-16 16:12:09 -04:00
Nolan Brubaker aed504a0fd
Fix git commands and add dry run mode as default to the tag-release.sh script. (#2875)
* Fix git commands and add missing comment

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

* Add dry-run mode to tag-release.sh

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

* Make if statement formatting more consistent

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

* Add documentaion for dry-run mode

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

* Better support for dry-run

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-09-01 12:59:05 -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
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
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
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
Carlisia Campos c27c3cd56a
Fix path + add helpful message (#2740)
Signed-off-by: Carlisia <carlisia@vmware.com>
2020-07-22 11:13:02 -07: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
Nolan Brubaker 2376b697af
Fix brew-update script, their commands changed (#2711)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-07-16 15:49:06 -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
Nolan Brubaker c8f4b60b5b
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>
2020-07-08 14:56:18 -07: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
Ashish Amarnath a7e9fbaf79 🏃‍♂️ pass git state to build from makefile
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-17 07:59:02 -07:00
Ashish Amarnath 5643b0f634 add a CI check for changelog file
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-06-08 09:48:33 -07:00
Ashish Amarnath 941b804a06 setup ci in github actions
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-28 09:52:10 -07:00
Nolan Brubaker 759da5b597
Add instructions for bumping homebrew version (#2580)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-05-27 10:22:39 -06:00
Ashish Amarnath e85ffcb415 fix change log generation
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-05-08 16:38:10 -07: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 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 9cd6347968
change scripts/docs to generate one docs site per major.minor (#2473)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-30 15:12:11 -07:00
Steve Kriss 9d7bd59957 update to go 1.14
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:08 -07:00
Steve Kriss 34e1f1e152 set GO111MODULE=on for build container
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:08 -07:00
Steve Kriss 83c2382e7c bind-mount velero in outside GOPATH for clarity
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:08 -07:00